- [Instructor] In the chapter on cameras,
we saw the importance of gimbal coordinate system
and the priority of rotation axis.
Now we need to revisit that.
Anytime we build a hierarchy,
we need to make sure that we set up the axis order
to get predictable rotations.
And we always animate in gimbal coordinates.
With the rotate tool active
and reference coordinates set to local,
I'll select this shoulder right object,
and we can see that the pivot point is aligned
with the geometry.
Well, let's go deeper.
I'll right click on that rotate tool,
and that will give us the transform type in dialogue.
If I rotate the object in its local coordinates around,
for example the X axis, we don't see any change
in that transform type in dialogue.
Release the mouse and these values are still at zero.
Okay, I'll undo that with Control + Z.
The fact that those local values are always zero
can be a bit unsettling at first,
but it makes sense if you think about it.
The object is always going to be rotated zero degrees
relative to itself.
It can only be rotated to some angular value
relative to something else, and that is usually its parent.
When we rotate in local mode we are offsetting the rotations
according to a temporary point of reference,
which is the objects pivot point.
And if we click and drag on these spinners in local mode
we'll see that offset happening,
but when we release the mouse, it snaps back to zero.
Okay, I'll undo that with Control + Z.
So when we rotate in local mode
we're just offsetting the rotations
according to a temporary point of reference,
which is the object's pivot point.
But that's not necessarily the orientation
of the animation channels that drive the rotation.
So without getting too technical, we can illustrate this.
If we just switch over
to a different reference coordinate system such as world
and then rotate in the view port around the X axis,
and we see in the transform type in dialogue
all three X, Y, and Z values are changing.
Although it looks like I'm only rotating around one axis,
in reality, all of the rotation channels are being adjusted.
And this can be problematic
because you won't be able to control your animation.
Objects can spin wildly out of control
and you won't know why.
It's because you're not actually rotating
in the direction you think you are.
It looks like you're rotating around X,
but if your point of reference
is not the true space of the object, then in reality,
you could be rotating around two or three axis,
and this will happen whether you're in world mode
or local mode or any mode other than gimbal.
That is the true rotation space of the object.
I'll undo those rotations with Control + Z,
send that back where it was.
Switch over to gimbal reference coordinate system.
And now if I rotate around X,
I'll see in the transform type in dialogue,
only the X value is changing even when I release them mouse,
we'll see that the Y and Z axis have not changed.
Okay, I'll undo that also with Control + Z.
Gimbal mode is critical for animated rotations.
You'll notice that although only one axis
updates in the angular values,
the rotation axis themselves can move
relative to one another.
If I rotate around gimbal Y then we'll see the X axis,
the red circle is following my rotation.
I'll undo that with Control + Z.
What we just saw is an indicator of an internal hierarchy
to the rotation axis.
Some of the axis follow others in an order of operations.
It's not a chronological order,
it all happens simultaneously.
It's an order of internal calculations.
And we can optimize that
so that we can control the rotations
for a particular object, such as a shoulder joint.
You'll need to experiment with rotation order
to find which one is best for a particular situation.
Rotation order is set in the motion panel.
In the command panel, click on the circle,
looks like a little wheel,
and in the motion panel in the PRS parameters rollout,
click the button at the bottom labeled rotation.
And that exposes the oiler parameters rollout
where we can choose an axis order.
As I said, you'll need to experiment
but I've done so already.
And I established the optimal axis order in this case,
I want to make sure that it behaves like a natural shoulder
and the best rotation order for that is Z, X, Y.
I'll choose that from the pull down list, here it is Z, X, Y
and that caused the object rotation to change in the scene.
The actual numerical values didn't change,
but the order in which those values are calculated,
did change, and that affected the end result.
We can fix this very easily.
We can go into angle snaps and in the front view port,
right click in that view and just
rotate that object in the Y axis,
looks like it's going to be a 20 degree rotation,
release the mouse.
And now that's been sent back to where it was.
Okay, I'll disable angle snaps
to illustrate that we've now optimized the rotation order.
Back in the perspective view let's get in close,
Control + Alt in middle mouse, and if I rotate around X,
we see that the Z axis follows the blue circle is rotating.
Well, the Z axis is not very important in a shoulder.
Human beings have very little freedom in that Z axis.
We can twist a shoulder a little bit, but not very much.
And that's why it should be the least important
of the axis.
I'll undo that with Control + Z.
If we rotate around the Y axis, the green circle,
we see that the X and Z a axis, both follow.
That's what I want, because then
we're able to swing the arm forward
by rotating in the X dimension around the X axis.
All right, I'll undo those rotations with Control + Z.
I set this up so that the most important axis is Y,
and then X is the next one in the priority
and Z is the least important.
And we need to repeat that process
for all the other rotating objects.
Figure out what their optimal axis order is,
and set that priority
before creating any a parent child links.
That's how to use gimbal rotation mode
and set the axis order
for the optimal priority of rotations.