Building Generator

   5293   6   2
User Avatar
Member
14 posts
Joined: Nov. 2013
Offline
I am working on creating a building generator that will be used to procedurally model different looking buildings.

I have created a bunch of dynamic properties, that can be separated out into ‘ranges’, that let's you change the properties per an amount of floors. I've got it to a point where you can choose how many doors a floor has, but I've hit a real roadblock with what I think is a foreach bug:

http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=30396 [sidefx.com]

I've figured if I'm encountering this problem, there is probably a simpler solution to what I am doing than using for each nodes in this way. Would anybody care to look at my work and offer me any advice on how to improve my workflow. I have only been using Houdini for 3 weeks and could really do with the advice.

Thank you

Attachments:
BuildingGenerator2.hip (197.3 KB)

User Avatar
Member
228 posts
Joined: Dec. 2012
Offline
I just want to reiterate that this is not a bug with the foreach SOP. As we mentioned in your other thread, you just need to change the names of the stamp values when you have nested loops. I downloaded your file, did that, and the door creation works just fine - i was able to make four doors no problem. I have attached the file for you.

I agree that there are simpler solutions to what you're doing. Have a look at the procedural modeling tutorials that cover buildings. They are very straightforward:

http://www.sidefx.com/index.php?option=com_content&task=blogcategory&id=222&Itemid=383 [sidefx.com]

Attachments:
fixedLoops.hipnc (186.4 KB)

www.kmcnamara.com
User Avatar
Member
14 posts
Joined: Nov. 2013
Offline
Hi,

Yes those tutorials were very useful, my only issue with that method is I plan to do the interior too.

Hopefully as I get more knowledge of Houdini I will be able to combine the method in the tutorial with what I am attempting to do.

I guess the main thing stopping me, is how I would use a slider to move a door, when the shape of the building could be anything. It does make the placement of anything rather tricky.

Thanks for your time.
User Avatar
Member
1743 posts
Joined: March 2012
Offline
KMcNamara
I just want to reiterate that this is not a bug with the foreach SOP.
As I mentioned in the other thread as well, this is a bug with the ForEach SOP. The stamp variables should be in separate scopes, which is the entire reason why the stamp function requires the scope and not just the variable name, and chapd was referring to the correct scopes, but one ForEach happily ignores that there's such a thing and writes over the other ForEach's scope.
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
228 posts
Joined: Dec. 2012
Offline
Gotcha. Since the documentation mentions that you need to change the stamp names I guess I didn't consider it a bug, but I totally see what you mean with the scopes.
www.kmcnamara.com
User Avatar
Member
4515 posts
Joined: Feb. 2012
Online
ndickson
KMcNamara
I just want to reiterate that this is not a bug with the foreach SOP.
As I mentioned in the other thread as well, this is a bug with the ForEach SOP. The stamp variables should be in separate scopes, which is the entire reason why the stamp function requires the scope and not just the variable name, and chapd was referring to the correct scopes, but one ForEach happily ignores that there's such a thing and writes over the other ForEach's scope.

I sent this as a bug 1.5 years ago and was told it's the responsibility of the users to provide unique stamp variables for nested ForEach nodes. You can't control it if a digital asset you are using is locked and is using the default variable names inside, and thus preventing you to use the digital asset in ForEach SOP.

I suggested Houdini automatically altering (prefix/suffix) the variable names using auto-generated unique names, i.e. the absolute path of the node, etc. This way the bug would be resolved if my thought process is not flawed. It could be
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
228 posts
Joined: Dec. 2012
Offline
Yea, that would be nice. Just ran into that issue with digital assets inside of loops - totally agree now that this is a bug.

Going to submit another ticket to SideFX to poke them on the issue.
www.kmcnamara.com
  • Quick Links