Getting value(s) from previous loop in for-each
2269 6 1- jttarigan
- Member
- 18 posts
- Joined: Jan. 2020
- Offline
Greetings,
I'm trying to build a procedurally generated randomly distributed stack of boxes using for loop (like a pyramid, but ununiform). My solution is in each loop, I generated a grid, randomly blast a few primitives (using group range) and extrude them. Now in my stack, the box in the next level must on top of another box in the lower level. So in the current loop, I have to be able to access the blasted grid from the previous iteration, and randomly blast from those grid. This is done repeatedly until I reached the desired level.
In programming, this should be simply by defining a variable to store the value to be used in the next iteration. Is there a way to do this in Houdini's for-each node?
Thank you
edit: added a WIP image
I'm trying to build a procedurally generated randomly distributed stack of boxes using for loop (like a pyramid, but ununiform). My solution is in each loop, I generated a grid, randomly blast a few primitives (using group range) and extrude them. Now in my stack, the box in the next level must on top of another box in the lower level. So in the current loop, I have to be able to access the blasted grid from the previous iteration, and randomly blast from those grid. This is done repeatedly until I reached the desired level.
In programming, this should be simply by defining a variable to store the value to be used in the next iteration. Is there a way to do this in Houdini's for-each node?
Thank you
edit: added a WIP image
Edited by jttarigan - Oct. 6, 2021 03:34:50
- sekow
- Member
- 238 posts
- Joined: Nov. 2013
- Offline
- jttarigan
- Member
- 18 posts
- Joined: Jan. 2020
- Offline
- eikonoklastes
- Member
- 330 posts
- Joined: April 2018
- Offline
- jttarigan
- Member
- 18 posts
- Joined: Jan. 2020
- Offline
- sekow
- Member
- 238 posts
- Joined: Nov. 2013
- Offline
- eikonoklastes
- Member
- 330 posts
- Joined: April 2018
- Offline
-
- Quick Links