Jump to content

city shapes to rectangles


rodstar

Recommended Posts

Hi

I need some help from the guys with the big brains :D.

I have some complex Shapes from osm data inside houdini.

So i want create some buildings out of this shapes .But the complexity

of this polygons complicate the procedural modeling a lot.

So it would be so much easier , if i have just rectangles or kind of rectangular

Shape. So have someone an Idea how to achieve this ?

help_city.png

It dont have to be total accurate.

Read a lot about packing and packing Problem , but have to say that these Papers with 30 Pages of formulas

are over my head.

Please help :(

Link to comment
Share on other sites

well for a quick/dirty result try:

  • a divide node set to remove unshared edges
  • Hole that result
  • facet that with remove inline points enabled
  • divide that result with "avoid small angles" enabled

That probably gives you something slightly better to start from (if you haven't already)

After that there are multiple options, but none of them are super straightforward (hence the 30 page papers :P)

Personally I would probably go with some Attribute wrangle to find the corners that I want to use and then dissolve all the edges that are less useful,
then divide again and maybe repeat those steps a couple of times.

Tbh, I am also not super sure what I would do, but it does look like an interesting challenge :P

Edited by acey195
Link to comment
Share on other sites

Sorry for the late reply.

Here is a an example File from my Scene.

I converted the osm Files to a Obj with osm2World because i cant find a better script/tool to get all the stuff from a osm file(<relation v=multipolygon).

@acey195 this is excatly what i tried, but didnt get a accectable Result.

"convex decomposition" sounds great.:blink: I will read some stuff

cityShape.hip

I still found no proper solution, so if someone has fun with this stuff ,  i would be so happy.

 

 

Link to comment
Share on other sites

Very cool @petz!
just for fun, I tried a SOP solver approach, very brute force but good for packaging squares :D
just a "fill" method on one square at a time, if it's not square of filled enough, move to another area ...
converting the points to a shape needs a lot of work...

city3.pngI

using the osm map with a bit of cleanup of the edges and some random extrusion...
bunker_city_4.jpg

 

bunker_city.zip

city5.png

city1.png

Edited by bunker
added 3d view
  • Like 2
Link to comment
Share on other sites

One of the expected problems may occur due to VOP SOP implementation of early Point Wrangle. Some variables use different names. Another one is that VEX library was about two times smaller. For example getpointbbox function was added in H14. But getbbox must be and do similar job there. It returns different results for non-polygonal geometry, where surface are not fully bound with points.

Edited by f1480187
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...