Hi Everybody,
I was wondering if someone knows how to do this :
Let's say I have a surface and 2 primitives ( a box and a sphere for example), how would you “randomly” copy spheres and boxes onto the surface ? I mean with a ramdom percentage of sphere amount and boxes amount .
thanks
Random Copy ?
3761 2 1- Undertaker
- Member
- 113 posts
- Joined: July 2005
- Offline
- old_school
- Staff
- 2540 posts
- Joined: July 2005
- Offline
Copy Stamping is your answer.
Try this.
In your Copy SOP, go to the stamp folder, create a new Var 1 called choice and Param 1 to rand($PT).
In the Switch SOP's Select Input parameter, put param(“choice”, 0) where $PT is the point number to be processed on the template grid and 0 is the default if you aren't stamping.
Now back to the Copy SOP's stamp folder and turn on Stamp Inputs.
Now you should see random spheres and cubes. To get a different solution, just add a different seed value in your rand() function like rand($PT + 1.9876) where 1.9876 can be any number, big or small to get different solutions. If you want a different solution per frame, use $F as your seed like rand($PT + $F + 1.9876).
Try this.
In your Copy SOP, go to the stamp folder, create a new Var 1 called choice and Param 1 to rand($PT).
In the Switch SOP's Select Input parameter, put param(“choice”, 0) where $PT is the point number to be processed on the template grid and 0 is the default if you aren't stamping.
Now back to the Copy SOP's stamp folder and turn on Stamp Inputs.
Now you should see random spheres and cubes. To get a different solution, just add a different seed value in your rand() function like rand($PT + 1.9876) where 1.9876 can be any number, big or small to get different solutions. If you want a different solution per frame, use $F as your seed like rand($PT + $F + 1.9876).
There's at least one school like the old school!
- Undertaker
- Member
- 113 posts
- Joined: July 2005
- Offline
-
- Quick Links