- [Instructor] In the previous movie,
we saw the importance of using Gimbal coordinate system
when rotating a free camera.
Now let's go a little bit deeper and talk
about rotation axis order.
That will allow us to emulate the mechanics
of a real world tripod.
Gimbal mode accurately represents
the complex interaction of rotational axis.
These are what's known as euler angle rotations.
EULER.
Named after the mathematician who developed this system.
The three rotation axis are calculated sequentially
in a particular order,
that results in a kind of inheritance
in which the orientation of the rotational axis
depend on one another.
So to illustrate,
I'll choose a rotate tool
and go into Gimbal reference coordinate system
and select the camera in the view port.
If I rotate around a particular axis,
the other axis may or may not inherit
that rotation depending upon the rotation priority.
For example,
if I rotate around the green y-axis in gimbal mode,
we see that the red x-axis actually follows it
but the blue z-axis does not.
And that's because of the rotation order.
Behind the scenes,
these rotations occur one at a time
and they influence one another in sequence.
With the default rotation order of X, Y, Z,
first we rotate in X,
then in Y and finally in Z.
The later rotations have a greater effect
over the end result.
And so they're said to have a higher priority.
You can also think of a later rotation
as being the parent of an earlier one.
If the rotate order is X, Y, Z,
then Z has the highest priority.
Another way of thinking of that
is that the z-axis is the root of the whole system.
If we rotate around the blue z-axis
we see that the other two axis follow.
X has the lowest priority.
If we rotate around the red x-axis
we see that neither one of the other two axis follow.
And if we rotate around the green y-axis,
we see that X inherits from Y
but Z does not inherit from Y.
Okay I'll restore these rotations back to neutral.
So the X value to 90 degrees press tab,
set Y to zero,
press tab and set Z to zero as well.
So knowing that these access rotations
actually affect one another,
we can now set up the rotation order
to emulate a tripod.
For a tripod,
pan is the most important access followed by tilt,
and finally the Dutch tilt or roll,
which is rotation along the line of sight.
In Gimbal reference coordinates,
pan is Z which is the blue axis here.
Tilt is X, which is the red axis.
And roll is Y, the green axis.
Remember that the lowest priority rotation
is calculated first.
That tells us that the optimal rotation order
for a max camera is Y first which is roll,
followed by X or tilt and finally Z or pan.
Y, X, Z.
Okay, so let's set that up.
We'll change the rotation access order.
That will be found in the motion panel.
We haven't seen that one yet.
It looks like a little circle or wheel in motion.
Within the motion panel,
we want to be in the parameters subpanel.
And there's a rollout here labeled PRS parameters.
Position, rotation and scale.
At the bottom of that rollout
we have buttons for position rotation scale.
We want to click on rotation
to reveal the rotation parameters.
And we see euler parameters and the access order.
Let's click on that pull down list
to reveal all the options.
We're looking for Y, X, Z.
And it is actually in the list here Y, X, Z,
but ironically we don't want to choose Y, X, Z.
And that's because Max uses a different naming convention
which is based on a mobile frame of reference.
Now unfortunately,
this gets very difficult to explain
without a huge detour into a long
and complicated geometry lesson.
But Max uses the mobile naming convention
where the orientation of the frame of reference
is reevaluated between each operation.
The optimal order for a camera
using this mobile naming convention is actually Z, X, Z,
the one at the bottom here.
This does not mean that Z is being rotated twice, it isn't.
What would've been a Y rotation relative
to the fixed frame is now a Z rotation relative
to the mobile frame.
So changes over to Z, X, Z.
And changing the access order
changes the outcome of calculations.
The X, Y and Z rotation values
in the transform type-in area didn't change.
But the end result did
because we're performing those rotations
in a different order.
The camera is now pointing straight down.
So let's fix this.
We'll set the X value to zero,
press tab,
set the Y value to 90 and press enter.
And now we're back where we were
with a level horizon line.
Now we've got the optimal rotation order for a tripod.
The Z or pan axis is the most important one here.
And we see that the other two axis follow.
X is the tilt axis.
And that's the next most important one.
And we see when we tilt, the pan axis doesn't change.
However, the Dutch tilt or canted angle rotation
which is the Y axis shown in green,
does follow the tilt axis.
And finally we can introduce a Dutch tilt
in the least significant axis
or the lowest priority axis,
which is the green y-axis.
We rotate around Y,
we don't see the X and Z axis change or follow.
Okay.
We can restore this back to neutral.
Take a look at the values we see down here
in the transform type-in area.
If we set the y-axis to 90 degrees,
we'll see that it actually changed the tilt operation.
This gets a little bit confusing.
When we see if we tilt down around the gimbal x-axis,
we're actually changing the world y-axis.
So again this gets a little bit difficult
to explain but we're actually rotating
in the world coordinate system
but we're using the gimbal mode
in order to affect those rotations.
The values we need to plug in to restore the object
to a neutral rotation might not make
a lot of sense initially,
but you just need to know
that the world X value should be zero.
The Y value should be 90 and the Z value should be zero.
And that restores us back to neutral rotations.
That's how to set up the optimal rotation order
for a free camera to emulate the mechanics
of a real world tripod.