Using correct seed for randomizing iterations
2679 2 1- AnnaMei11
- Member
- 11 posts
- Joined: Aug. 2017
- Offline
I am trying to make a for each loop that will vary the heights of the buildings in procedural city. I am copying floors on top of each other in a for each loop, and am trying to randomize the number of iterations that the for each loop will go through so that the number of floors will vary. I can't seem to accomplish this, and I suspect it's because I'm not using a good seed for the rand() I am calling in my for loop. I have attached my file below and would very much appreciate some insight. Thank you!
- arjanM
- Member
- 28 posts
- Joined: Nov. 2013
- Offline
If you make a new metadata node for the first loop and you change the expression in the “foreach_end2” node to
“fit01(rand(detail(”../name for new meta data node/“,”iteration“,0)),10,20)”
it will work.
I made a different approach to check out. This method is a lot faster when using a lot of points to copy to.
“fit01(rand(detail(”../name for new meta data node/“,”iteration“,0)),10,20)”
it will work.
I made a different approach to check out. This method is a lot faster when using a lot of points to copy to.
- Tanto
- Member
- 367 posts
- Joined: Nov. 2016
- Online
-
- Quick Links