Maya for 3D Printing - Rapid Prototyping
In this course we're going to look at something a little different, creating technically accurate 3D printed parts.
# 1 22-12-2003 , 09:10 PM
LeoGeo's Avatar
Registered User
Join Date: May 2002
Posts: 21

How to keyframe the position of a pivot?

I'm trying to animate a cube rolling on a floor. The problem is the pivot of the cube should change very 90 degree but I don't know how to key it . Can someone give me a hand please. Thanks.

user added image

# 2 22-12-2003 , 09:28 PM
3djoe's Avatar
Subscriber
Join Date: Nov 2002
Location: CT USA
Posts: 567
I am not sure you can.
But why not put locators in the corners and key using the 4 locators.


Never Do Today What You Can Put Off Till Tomorrow..
My New Site MayaFx.com
# 3 22-12-2003 , 10:22 PM
dannyngan's Avatar
Registered User
Join Date: Dec 2002
Location: Seattle, WA
Posts: 1,154
You can't keyframe a pivot point. However, you could play with a variety of constraint-based options (I'm thinking a parent constraint would work well here).

Or, just keyframe the animation. It's much faster that way. user added image


Danny Ngan
Animator | Amaze Entertainment
my website | my blog | my job
# 4 23-12-2003 , 12:33 AM
mtmckinley's Avatar
The Maya Mountain
Join Date: Aug 2002
Location: Seattle, WA
Posts: 8,245
You CAN key the pivot point. user added image Kinda hokey, but it can be done. I'll try to describe it:

1) First, open the cube's attribute editor. Assuming your cube is named pCube1, click the pCube1 tab. Open the Pivots folder and check "Display Rotate Pivot." You can also open the World Space folder.
2) Move your pivot point to the edge of the cube where you want the first rotation to happen.
3) Open Window > General Editors > Channel Control. Move the following from Unkeyable to Keyable:

rotatePivotX
rotatePivotY
rotatePivotZ
rotatePivotTranslateX
rotatePivotTranslateY
rotatePivotTranslateZ

These will appear in your Channel Box.
4) Go ahead and key the first rotation of the cube at the edge where your pivot point currently is. When it rotates 90 degrees and it comes to the point where it will need to then change pivot location in order to roll on the next edge, go forward one frame and in the World Space folder of your cube, change the World Rotate Pivot X, Y, or Z. In my case, my cube was 16 units large, so I moved it 16 units in the X direction. You'll notice a few of the channels that you added change to indicate this movement of the pivot. Key them in the Channel Box. Now, go back one frame, put the pivot back to it's original position, and key those same channels again.
5)Step and repeat.

Image - https://www.mtmckinley.net/SimplyMaya/pivot.jpg
Video - https://www.mtmckinley.net/SimplyMaya/cubeRotate.avi (100k)
Maya 5.0 file - https://www.mtmckinley.net/SimplyMaya/rotate.mb (45k)

# 5 23-12-2003 , 01:06 AM
3djoe's Avatar
Subscriber
Join Date: Nov 2002
Location: CT USA
Posts: 567
damn Mike I will have to remember that.
Good tip. I would have done it with locators.:p


Never Do Today What You Can Put Off Till Tomorrow..
My New Site MayaFx.com
# 6 23-12-2003 , 01:15 AM
LeoGeo's Avatar
Registered User
Join Date: May 2002
Posts: 21
wow, thanks everyone! user added image

# 7 23-12-2003 , 01:16 AM
dannyngan's Avatar
Registered User
Join Date: Dec 2002
Location: Seattle, WA
Posts: 1,154
Well, you learn something new everyday. user added image

I still like keyframing by hand. Zero setup time. user added image


Danny Ngan
Animator | Amaze Entertainment
my website | my blog | my job
# 8 23-12-2003 , 01:32 AM
kbrown's Avatar
Moderator
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
:bow: :headbang: user added image


Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
# 9 23-12-2003 , 01:36 AM
3djoe's Avatar
Subscriber
Join Date: Nov 2002
Location: CT USA
Posts: 567
it goes to show you there is 110 ways to get something done in maya:p


Never Do Today What You Can Put Off Till Tomorrow..
My New Site MayaFx.com
# 10 23-12-2003 , 02:18 AM
mtmckinley's Avatar
The Maya Mountain
Join Date: Aug 2002
Location: Seattle, WA
Posts: 8,245
Glad to help. user added image

# 11 23-12-2003 , 09:29 AM
-<{ JB }>-'s Avatar
Subscriber
Join Date: Jul 2002
Location: Western Australia
Posts: 510
This is all really cool...... but how does a REAL cube roll on the floor in the first place? I mean, for a cube to "roll" it bounces from edge to edge or corner to corner - the faces don't all touch the ground one after the other. Either that or it slides instead of "rolling". I guess it could be acheived using trickery with moving internal weights.


Take a glance at my <a href="https://forums.simplymaya.com/showthread.php?s=&threadid=9428"><b>Porsche 959</b></a> WIP
# 12 29-12-2003 , 01:20 AM
dannyngan's Avatar
Registered User
Join Date: Dec 2002
Location: Seattle, WA
Posts: 1,154


Danny Ngan
Animator | Amaze Entertainment
my website | my blog | my job
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