SimplyMaya Forums

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

Home / forum / Animation / Mel Scripts & Programming / Infinite Rotation of Propeller
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 29-04-2005, 10:23 PM   #1
djknucklez
Registered User
 
Join Date: Feb 2004
Location: Californnia, Fremont.
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Infinite Rotation of Propeller

I'm trying to create an expression for a propeller of an airplane. I want it to have an infinite rotatation but I also want to control the speed of it. I thought of this:

propellerGroup.rotateX = time +360;

it doesnt seem to work. Does anyone have any ideas?
djknucklez is offline   Reply With Quote
Old 30-04-2005, 11:49 AM   #2
mumbojumbo_13
Subscriber
 
mumbojumbo_13's Avatar
 
Join Date: Oct 2002
Location: The Land Down Under
Posts: 1,047
Thanks: 0
Thanked 6 Times in 6 Posts
Default

you need to times the rotation by time, to speed it up use a value of around 720 instead of 360 or to lsow it down you need a value of 90
this script should read:
propellerGroup.rotateX = time*360;
hope that helps
__________________
Thanks for wasting your time reading this line.
mumbojumbo_13 is offline   Reply With Quote
Old 01-05-2005, 12:29 AM   #3
Pony
Subscriber
 
Pony's Avatar
 
Join Date: Mar 2003
Location: with PonysGirl
Posts: 2,573
Thanks: 0
Thanked 6 Times in 6 Posts
Default

well one thing I see. I belive time=fram number in this case basicly and if you have it do a compleate 360 every frame it will not look like its rotating, unless you render with 3d motion blur maybe.

To get it variable you will probably want do eather add a attrabute to like say the roter geo, or just a animation controle object like a red sphere. You would thin controle the animation buy makeing the exprestion read like :

propellerGroup.rotateX = time + Csphere.translateY + 30;

note your names will varry.
Pony is offline   Reply With Quote
Old 03-05-2005, 08:17 AM   #4
Alan
Moderator
 
Alan's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
Thanks: 0
Thanked 5 Times in 5 Posts
Default

you just need to add it onto itself...

rotateX += 30 (or whatever speed you want)



Alan
__________________
Technical Director - Framestore

Currently working on: Your Highness

IMDB
Alan is offline   Reply With Quote
Old 03-05-2005, 12:09 PM   #5
mumbojumbo_13
Subscriber
 
mumbojumbo_13's Avatar
 
Join Date: Oct 2002
Location: The Land Down Under
Posts: 1,047
Thanks: 0
Thanked 6 Times in 6 Posts
Default

hey pure how does that line work?
rotateX += 30
does that work as an expression every frame where it takes the rotate X value and adds 30 degress every frame?
--
how does maya keep track of the rotate X variable ?
i know in pascal you'd have to assign the rotate x value to a real value and update every frame- how does maya handle such a thing?
__________________
Thanks for wasting your time reading this line.
mumbojumbo_13 is offline   Reply With Quote
Old 03-05-2005, 12:14 PM   #6
Alan
Moderator
 
Alan's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
Thanks: 0
Thanked 5 Times in 5 Posts
Default

it just adds it to it on that frame and then the next time it does the addition (on the next frame) the value has already been updated so it just adds another 30 on... it's just a counter really nothing hard.

If you wanted it to be a bit more "animatable":

add an attribute called "speed" and then set the rotateX to be

rotateX += speed;

That way you can key the speed attr which will control the speed of the prop.

:ninja;
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.