## 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

# Welcome to Simply Maya

 Simply Maya User Community - Maya Tutorials Expression HELP
 Register FAQ Members List Calendar Mark Forums Read

 25-02-2004, 05:16 PM #1 InvaZimm Subscriber     Join Date: Apr 2003 Location: Florida Posts: 61 Thanks: 0 Thanked 0 Times in 0 Posts Expression HELP I am trying to have a ball follow a motion path (which I have set and working). However, I would also like the ball to rotate on its Z axis as it moves along the motion path. I am having trouble figuring out what node(s) is/are needed to get the values along the motion path to be used to help calculate how the qucikly the ball should rotate. Basically I hope to have the ball speed up on different areas of the curves to similuate a gravity effect. *Note not allowed to use any dynamics or particles in the project.* Thank you for your time.
 25-02-2004, 05:38 PM #2 roach105 Subscriber     Join Date: Dec 2002 Location: T.O Baby! Posts: 1,016 Thanks: 0 Thanked 1 Time in 1 Post Well if you are using Maya 5 you can actually have the ball along the surface speed up and slow down depending on where you have placed te CV for the path. In regards to spinning you can probably create a simple expression on the rotate z channel e.g. pSphere1.rotateZ = time *360;
25-02-2004, 05:47 PM   #3
roach105
Subscriber

Join Date: Dec 2002
Location: T.O Baby!
Posts: 1,016
Thanks: 0
Thanked 1 Time in 1 Post

Here is a playblast of what I did. Is this what you are looking for?

what I did is grouped the Sphere to itself and applyied that group to the motion bath with parametric length turned on. This will tell Maya to actually look at the points on the curve to speed up and slowdown. After I went to the sphere itself and applied the expression on rotate z. Basic expression telling the sphere to turn 360 degrees.
Attached Files
 motionpath.zip (247.9 KB, 12 views)

Last edited by roach105 : 25-02-2004 at 09:15 PM.

 25-02-2004, 05:55 PM #4 Alan Moderator     Join Date: Oct 2002 Location: London, UK Posts: 2,800 Thanks: 0 Thanked 5 Times in 5 Posts there's something in the help docs about this. Your expression wont be acurate roach because it wont take into account gradients of slopes or anything. You need to look at the geometry you're rolling along (or the curve) and use that to drive the rotation of the ball. You could probably base it on distance travelled. Speed = distance /time remember Alan __________________ Technical Director - Framestore Currently working on: Your Highness IMDB
 25-02-2004, 06:00 PM #5 roach105 Subscriber     Join Date: Dec 2002 Location: T.O Baby! Posts: 1,016 Thanks: 0 Thanked 1 Time in 1 Post Very true Pure. That expression is not looking at the curve at all. I actually thought he wanted the ball to speed but he needs the rotation to be affected. My bad Last edited by roach105 : 25-02-2004 at 06:07 PM.
 25-02-2004, 06:43 PM #6 InvaZimm Subscriber     Join Date: Apr 2003 Location: Florida Posts: 61 Thanks: 0 Thanked 0 Times in 0 Posts Interesting. But how do you look at the need attribute(s) of the curve to have it drive the rotation of the ball. __________________ John 'Zimm' Zimmermann Setup Artist http://johnzimmermann.com “Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world." - A. Einstein
 25-02-2004, 09:06 PM #7 InvaZimm Subscriber     Join Date: Apr 2003 Location: Florida Posts: 61 Thanks: 0 Thanked 0 Times in 0 Posts Thanx guys. Got it to work now, it was something small and stupid. Just passed over it earlier. __________________ John 'Zimm' Zimmermann Setup Artist http://johnzimmermann.com “Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world." - A. Einstein

A little bit about who we are