Animated rotation in Maya
 
 
 

When you keyframe an object’s rotations, Maya calculates the object’s orientations between keys by interpolating the rotation values from one key to the next. In Maya, there are two methods of rotation interpolation: Euler and Quaternion. For each animated rotation in your scene, you can specify a rotation interpolation method. The rotation interpolation method you choose for an animated object determines how Maya calculates its rotations. For more information on Euler angles and Quaternions, see Euler angles, Quaternions, and Which type of interpolation is right for your animated rotations?.

Euler rotation is the default method of rotation interpolation unless otherwise specified. You can set the default rotation interpolation method for new curves in the Maya Preferences window (in the Animation section under the Settings category when you select Window > Settings/Preferences > Preferences) or you can set the rotation interpolation method of existing rotation curves from the Graph Editor. See Set rotation interpolation for curves.

Euler angles

When interpolating the animated rotations of an object using the Euler method, Maya uses Euler angles to determine the object’s axis-specific orientations over time. Euler rotations are calculated using three separate angles representing rotations about the X, Y, and Z axes, and an order of rotation.

The rotation order specifies the order in which an animated object is rotated about its X, Y, and Z axes. Changing an animated object’s rotation order changes its final orientation. You can specify the order of rotation for an object by setting its Rotate Order attribute. For example, if you set an animated object’s Rotate Order to YZX, the object will first rotate in Y, then Z, and finally X. You can use the Rotate Order attribute to match the rotation order of imported, animated objects to the co-ordinate systems (for example, XZY opposed to Maya’s default XYZ) of the 3D software packages from which they came. This is important if you want the animated rotations of your imported objects to appear as intended.

In Maya, the default method of rotation interpolation is Euler.

There are 2 kinds of Euler rotation interpolation in Maya: Independent and Synchronized. You can set the Euler rotation interpolation type for your curves from the Graph Editor. See Change Rotation Interp.

For Independent Euler curves, interpolation is calculated from key to key on each individual curve, independent of the their neighboring rotation curves. Use Independent Euler curves when you want to keyframe a single rotation channel or when you need to add additional keyframes (and thus detail) to a single rotation curve. Independent Euler curves are ideal for simple, animated rotations.

All the keyframes on Synchronized Euler curves are locked together in time. This means that if an object has Synchronized Euler rotation curves, interpolation is calculated from key to key on all of its rotation curves simultaneously. Use Synchronized Euler curves when you want to keyframe multiple rotation channels (X, Y, and Z) or when you need to add additional keyframes (and thus detail) to all the rotation curves of an animated object. Synchronized Euler curves are ideal for more complex animated rotations.

The main difference between Independent Euler and Synchronized Euler curves are their keyframes. For example, moving a key in time on an Independent EulerRotate X curve moves only the key on the Rotate X curve, whereas moving a key in time on a Synchronized Euler Rotate X curve will also move the corresponding keys on the Y and Z curves. Similarly, if you key only the Rotate X channel for an animated object, and the rotation interpolation type is set to Independent Euler, then only the Rotate X channel is keyed. However, if the rotation interpolation type is set to Synchronized Euler, then all three (X, Y, and Z) Rotate channels are keyed.

When Euler angles are used to interpolate the animated rotations of an object, the object’s orientation about its individual axes is evaluated one axis at a time. This is why Euler-angled rotation is prone to artifacts such as gimbal lock and flipping. Gimbal lock occurs when rotations about a single axis cause unwanted rotations about complementary axes or when axes become coincident. Flipping occurs when angles unexpectedly wrap around positive or negative 180 degrees during Euler-angled rotation interpolation between keyframes.

If gimbal lock or flipping occurs, you may be able to correct this behavior using the Euler Filter. For example, you can use the Euler Filter to normalize the mangled rotation curves from corrupted motion capture animation data. You can access the Euler Filter from the Curves menu in the Graph Editor or Dope Sheet. For more information on the Euler filter, see Euler angle filtering and filterCurve.

When should I use Euler rotation interpolation?

Use Euler rotation interpolation when you want specific control over the numerical values of your rotations and when you want smooth tangents for your rotation curves. In most cases, you should only use Euler rotation interpolation for rotation animation curves that you need to manipulate extensively in the Graph Editor. Unlike Quaternion curves, Euler curves support all tangent types and their keys possess tangent handles that let you easily tweak the curves.

Quaternions

Quaternions provide smooth interpolation of animated rotations and always produce the most efficient path between keyframes in comparison to Euler angles. Quaternions store the overall orientation of an object rather than a series of individual rotations. This means that a single Quaternion stores the same amount of rotation data as three Euler angles. Since Quaternions store only orientation values, they can be used to calculate the shortest rotation from one orientation to another.

When animating an object’s rotations with Synchronized Quaternions, Maya first stores the keyed orientation values for the object as Euler angles, converts them to Quaternions for interpolation, and then converts the interpolated Quaternion rotation values back to Euler angles for display in the Channel Box and Graph Editor.

In Maya, Quaternions are displayed as SynchronizedEuler curves and values. When an object’s rotation curves are synchronized, the keyframes on its RotateX,Y, and Z curves are locked together in time. When you add, delete, or move a keyframe on one of the object’s rotation curves, the corresponding keys are also updated on the related rotation curves. This eliminates unexpected interpolation problems that can occur when keyframes are deleted from one of the axes, or when keys are moved independently in time.

The tangent settings for Quaternion curves affect how an object’s animated rotations are interpolated. For more information on tangent types, see Tangents menu. Maya uses the following types of tangents and interpolation to calculate the shortest rotation from one key to the next:

When blending animation clips in the Maya®TraxEditor, you can select one of the following types of Quaternion rotation interpolation: Quaternion Shortest or Quaternion Longest. Quaternion Shortest interpolation uses Quaternion interpolation to find the shortest path between rotations from one clip to the next. Quaternion Longest interpolation uses Quaternion interpolation to find the longest path between rotations from one clip to the next. This path is in the opposite direction of Quaternion Shortest.

You can specify a clip blend’s Quaternion rotation interpolation type from the Attribute Editor by setting the blend’s Rotation Blend attribute.

When should I use Quaternions?

Use Quaternions when you want smooth interpolation between two keys. Quaternions produce the most efficient paths of interpolation and they do not generate artifacts such as gimbal lock and flipping.

Warning
  • It is difficult to isolate, view, and edit Quaternion curves in the Graph Editor.
  • Quaternion curves do not support tangent handles and only work well with linear tangents.

Which type of interpolation is right for your animated rotations?

Each method of rotation interpolation has its advantages and disadvantages. It is up to you to select the type of interpolation that best suits your animation. See When should I use Euler rotation interpolation? and When should I use Quaternions?.

  Euler angles Quaternions

Advantages

  • Easily create simple rotations around a single, primary axis.
  • Support spin (rotation >360°)
  • Treat IN and OUT tangents independently
  • Smoothly interpolate rotation from one orientation to the next
  • Do not suffer from Gimbal Lock or flipping

Disadvantages

  • Are prone to Gimbal Lock and flipping
  • Create rotations that are difficult to predict because interpolation is calculated separately for each rotation axis
  • Do not support spin (rotations >360°)
  • Curves are difficult to visualize
  • Do not support tangent handles
  • Tangents are difficult to view and edit in the Graph Editor and are not treated independently
Note

Whether your object’s rotations use Quaternions or Euler angles, the Channel Box will always display Euler angle values.