Jump to content

Help with using trace to analyze maps


Recommended Posts

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. 

5d138648496fd_DesktopScreenshot2019_06.23-21_15_52.57(2).thumb.png.705a91a19a2e32827a6c74252f10159b.png


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. 

5d13881f6967d_DesktopScreenshot2019_06.23-21_18_50_17.thumb.png.83f6ab669556475ec7a02030ce314cc5.png
 

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. 

5d138a5ada0fc_DesktopScreenshot2019_06.26-12_29_25_44.thumb.png.f7645ec20ad46fc20e98e1bc656e68ab.png

 

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...