Maya 2020 fundamentals - modelling the real world
Get halfway through a model and find it's an unworkable mess? Can't add edge loops where you need them? Can't subdivide a mesh properly? If any of this sounds familiar check this course out.
# 1 25-02-2004 , 05:16 PM
InvaZimm's Avatar
Subscriber
Join Date: Apr 2003
Location: Florida
Posts: 61

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.

# 2 25-02-2004 , 05:38 PM
roach105's Avatar
Subscriber
Join Date: Dec 2002
Location: T.O Baby!
Posts: 1,016
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;

# 3 25-02-2004 , 05:47 PM
roach105's Avatar
Subscriber
Join Date: Dec 2002
Location: T.O Baby!
Posts: 1,016
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
File Type: zip motionpath.zip (247.9 KB, 222 views)

Last edited by roach105; 25-02-2004 at 09:15 PM.
# 4 25-02-2004 , 05:55 PM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
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
# 5 25-02-2004 , 06:00 PM
roach105's Avatar
Subscriber
Join Date: Dec 2002
Location: T.O Baby!
Posts: 1,016
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.
# 6 25-02-2004 , 06:43 PM
InvaZimm's Avatar
Subscriber
Join Date: Apr 2003
Location: Florida
Posts: 61
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
https://johnzimmermann.com

“Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world." - A. Einstein
# 7 25-02-2004 , 09:06 PM
InvaZimm's Avatar
Subscriber
Join Date: Apr 2003
Location: Florida
Posts: 61
Thanx guys. Got it to work now, it was something small and stupid. Just passed over it earlier.


John 'Zimm' Zimmermann
Setup Artist
https://johnzimmermann.com

“Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world." - A. Einstein
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