Order of transformation

Order of transformation specifies in what order transformations (scaling, rotation, and translation) are applied to an object.
Depending on the order of transformation, the same transformation values may yield different results. (See the example below.)

No trnasformation
 
Rotate along the z-axis by 45 degrees
 
Scale along the y-axis
by 0.5
 
 
 
 
 
 
 
 
No trnasformation
 
Scale along the y-axis
by 0.5
 
Rotate along the z-axis by 45 degrees



Some 3D applications (e.g., Maya) do not allow the user to change the order of transformation, which is inconvenient in some cases. For example, when you are making an animation of a textured ball which is rotating and stretching/squashing while bouncing, you want to rotate the ball before you stretch or squash it by scaling it. (See the top row in the example above.) Maya applies transformations in the fixed order -- scaling, rotation, and translation. (The bottom row in the example above.) To force a certain transformation order in Maya, you build a hierarchy of transform nodes and use each node for one of the transformations.


A problematic example of a bouncing ball

  1. Let the start time and end of the playback range be 0 and 150 respectively.
  2. Create a sphere by Create -> NURBS primitives -> Sphere.
  3. Select the default name "nurbsShpere1" in Channel Box by dragging LMB (it will be highlighted with dark blue) and rename it "ball".
  4. Create keys for translation at frames 0, 20, 40, ..., where the ball is at the highest position in the air in each bouncing cycle.
  5. Create keys for translation at frames 10, 30, 50, ..., where the ball is at the lowest position and hitting the invisible surface.
  6. Create keys for scaling at frames 0, 20, 40, ..., so that the ball's shape is restored to its natural state (i.e, the scaling factors are 1, 1, 1).
  7. Create keys for scaling at frames 10, 30, 50, ..., so that the ball is squashed (e.g., the scaling factors are 1.2, 0.7, 1.2)
  8. Create keys for rotation at frames 0 and 150 so that the ball rotates 720 degrees around Z.

The squash does not look right because the order of transformation in Maya is scaling, rotation, and translation, no matter in what order you set up the channels for scaling, rotation and translation. We need to rotate the ball first and then scale and translate it.

Notes:


Correcting the problem with use of transform nodes

  1. Create a sphere by Create -> NURBS primitives -> Sphere.
  2. Select the default name "nurbsShpere1" in Channel Box by dragging LMB (it will be highlighted with dark blue) and rename it "ball".
  3. Create a group containing "ball" by Ctrl+g. The group is named "group1". Rename it "ball_rotate".
  4. Open Hypergraph by Window -> Hypergraph... to see "ball" and "ball_rotate".
  5. Create another group that contains "ball_scale" by selecting "ball_scale" and Ctrl+g. Rename the group "ball_rotate". (It can be renamed in Channel Box or Hypergraph. In Hypergraph, select the group with RMB down and select "Rename".)
  6. Create one more graph that contains "ball_rotate" by selecting "ball_scale" and Ctrl+g. Rename the group "ball_translate".

The hierarchical structure should be...

  1. Select "ball_rotate" and set up z-channel for rotation. Make sure that "ball_rotate" is being selected in Hypergraph, while setting up rotation.
  2. Select "ball_scale" and set up channels for squash. Make sure that "ball_scale" is being selected in Hypergraph, while setting up scaling.
  3. Select "ball_translate" and set up channels for translation. Make sure that "ball_translate" is being selected in Hypergraph, while setting up translation.

The squash should look better this time because Maya is forced to apply rotation, scaling, and translation to the ball in that specific order. It does not matter in what order you set up the channels for scaling, rotation, and translation.

The animation is not done yet. Squash happens in a much shorter amount of time, e.g., in 1 frame. You need to add more keys and edit interpolation between keys to finish the animation.