Here is where is starts to get a bit more complicated. Let me dispel a myth first, there is no such thing as a local rotation in any piece of 3D software. 3DS Max 4 added a rotation controller called Local Euler XYZ, this was really a bit deceiving as all it really did was reverse the order of the calculation of the axes and there was nothing local about it. Rotations are calculated the same way that positions are, as an offset from the parent object. This can make it difficult to visualize in numbers and function curves. Lets get into how rotations are calculated using the default Euler XYZ controller to start with.
Euler XYZ controllers:
The Euler controller is the most common method for working with rotations. I will write Euler values in this format, [x,y,z]. Animators like Euler rotations because they display functions curves that represent the three axes of rotation and allows for easy editing of them. The problem is that they don't always represent what we want to see. The default Euler controller works by adding up X then Y then Z to calculate the final rotation (x + y + z = rotation). Once again this is based on the parent objects orientation. To help illustrate it create a Box in the top view port and align it's position to [0,0,0] world space using the Transform Type-In dialog. Change the Reference Coordinate System to parent, this will be the same as world since we don't have a parent object. Open the Dope Sheet editor and watch the values of the rotations as we change them. First rotate the box in the X axis 45 degrees, the Dope Sheet will read [45,0,0]. Rotate the box 45 degrees in the Y axis and the Dope Sheet will read [45,45,0]. Finally rotate the Z axis 45 degrees so that we have [45,45,45]. So far every thing looks very simple, we have rotations being calculated in parent space and the numbers are what we would expect. Here is where it gets tricky and a little hard to understand when you are animating. Lets go back and rotate the X axis another 45 degrees, you might think that we would end up with [90,45,45] but we don't, the final value looks something like [75.3,8.4,59.6]. Because the axis order is XYZ any time the X or Y axis are changed the others have to recalculate to solve the final rotation. If you rotate the Z axis you see that only the Z value changes, this is because it is the last in the order and it doesn't affect the value of the others. The best way to see what is actually happening is to set the Reference Coordinate System to Gimbal and then do these steps. Start the boxes orientation at [0,0,0] and rotate in Y, 90° and notice how the X axis aligns to the Z axis. If you wanted to rotate the Box 90° in the X axis using the Gimbal mode it is the same as rotating the z axis.
 
This is why animated rotations will often not in-between between keys the way that you might like. If you were animating in any of the other coordinate spaces you would be able to rotate the object around the X axis without rotating the z axis. The problem is that any other coordinate space is just for visual purposes so the gimbal rotation has to try and find a solution that will give you the result that you want. To test this lets animate the box. Reset the rotation of the box to [0,0,0]. Set the Reference Coordinate System to world. Turn on Auto Key and move the time slider to frame 10. Rotation the box 90° in the Y axis. Move the time slider to frame 20 and animate the box 90° in the X axis. To make sure that the functions curves are not overshooting the animation on the box, select all the keys in the track bar then open the Mini Curve Editor and set the tangents to linear. Move the time slider between frame 0 and 20 now. Notice that the animation from frame 0 to 10 is what you would expect but from 10 to 20 the box doesn't rotate only around the X axis. To see why set the Reference Coordinate System to Gimbal and move the time slider between frames 0 and 20 again. To solve the rotation the Z axis had to rotate 90° and the X and Y axis had to rotate -90°. This is what is causing the unwanted rotation between frame 10 and 20. How do you change this behavior? You can't really you just need to know that it is there and learn to work around it. There are a few tricks that can make it more understandable while animating but I will cover those later.
 |