Thoughtpicker Posted June 26, 2019 Share Posted June 26, 2019 Good day. I've started learning Houdini a couple of months ago and as my first project, specifically to try and get a better feeling of VEX, decided to make a city block generator. I went through different ideas for creating the initial geometry (dividing the block into random patches, using fracturing, giving potential user control over curves driving the big "roads") and decided to real city-map fragments converted to grey-scale and Trace SOP. Applying filters in Trace leaves me with reasonably clean, reasonably rectangle-like primitives, which seems to work, for now. But I wanted to use the inverted version of the same picture to create the roads. So my idea was to somehow use this skeleton to either create curves that I could later maybe sweep along them or to somehow utilize copy to points but that didn't seem optimal. Regardless, the best solution I could come up with so far was resampling the road outlines and then opening a pcloud in a wrangle and creating a point between each point and its approximate counterpart if it belongs to a different primitive. I thought that maybe drawing polylines between closest points could get me what I want but I encountered a few issues with that: 1) I end up getting a lot of extra lines, either duplicate ones or connecting points I don't need connected when the street isn't straight; 2) Intersections get awkward holes in them, as you can notice on the picture above (if you squint) or turn into absolute webs of interconnected lines if I increase the radius and max points that can be connected; 3) And finally, I realized, that I don't really see a way to convert that into clean lines that I could use as backbone for Sweep. So I guess my question is: Am I missing something and is there a convenient way to turn those outlines into something that could be turned into a convincing road system? Is the whole thing foolhardy maybe? I would appreciate any feedback and\or advice! Thanks for taking your time to read this. Quote Link to comment Share on other sites More sharing options...
freaq Posted June 26, 2019 Share Posted June 26, 2019 thats a hard problem, you can try (try) doing polyexpand2d (which creates a straight skeleton) and expand to the centers, and delete the edges... but it will probably be quite fragile. 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.