Complex UV Layout in Maya
Over the last couple of years UV layout in Maya has changed for the better. In this course we're going to be taking a look at some of those changes as we UV map an entire character
# 1 29-04-2005 , 10:23 PM
Registered User
Join Date: Feb 2004
Location: Californnia, Fremont.
Posts: 27

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?

# 2 30-04-2005 , 11:49 AM
mumbojumbo_13's Avatar
Subscriber
Join Date: Oct 2002
Location: The Land Down Under
Posts: 1,047
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.
# 3 01-05-2005 , 12:29 AM
Pony's Avatar
Subscriber
Join Date: Mar 2003
Location: with PonysGirl
Posts: 2,573
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.

# 4 03-05-2005 , 08:17 AM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
you just need to add it onto itself...

rotateX += 30 (or whatever speed you want)


user added image
Alan


Technical Director - Framestore

Currently working on: Your Highness

IMDB
# 5 03-05-2005 , 12:09 PM
mumbojumbo_13's Avatar
Subscriber
Join Date: Oct 2002
Location: The Land Down Under
Posts: 1,047
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.
# 6 03-05-2005 , 12:14 PM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
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
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads