Jump to content
rodstar

city shapes to rectangles

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 :(

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

very cool topic! Looks like some kind of "convex decomposition". Might be possible to approximate that with
recursive levels of voronoi fracture SOPs (in a for each).
Can you upload a bgeo with your imported osm data?

Share this post


Link to post
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.

 

 

Share this post


Link to post
Share on other sites

not sure if it helps but the attached file is a simple implementation of a 2d convex decomposition. it´s far from being production-ready but might be a good start ...

petz

convex_decomposition.hipnc

 

  • Like 2

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Wow thank you very much. Looks very promising

I'm living here in the stoneage and it will take some time to rebuild your stuff in Houdini 13. :unsure:

 

 

Share this post


Link to post
Share on other sites

no problem, should be the same in H13, wrangle nodes have been introduced in H12.5 :D
would be cool to see what you do with it, if you can post it...
 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

nice file julien!

if you just want to fill or rather divide the polygon into smaller axis aligned parts you could also recursively clip it, similar to binary partitioning.

clip_geo.hipnc

  • Like 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×