How to center the pivot correctly?

How to center the pivot correctly?

Glaums
Contributor Contributor
2,429 Views
6 Replies
Message 1 of 7

How to center the pivot correctly?

Glaums
Contributor
Contributor

Hello fellow modelers,

 

I have to animate a cylindrical object along it's vertical axis. The object is part of some biger model I imported. Unfortunatly the object is rotated in every of the three axe, but the pivot is set to orthogonal axes of the grid for "world" and "object". I edited the pivot manualy (not an easy task with three rotations out of line) to allow me, to spin the object along it's vertical axis. Unfortunatly only the handel is changed this way, not the math behind. When I rotated the object, the numbers in all three rotation channels changed, resulting in a wobbling animation. So I put the object back to the center, oriented it's vertical axis to be even with the y-axis and freezed the transformation. At first glance it seemed to work. Rotating around the vertical axis changed the numbers in only one channel. But as soon as I tilted the object a little bit and tried again to rotate around the vertical axis in the object mode, again all three channels changed is numbers and the object wobbled around.

 

So my question is: Is there any way to orient the pivot along one of the edges of an object and achieve this not only for the handle but for the object orientation itself?

 

Hope you can give me a hint. Seems like an very easy task, but I just don't get it done.

 

Scoon

0 Likes
2,430 Views
6 Replies
Replies (6)
Message 2 of 7

brentmc
Autodesk
Autodesk

Hi,

You can snap the pivot to verts, edges and faces of the object in pivot editing mode. You can also hold Shift to snap the position only and Ctrl to snap orientation only.

So to orient the pivot based on an edge tap D to enter pivot editing mode and then Ctrl+click on the edge you want to orient the pivot to.

When you have the pivot setup the way you like you can use Modify < Bake Pivot to bake the pivot position/orientation into the object's transform channels

Note: Maya's transform pivots are positional only which is why the bake step is necessary..

Brent McPherson
Principle Engineer
Message 3 of 7

Glaums
Contributor
Contributor

Thank you very much for your quick respond! This seems to be what I was looking for. Unfortunatly it doesn't work for me. On the one hand SHIFT and CTRL doesn't result in any snaping to any position or orientation. Probably it's because I use a Mac. The only snaping that worked for me so far is pressing V for snap to point and X for snap to grid. On the other hand baking the pivot doesn't solve the problem, that all three channels have their value changed, when tilt the object and then rotate it along it's vertical axis.

 

A short annotation aside: When I Freeze Transformations and Bake Pivot the Translate Channels get some values, although I didn't move the object or the pivot out of the center.

0 Likes
Message 4 of 7

brentmc
Autodesk
Autodesk

Hi,

It shouldn't matter whether you are on a Mac when it comes to pivot snapping. I've included links to the help page for pivot editing and another post where I have posted a GIF showing how to align something using pivot snapping.


Second, the fact all three channel change when you rotate the object is unavoidable and just the way rotation math works.

If you want to manipulate individual channels without affecting other ones you can change the axis orientation to "Gimbal" in the rotate tool settings. This mode will allow you to rotate each rotation channel without affecting the other ones. However, in this mode you will notice that the axes are not orthogonal (at right-angles to each other) and dragging the Y axis affects the X axis and similarly rotating Z affects the X & Y axes.

Finally, to answer your bake/freeze question. Maya's transform has special channels to hold the pivot position which are represented as translations so that could be what your are seeing in the translation channels though it is unclear to me the steps you took to produce that.

Brent McPherson
Principle Engineer
Message 5 of 7

Glaums
Contributor
Contributor

Hi Brent,

 

you were right and I can't even tell, why I didn't get it to work the first time. I have to admit I wasn't even aware of the function to skip/orient the pivot with this method, but it's great to know now! Thank you!

 

But there is still the issue why I started this topic. You wrote "...the fact all three channel change when you rotate the object is unavoidable and just the way rotation math works." and I have no doubt that you are right. What I meant, is the fact, that, if you create an object, tilt it to one side and then spin it around it former up axis in the Axis Orientation: Object, you get a clean rotation and only one channel changes it's values (no matter what math is working in the dark). If I try this with the imported object, all channels are changing it's values, resulting in a wobbling spin. I adjusted the pivot for all axis orientations and still it happens. Do you know what I mean?

0 Likes
Message 6 of 7

brentmc
Autodesk
Autodesk

Hi,

Could you upload a Maya ascii scene file (.ma) and a short video that shows the wobbling behaviour you are describing?

Thanks.

Brent McPherson
Principle Engineer
0 Likes
Message 7 of 7

Glaums
Contributor
Contributor

Alright, while doing the scene I had to realize, that in fact even with new objects the same issue occured. It seems to be dependend on the fact wich axis I use in the first place to tilt the object. If I use the z-axis, everything works fine. Using the x-axis results in the wobbling I was talking about. The workaround seems to be using different groups for tilting and spinning, but in my scene even this won't work, cause new created groups have alraedy pivots, that don't match with the grid. It seems like the object is transfering it's orientationvalues to the group above. It seems that I can't really change the pivots orientation of an object, cause whenever I do it define the changed orientation to custom. It's kind of frustrating to struggle with what seems to be a basic function.

 

Edit: Ok, after some trial and error I found, that there was something going on with the groups. For some unknown reason to me, the groups I created by myself under the maingroup of the imported model, had already some influences. Now, that I cleaned it up, the solution to use several groups for the animation works. Doing this I also realised, that the snap and orientation functions doesn't work with pivots of groups (unfortunatly).

0 Likes