alex.torn Posted November 9, 2018 Share Posted November 9, 2018 Hi. I create a village and i need to create curved road. But this road must contains only square blocks of different sizes. Without empty spaces between... You can see example in attachment... But how to scatter that tiled road? Or generate it? It's looks like a squared voronoi texture. But i'm don't have idea how to do it. I have a spline (road curve) and need to scatter this road with squared blocks. Thanks Quote Link to comment Share on other sites More sharing options...
Atom Posted November 9, 2018 Share Posted November 9, 2018 Maybe a recursive subdivide can get you closer to your look? 1 Quote Link to comment Share on other sites More sharing options...
Atom Posted November 9, 2018 Share Posted November 9, 2018 Here is another approach using Ben Watts Quick Tip 05, particle packing algorithm. I am also moving the result along a path so you can bend it into what ever shape you need. ap_bw_qt05_packing_scale_by_age_H16.hiplc Quote Link to comment Share on other sites More sharing options...
alex.torn Posted November 9, 2018 Author Share Posted November 9, 2018 4 minutes ago, Atom said: Here is another approach using Ben Watts Quick Tip 05, particle packing algorithm. I am also moving the result along a path so you can bend it into what ever shape you need. ap_bw_qt05_packing_scale_by_age_H16.hiplc that's have a intersections and holes... (( Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted November 9, 2018 Share Posted November 9, 2018 Look at this http://www.tokeru.com/cgwiki/index.php?title=Houdini#Voronoi_cluster_and_fracture Quote Link to comment Share on other sites More sharing options...
Noobini Posted November 9, 2018 Share Posted November 9, 2018 but for a CURVED road, I think it's already dead in the water. For a RECTANGULAR piece of road...ok, doable, not that I can. One option is maybe looking at the new UV packing algo in H17. But for a CURVED road, to be filled with square blocks...with no gaps....how is it possible ? at some point, you're gonna have to 'turn' the blocks and therefore there MUST be gaps ? The only possible way out of this what they do in real life, the square blocks are 'shaped' to perfectly fit the turning angle....ie. no longer a squared block Quote Link to comment Share on other sites More sharing options...
probiner Posted November 12, 2018 Share Posted November 12, 2018 (edited) I'm wondering if you couldn't start with big blocks define a threshold of acceptable fitting and shatter and adjust the existing blocks until they fit the threshold. There must be small gaps anyway, but yes, they can be minimized and that's what a mason can do. Edited November 12, 2018 by probiner Quote Link to comment Share on other sites More sharing options...
mlmcgoogan Posted November 14, 2018 Share Posted November 14, 2018 (edited) So this is a packing problem -- https://en.wikipedia.org/wiki/Packing_problems The bad news is there's no silver bullet here. This is a type of optimization problem where we really only have essentially brute-force algorithms that improve solutions only by trying more variations and spending more time. And even with a lot of time spent a "perfect" pack is not likely outside of ideal conditions. That said if you can find a way to stand an imperfect pack (gaps, scaling variation) then I've attached another approach using UV Layout. This is like what Entagma posted a few weeks ago (http://www.entagma.com/houdini-17-quicktip-packing-geometry-using-the-uv-layout-sop/) Using the Attribute Randomize SOP to vary pscale will improve results. If squares aren't a hard requirement you can do even better sometimes by varying a vector scale non-uniformly. Also the Island Rotation Step in the UV Layout SOP can have a dramatic impact at the cost of increased bake time and non-uniform square rotations. By varying the scaling, the number of squares, square rotation, or even making slight adjustments to the path you can improve the packing. The important takeaway is that this method does require massaging variables to achieve a better fit. Also UV Layout won't play nice if your path isn't planar. packing.hiplc Edited November 14, 2018 by mlmcgoogan Added preview image. Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted November 14, 2018 Share Posted November 14, 2018 (edited) How about just extruding a curve and using some of its own extrusion points on a voronoi fracture? Granted the bricks are slightly trapezoidal, but depending on the scale you wont really notice. path_pattern.hiplc Edited November 14, 2018 by konstantin magnus 1 Quote Link to comment Share on other sites More sharing options...
Neon Junkyard Posted November 15, 2018 Share Posted November 15, 2018 (edited) I gave it a go. theres more than 1 way to skin a cat, but you can hack the points from volume sop to make irregular blocks Also included a recursive subdivision option, its an OTL I made myself though so I didnt include it, you can find many threads about it on here though as stated above, you will always get hols trying to fit square object into a non-square boundary. trick is to fill it up recursively in the gaps so that it becomes so dense you will never see it object_packing_city_road.hip Edited November 15, 2018 by Neon Junkyard 3 Quote Link to comment Share on other sites More sharing options...
Hendolph Posted September 17, 2019 Share Posted September 17, 2019 Hi, I know it's been a while since this thread has been active, but I'm curious to know how you ended up going about solving this problem. I need to create almost the exact same pattern for a road. I don't need it to create a smooth curve like in the last few posts, but more like scattered along a curve like in your opening picture. I'm guessing you wanted yours to look like that as well. Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.