Jump to content

random rotation on particles / instances


cwalrus

Recommended Posts

I promise I'm not being lazy- I've been googling this like mad! Such a simple objective i think...

 

I just want all of my particles to rotate at random rates. I added a POPTorque into the DOPnetwork with this expression

i@id;
axis.x = rand(@id);
axis.y = rand(@id * 10);
axis.z = rand(@id * 100);
 
and it works great, but they rotate faster and faster. So i figured it must be because the force keeps adding itself to the particles - so I applied it only to the 'JustBornGroup" but that still seems to apply the same random rotation to all of them.
 
Isn't there a super simple, straightforward way to apply a random rotation speed to each of your particles individually? (or even to each of the instances which I've applied subsequently in SOPS)
 
thanks people!
 
ps file is attached for what it's worth....

LeavesSpin_04.hipnc.zip

Link to comment
Share on other sites

A few other ways to handle rotations:

 

1. If you are sourcing from points, give the source points initial angular velocity @w before they go into the popnet.  The sourced particles will inherit the angular vel.  They will also need @orient vector 4 attibute, otherwise they'll use @v to orient themselves. 

 

2. Post sim, in a point VOP - use the rotate VOP to modify @orient.  Make sure to normalize it.  Get a random from @id, fit that, mult it by time, and plug into angle.  Also create a random vector to plug into axis.  Make sure to subtract 0.5 and normalize, since random will only get you 0-1 range by default.  Then convert that matrix to a vector 4, @orient.

Link to comment
Share on other sites

Thank you people-

 

The best solution for me has been to put this into VEX on the POPSpin:

spinspeed = spinspeed*fit01(random(@id),0,10);
axis.x = (rand(@id) *2 ) -1;
axis.y = (rand(@id * 10) * 2) - 1;
axis.z = (rand(@id * 150) *2 ) -1;
 
with the spin speed set to whatever you like. 
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...