Changing the Bones' Order of Rotation

 
 
 

When you're setting up a character, you should consider how the bones will be rotating for each body part so that you can choose the proper rotation order for them. While the default order of XYZ works for some body parts, there are certain body parts or movements that can cause gimbal lock with XYZ, but not with another rotation order.

Gimbal lock is a state that Euler angles go through when two rotation axes overlap. The angle values can change drastically when rotations are interpolated through it.

To change a bone's order of rotation

  1. Select the bone.

  2. Press Ctrl+K to open its Local Transform property editor.

  3. On the SRT page, select one of the Rotation Order options for control over the order in which a bone is rotated about its parent's X, Y, and Z axes.

    See the section below to determine which is the best order for the bone.

Figuring Out the Rotation Order

To help you figure out what the rotation order for a bone should be, it's best to start with the skeleton in a neutral pose with the bone's rotation at 0 (see Creating Neutral Poses for Skeletons). Then start posing the skeleton with its most common movements to see where problems can occur.

Mapping the XYZ axes to movement type (such as flexion/extension, medial/lateral, abduction/adduction) can also help to reveal the most useful rotation order. Usually one type of movement will usually be dominant: its axis is the one that you want to be last in the rotation order so that it won't be affected by the other axes.

For example, let's compare the XYZ and YZX rotation orders on the humerus bone (biceps) in an arm. With the XYZ order:

  • X twists the biceps, which is not that useful in many cases.

  • For arms resting at a character's side, the Z and X approach gimbal lock.

  • The back and forth swing of the arm is not easy to animate in FK.

Now by making X the last in the rotation order, the X can be used for animating the back and forth swing an arm has when a character is running or walking. Making it the last also means that the swing axis never changes, which it rarely does because it's determined by the shoulders.

Meanwhile, Z and Y can still move appropriately:

  • Z is natural for medial/lateral movements, like the swing in a punch.

  • Y is used for raising and lowering movements. Raising/lowering is usually a much more deliberate movement that comes more from flexing the shoulder muscles. It tends to move along with back and forth or medial/lateral movements, so it makes sense to have it first in the order.

So after analyzing the character's movements, YZX seems like the best choice for animating the humerus.

Preventing Gimbal Lock

To prevent gimbal lock, there are a few different ways in which you can change a bone's rotation order.

  • When you set up character a rig, you can align the chain's root with the first bone and set the bone's rotation order to ZXY or YXZ instead of the default XYZ. Then the middle rotation (X) (which causes gimbal lock) is on the least-used rotation (that is, rotating along the length of the bone).

  • If an object needs to rotate only along one axis, change the order of axis to match it; that is, if the object is rotating around the Y axis, change the order of axes to YZX.

  • If an object is rotating on two axes, change the order of axes to correspond with the first and last axes; that is, if the object is rotating around the X and Y axes, change the order of axes to XZY.

  • In addition to changing the rotation axes order, you can also convert the rotation angles from Euler to quaternion. Quaternion rotation angles produce smooth interpolation to help prevent gimbal lock.

    For more information, see Animating Rotations [Animation].

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License