Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Maya Basics & Newbie Lounge (https://simplymaya.com/forum/forumdisplay.php?f=31)
-   -   How to keyframe the position of a pivot? (https://simplymaya.com/forum/showthread.php?t=9509)

LeoGeo 22-12-2003 09:10 PM

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.

http://server5.uploadit.org/files2/2...ivot122203.jpg

3djoe 22-12-2003 09:28 PM

I am not sure you can.
But why not put locators in the corners and key using the 4 locators.

dannyngan 22-12-2003 10:22 PM

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. :)

mtmckinley 23-12-2003 12:33 AM

You CAN key the pivot point. ;) 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 - http://www.mtmckinley.net/SimplyMaya/pivot.jpg
Video - http://www.mtmckinley.net/SimplyMaya/cubeRotate.avi (100k)
Maya 5.0 file - http://www.mtmckinley.net/SimplyMaya/rotate.mb (45k)

3djoe 23-12-2003 01:06 AM

damn Mike I will have to remember that.
Good tip. I would have done it with locators.:p

LeoGeo 23-12-2003 01:15 AM

wow, thanks everyone! :D

dannyngan 23-12-2003 01:16 AM

Well, you learn something new everyday. :D

I still like keyframing by hand. Zero setup time. ;)

kbrown 23-12-2003 01:32 AM

:bow: :headbang: :D

3djoe 23-12-2003 01:36 AM

it goes to show you there is 110 ways to get something done in maya:p

mtmckinley 23-12-2003 02:18 AM

Glad to help. ;)

-<{ JB }>- 23-12-2003 09:29 AM

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.

dannyngan 29-12-2003 01:20 AM

Bah, who cares about reality. A cube rolls because I make it roll. :D

Roll, cube, roll!!!


All times are GMT. The time now is 11:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018