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
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 29-04-2005, 11: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, 12:49 PM   #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, 01: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, 09: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, 01: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, 01: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

A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.