Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums

Welcome to Simply Maya

 Simply Maya User Community - Maya Tutorials important question with expression editor
 Register FAQ Members List Calendar Mark Forums Read

 27-11-2003, 02:40 AM #1 Jay_R_Locke Registered User   Join Date: Nov 2003 Location: Washington, USA Posts: 5 Thanks: 0 Thanked 0 Times in 0 Posts important question with expression editor Once again this has to do with the matrix tutorial on highend3d. I dont understand this: Select particleshape1 and open the expression editor.Add the runtime expression index=rand(1,26); Play the animtion and you will find that each particles are now instancing a random letter and changes every frame. It is now near the effect we want. But we still need to write some expressions to control the motion of each particle. Select particleshape1 and add one another array attribute "gate". It has not much meaning , just for used in the expression. Add the runtime expressions below to the particleshape1. particleShape1.index=rand(1,26); vector \$temp=particleShape1.worldVelocity; if (\$temp.y<=rand(-10,-5)) { particleShape1.gate=1;}; if (\$temp.y>=(-1)) {particleShape1.gate=0;}; if (particleShape1.gate==1){ particleShape1.acceleration=<<0,rand(20,25),0>>; //print("aaaa"); }; if (particleShape1.gate==0) { particleShape1.acceleration=<<0,rand(-25,-20),0>>; //print("bbbb"); }; You can find the tutorial in this place to see the whole thing, any help would be greatly appreciated; http://www.highend3d.com/maya/tutorials/harley1/ Thanks! P.S. If someone could tell me where I could find a better or more clear explanation of how to do this, please tell me! Thanks again!
28-11-2003, 02:50 PM   #2
Alan
Moderator

Join Date: Oct 2002
Location: London, UK
Posts: 2,800
Thanks: 0
Thanked 5 Times in 5 Posts

 Select particleshape1 and open the expression editor.Add the runtime expression index=rand(1,26);
select the particleShape1 in the ouliner. Then Go to the expression editor it's in window>>animation editors>>expression editor

Then you should find a value called index (I'm not sure if adding it is part of the tutorial earlier on). then type in the expression editor the equation it says in the tutorial and select "runtime expression" as the type of expression. This simply means that it will be calculated as the render is run.

To add an attribute to the particle system select it in the outliner then go down to per particle attributes and add it on. YOu can then add that next expression in the same way as you added the first.

Alan
__________________
Technical Director - Framestore

IMDB

A little bit about who we are