Copy random part at the extremity of the previous one

   1035   1   0
User Avatar
Member
2 posts
Joined: Sept. 2015
Offline
Hello !

I'm new to this forum and i'm actually diving into Houdini since two months.

Now, i'm pretty close to finish a HDA about Subway generator.

I'm come here because i'm stuck and i can't find solution, so i hope that i could directly find help here.

Let explain my issue :
I've got three subway part, one large, and two others, much more smaller.


I've got a parameter which copy part based on the bbox of the part selected.





What i want to do it's that for each copy, it choose randomly an entry in my switch, to have a mix of differents parts and not just a copy of a same part all along (which is what i've got now, with a basic copy).


So it has to check for a part selected, the bbox of the previous one selected to determine how long it have to be translate to be placed at the extremetity of the previous one.

I hope, i've been clear enough. I'm really stuck about, so if somebody could help me with that, it'll be really nice !

Julien

Attachments:
01.PNG (115.9 KB)
01.2.PNG (181.9 KB)
02.PNG (99.7 KB)
02.2.PNG (89.0 KB)
03.PNG (86.7 KB)
03.2.PNG (124.6 KB)
graph.PNG (19.0 KB)
graph02.PNG (3.9 KB)

User Avatar
Member
1737 posts
Joined: May 2006
Online
This box stacking example will probably give you some clues, you'll have to alter it so it's stacking horizontally rather than vertically:

http://www.tokeru.com/cgwiki/index.php?title=ForLoops#Stacking_boxes [www.tokeru.com]
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
  • Quick Links