Copy and Transform with Random Numbers
6353 6 2- Bobo_The_Imp
- Member
- 11 posts
- Joined: May 2018
- Offline
I'm trying to make an intractable pile of money that stacks up or down. I'm using a tubesop and a copysop. this piles the money, but its too uniform in its stacking so I want to add some random jitter in the X and Z axis. I thought I could just type "fit01(rand($PT),0,1) to give some randomness, but apperently $PT isn't an option. Can someone explain to me why it isn't an option?
I already achieved the effect using a linesop, copytopointssop and a boolean operation on the line, but it's very inelegant.
I already achieved the effect using a linesop, copytopointssop and a boolean operation on the line, but it's very inelegant.
- olivierth
- Member
- 1007 posts
- Joined: April 2017
- Offline
- olivierth
- Member
- 1007 posts
- Joined: April 2017
- Offline
- Bobo_The_Imp
- Member
- 11 posts
- Joined: May 2018
- Offline
- olivierth
- Member
- 1007 posts
- Joined: April 2017
- Offline
I think the example you are giving with the copy sop doesn't work because it doesn't work with points. By saying $PT (point number) it doesn't know where to find that info. Also, even if you would not get an error, your “fit01(rand($PT),0,1)” would probably get one value that's applied to all copies rather than finding one random value per copy.
If you want to have random translate per copy (could be different scale as well), you might want to use the copy stamp node. You can paste your “fit01(rand($PT),0,1)” in it. Here's a tutorial:
https://www.youtube.com/watch?v=gQuB87tm8GY [www.youtube.com]
I said I prefer to copy points because it opens up a lot more possibilities and allows for very efficient/fast calculations when working with Wrangles but it's more advanced. For example, with points, if I want to end up with different sized coins, I can randomize the attribute called “pscale” on each point. Houdini already knows that “pscale” is for “proportional scale” and will scale the coins from that info.
If you are starting in houdini, learn the copy stamp method. You can do a ton of things with that!
If you want to have random translate per copy (could be different scale as well), you might want to use the copy stamp node. You can paste your “fit01(rand($PT),0,1)” in it. Here's a tutorial:
https://www.youtube.com/watch?v=gQuB87tm8GY [www.youtube.com]
I said I prefer to copy points because it opens up a lot more possibilities and allows for very efficient/fast calculations when working with Wrangles but it's more advanced. For example, with points, if I want to end up with different sized coins, I can randomize the attribute called “pscale” on each point. Houdini already knows that “pscale” is for “proportional scale” and will scale the coins from that info.
If you are starting in houdini, learn the copy stamp method. You can do a ton of things with that!
Edited by olivierth - Dec. 11, 2018 21:30:06
- Geausselain
- Member
- 1 posts
- Joined: Oct. 2018
- Offline
- toonafish
- Member
- 411 posts
- Joined: March 2014
- Offline
-
- Quick Links