Sorry if this has been discussed before, but I've tried to search and could not find this answer.
I just want to know what the best way is to randomize copied spheres onto particles.
I have a particle sim that I have written out into bgeos with a ROP.
I then file in the particles/bgeos and copy spheres onto them with a copy SOP.
Now I would like to randomize the size of the particles that are copied.
How would you do this?
Thanks in advance.
dt
randomizing size of spheres copied onto particles
5556 5 1- dante66
- Member
- 3 posts
- Joined: 7月 2005
- Offline
- stevenong
- Member
- 1634 posts
- Joined: 7月 2005
- Offline
Hi there,
Click on the “?” button for the Copy SOP & there is an example for stamping which is what you're looking for. Here's a tutorial as well:
http://www.sidefx.com/community/learn/modeling/legacy/stamping.pdf [sidefx.com]
In addition, search for the terms “copy + stamp” through the forum & you should find lots of information.
Have fun!
Cheers!
steven
Click on the “?” button for the Copy SOP & there is an example for stamping which is what you're looking for. Here's a tutorial as well:
http://www.sidefx.com/community/learn/modeling/legacy/stamping.pdf [sidefx.com]
In addition, search for the terms “copy + stamp” through the forum & you should find lots of information.
Have fun!
Cheers!
steven
- old_school
- スタッフ
- 2540 posts
- Joined: 7月 2005
- Offline
In this case I would declare that Copy Stamping is an abuse of technology.
There are three quick ways to randomize the size of the spheres, all without Copy Stamping:
1. Use a random function in the size or scale parameters. A simple rand($PT+1.001) in size will do it. If you want different scales for the different axes, use the same rand function copied and change the offset value (the arbitrarilly chosen 1.001 in the above expression, could be any number as it is just a simple offset to get different noise).
2. Put a Point SOP on your template geometry before the right input in to the Copy SOP and turn on and use the pscale attribute. Use the same rand function (or variant) above in this field. The Copy SOP will invisibly use the pscale attribute on the template geometry to scale the copied objects. The advantage of this approach is you can then add the first option above to this to get even more variability and control
3. The third way is to pass the PT attribute (or ID attribute for particles) to the copied geometry and use the primitive SOP to scale the resultant copied primitives. You will need to attribute promote the point attribute PT or ID to a primitive type. After that, you can use rand($PT+1.001) yet again but this time the $PT (or $ID) is now a primitive attribute to achieve the same effect. Oh and you can use all THREE methods to do real wacky scaling stuff.
P.S.: One of my crusaides in Houdini useage is to avoid the misuse of Copy Stamping.
There are three quick ways to randomize the size of the spheres, all without Copy Stamping:
1. Use a random function in the size or scale parameters. A simple rand($PT+1.001) in size will do it. If you want different scales for the different axes, use the same rand function copied and change the offset value (the arbitrarilly chosen 1.001 in the above expression, could be any number as it is just a simple offset to get different noise).
2. Put a Point SOP on your template geometry before the right input in to the Copy SOP and turn on and use the pscale attribute. Use the same rand function (or variant) above in this field. The Copy SOP will invisibly use the pscale attribute on the template geometry to scale the copied objects. The advantage of this approach is you can then add the first option above to this to get even more variability and control
3. The third way is to pass the PT attribute (or ID attribute for particles) to the copied geometry and use the primitive SOP to scale the resultant copied primitives. You will need to attribute promote the point attribute PT or ID to a primitive type. After that, you can use rand($PT+1.001) yet again but this time the $PT (or $ID) is now a primitive attribute to achieve the same effect. Oh and you can use all THREE methods to do real wacky scaling stuff.
P.S.: One of my crusaides in Houdini useage is to avoid the misuse of Copy Stamping.
There's at least one school like the old school!
- talos72
- Member
- 112 posts
- Joined: 7月 2005
- Offline
- old_school
- スタッフ
- 2540 posts
- Joined: 7月 2005
- Offline
- stevenong
- Member
- 1634 posts
- Joined: 7月 2005
- Offline
-
- Quick Links