subdividing facades

   2134   1   0
User Avatar
Member
98 posts
Joined: 9月 2008
Offline
Hi,

I'm trying to improve our buildinEngine (formely known as XMLShape)(http//ima.udg.edu/~dagush/Projects/buildingEngine/) in order to be able to plug it into our urbanEngine project (http//ima.udg.edu/~dagush/Projects/urbanEngine/), but I have stumbled with a little problem that surely you will be able improve/solve.

First, I'll give you the context buildingEngine follows the paper “Procedural Modeling of Buildings” by P. Müller, P. Wonka, S. Haegler, A. Ulmer and L. Van Gool. (Proceedings of ACM SIGGRAPH 2006), where each building is built in a top-down way you start with a box that represents the building, then you split it into its faces that are the facades (plus roof and floor), then subdivide each facade into floors, and so on. Our previous implementation worked with integer numbers, so every floor must be equally tall. But now I want to have non-integer heights, and the problem comes when trying to generalize this last step.

In the attached file, you can see my initial implementation on an example If the user specifies in the XML file that he/she wants 4 floors, 3 equally sized at 0.2 units and one larger (the rest), I would implement a loop in Python that would create the tree of polysplit+delete nodes that you see, plus a final objectmerge node.
But I think this is highly inefficient for a large building. Imagine what would it look like the tree for a 100-floor building! Of course, it's Python who's doing the job, but it doesn't behave well if the user says… “mmm… let's make it 101 floors” in an HDA!
So, my question/problem is how to make this efficient? If the user manually specifies heights for some floors, I think that this implementation is ok (a polysplit+deletes for each specified floor). But if he/she wants to specify something like “Subdivide the rest of the building in floors 0.25 units tall”, then how do I do that without getting that horrible tree? with a foreach node? how?

I really hope I'm explaining myself with this one.

Thanks you VERY much

dagush.-

Attachments:
test_facadeSplit.hipnc (57.7 KB)

————————-
* skylineEngine project coordinator
* buildingEngine module developer
http//ggg.udg.edu/skylineEngine
User Avatar
Member
98 posts
Joined: 9月 2008
Offline
Hi all,

At the end, I think I've found a solution myself instead of subdividing each poly with polysplit nodes, I decided to do an intersection with a properly sized box with a cookie node. So, to have the different floors in a building, I just need to put this into a foreach node. And it works! -)
Now, I've found some weird behaviour for certain situations. For example, when horizontally subdividing a floor into segments for the windows, sometimes the cookie nodes return nothing instead of something. In the attached example you can see one of these situations The cookie node should return the square, as it exactly fits inside the box and I've put “intersect”. But it doesn't. Any idea?
My solution, right now, is to add a small transform node with a scaling of 1.0001, which corrects the problem.
Do you know what I'm doing wrongly? Or is it just a numerical precision problem? This last option would explain the epsilon-scaling hack, right? Or could it be some sort of bug?

Thanks anyway!!!!

cheers

dagush.-

Attachments:
test_facadeOneCookie.hipnc (40.7 KB)

————————-
* skylineEngine project coordinator
* buildingEngine module developer
http//ggg.udg.edu/skylineEngine
  • Quick Links