Expressions to scale, rotate and spin
by Aziz Khan, Afghanistan

Step 12: Now write the following expression.

particleShape1.Rotation_new= <<rand(360),rand(360),rand(360)>>;


Step 13: Now go back to (Instancer (Geometry Replacement) tab on the (Rotation Options) choose (Rotation) then from drop down menu choose your custom name. Now if you play then you will see on the objects they are not rotating instead they are oriented in different direction, that what we need next we will deal with spinning of objects.



Step 14: Ok last but not the least create one more custom name for our object spinning, name it as anything you prefer, but in this I have named Rand_rotation, now you have to change the vector radio button to Float radio button since we will deal with (Creation Expression) and (Runtime Expression).



Step 15: Write the below expression...

particleShape1.Rand_rotation= rand(-50, 40);

if you think these numbers too high you can decrease it to any satisfactory numbers.



Step 16: Anyway play your animation as you can see there is no changing on the spinning of the objects, ok we will add the expression for the spinning of the objects, ok open up your expression editor by default the radio button is set to (Creation) since we will deal with (Runtime Expression) ok hit the button called (runtime after dynamics) and then add this expression below...

particleShape1.Rotation_new += particleShape1.Rand_rotation;

With this you will be able to spin your objects.


I hope you find some thing new, so here is the small animation of my scene below.


Related Links

Scene Setup: Download here

Authors Website: www.3dgroup.3dk.org

Page 1 | Page 2 | Page 3 | Page 4


 
 
 
  Copyright © 2005-2007. All Rights Reserved