SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Home / forum / Lounges / Maya Basics & Newbie Lounge / important question with expression editor
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 27-11-2003, 01: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
Default 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!
Jay_R_Locke is offline   Reply With Quote
Old 28-11-2003, 01:50 PM   #2
Alan
Moderator
 
Alan's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Quote:
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

Currently working on: Your Highness

IMDB
Alan is offline   Reply With Quote
New Thread

« Previous Thread | Next Thread »

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.