Redesign the motion system (Arbitrary rotation orders)

 Click here to expand Table of Contents...


Introduction

LightWave's rotation orders have always been fixed to HPB - Heading, Pitch, Bank. This can cause a problem called Gimbal Lock where two of the three axes are on the same plane. As an example to demonstrate:

Here we have a model of an arrow, pointing in the +Z direction

Once it is rotated 90° up in the Pitch we can see that the Heading and Bank axes are in the same plane.

LightWave 2020 introduces the possibility to change Rotation Order per item, and saved with the scene file. Some of the reasons you might want to change rotation order:

  • From experience with other applications you are more comfortable working with a different rotation order than LightWave's native HPB order
  • You are using motion data baked with a rotation order that isn't HPB
  • Interchange with applications which use a different rotation order than HPB
  • The thing you are animating has its rotations more naturally described with a different rotation order
  • Some gimbal lock situations can be avoided, as an example repeat the example above. Gimbal lock because H and B are on the same plane. Switch order to HBP, and no gimbal lock at a Pitch of -90 or +90 degrees (of course HBP does have gimbal lock, but on a different axis to HPB)

Rotation orders are not keyframed, so no you can't change them partway through an animation. You can change the rotation order at any point, so it isn't forever locked in stone if you change it. Changing the rotation order will not change the heading/pitch/bank rotation values. It will only change the order in which they are evaluated. So changing the rotation order will change the orientation of the item. Choose wisely before setting up the animation of the item.

Usage

The rotation order for an item is set in the Motion Options window (M). Under the dropdown for SplineControl there is a new menu for different rotation orders giving their XYZ and LightWave-style (HPB) names, as follows:

  • XYZ / PHB - Maya standard?
  • YZX / HBP
  • ZXY / BPH - Unity standard?
  • YXZ / HPB - LightWave default
  • XZY / PBH
  • ZYX / BHP

The Numeric Adjustment Controls in the lower left corner will update to show the correct heading.

The Rotation gizmo for the item has different sizes for the three circles, the largest or outer is the first to be evaluated. The colors for the rings are always the same too:

  • Red - Y / Heading
  • Green - X / Pitch
  • Blue - Z / Bank

If you use the Same As Motion controller on rotation, it will convert between rotation orders to maintain shared direction.

There is a small trap when using different rotation orders with bones.

Bones are aligned along the +Z axis. The bank angle is the rotation around the Z axis, and is used by bones for twisting. The heading and pitch are for aiming the bone. This works fine with HPB order, as the bone can be aimed anywhere with H and P, and then independently twisted with B.

But in some rotation orders this is impossible. Specifically, HBP and PBH. In those rotation orders, a non-zero bank angle actually makes it impossible to aim the Z axis in some directions.

(Exercise for the reader: create a null with HBP rotation order; set bank to 45 degrees; then try to make the Z axis point straight up or down using only H and P).