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 18-08-2003, 10:00 PM   #1
RenardMF
Registered User
 
RenardMF's Avatar
 
Join Date: May 2003
Location: Orlando, FL
Posts: 13
Thanks: 0
Thanked 3 Times in 3 Posts
Default Scripting Question

Does anyone know of the expression to use to adjust and objects velocity/acceleration. For example i have a ring and i want to make it start spinning really fast and gradualy come to a halt slowing down speed over time. What would be the easist way to script this?
RenardMF is offline   Reply With Quote
Old 18-08-2003, 10:48 PM   #2
mtmckinley
The Maya Mountain
 
mtmckinley's Avatar
 
Join Date: Aug 2002
Location: Seattle, WA
Posts: 8,245
Thanks: 1
Thanked 25 Times in 25 Posts
Default

OBJECTNAME.rotateY = 100/(frame/500);

You'd substitute the rotation direction with whichever direction you want.

You'd also want to experiment with the number amounts to get the speed you want.
__________________
-Mike
www.mtmckinley.net
The Maya Toolbelt
mtmckinley is offline   Reply With Quote
Old 18-08-2003, 10:53 PM   #3
RenardMF
Registered User
 
RenardMF's Avatar
 
Join Date: May 2003
Location: Orlando, FL
Posts: 13
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Thanks ill try that now.
RenardMF is offline   Reply With Quote
Old 18-08-2003, 11:03 PM   #4
RenardMF
Registered User
 
RenardMF's Avatar
 
Join Date: May 2003
Location: Orlando, FL
Posts: 13
Thanks: 0
Thanked 3 Times in 3 Posts
Default

How bout make it spin like that and slow and then come to a complete stop at its original location?
RenardMF is offline   Reply With Quote
Old 19-08-2003, 03:06 AM   #5
mtmckinley
The Maya Mountain
 
mtmckinley's Avatar
 
Join Date: Aug 2002
Location: Seattle, WA
Posts: 8,245
Thanks: 1
Thanked 25 Times in 25 Posts
Default

You'd have to figure out the math for that, I'm afraid. I'm not sure what you'd need to do to get it to stop on a dime.
__________________
-Mike
www.mtmckinley.net
The Maya Toolbelt
mtmckinley is offline   Reply With Quote
Old 21-08-2003, 03:34 AM   #6
mark_wilkins
Registered User
 
mark_wilkins's Avatar
 
Join Date: Jan 2003
Posts: 161
Thanks: 0
Thanked 1 Time in 1 Post
Default

The easiest way to do this is by keyframing the animation. Set a few keys, mess with the tangents a bit, and you'll get the result you need.

Alternatively, if you're looking for a generalized velocity/acceleration solution, consider using particle or solid body dynamics. You can apply forces or accelerations and rely on the dynamics solver to figure out the resulting motion.

Finally, you can try using a mathematical expression for the rotation. This is my least favorite approach because it requires figuring out how you want the velocity to change and then essentially analytically integrating it, which if you don't recall your calculus very well is going to be a trouble-filled, trial-and-error endeavor.

-- Mark
__________________
Mark R. Wilkins
author of MEL Scripting for Maya Animators
www.melscripting.com
mark_wilkins 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.