View Full Version : Rotate particles separately (instancer)

08 August 2008, 03:35 PM
Hey! I need fast replay :-) I sit on this simple thing all day :D I search on forum information about that but i don't find a simple answer. So I have a particleshape with geometry instancer. And want rotate radomly all particles, I do some thing like:
particleShape1.userVector1PP = rand(-10,10);

before dynamic:
particleShape1.userVector1PP += <<1,0.1,1>> ;

And I connect the roration to the that vector.

It's o.k but, all particles will by rotate together in that same direction, and that is wrong. I want a rotate particles separately.

And really sorry guys if in other theard will be asnwer and I mist it.

Sorry about my English!


08 August 2008, 05:27 PM
What I do in a new scene:
Create an emitter ( default).
Create a poly cube.
Select partcileShape1.
Under "Add Dynamic Attribute" click General then in the New Tab enter myRotation as name, Data type should be Vector and Attribute Type to Per particle(array).
"My Rotation" should appear within the attributes so create a Creation Expression for it:
myRotation = <<rand(0,360),rand(0,360),rand(0,360)>>;
Then a Runtime Expression:
particleShape1.myRotation = particleShape1.myRotation +1;

Now select the cube and go to the menu Particles>Instancer(Replacement).
In the window under Rotation Options, choose myRotation.
You should get the scene attached here.

08 August 2008, 06:21 AM
Check out km_randomInstanceRotation.mel here: (

09 September 2008, 10:14 AM

Big thanks for help guys! I be very appreciate for replays. Generaly I use a lazzhar method and add some MEL after dynamic to randomize a roration.

Thanks drGonzo that site with scripts is great.


Sorry about my English!

CGTalk Moderation
09 September 2008, 10:14 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.