FBX and Maya
Here is how FBX SDK and
Maya compute the transformation matrix for a node:
WorldTransform =
ParentWorldTransform * T * Roff * Rp * Rpre * R * Rpost * Rp-1
* Soff * Sp * S * Sp-1
Where this term: |
Is a 4 x 4 matrix that contains: |
WorldTransform |
Transformation matrix of the node |
ParentWorldTransform |
Transformation matrix of the parent node |
T |
Translation |
Roff |
Rotation offset |
Rp |
Rotation pivot |
Rpre |
Pre-rotation |
R |
Rotation |
Rpost |
Post-rotation |
Rp-1
|
Inverse of the rotation pivot |
Soff |
Scaling offset |
Sp |
Scaling pivot |
S |
Scaling |
Sp-1
|
Inverse of the scaling pivot |
Notes:
- Computations are performed from left
to right.
- The effect of the formula is that any
given vector is first translated, then rotated, then scaled.
- The R matrix
takes into account the rotation order. Because of the
mathematical properties of the matrices, R is
the result of one of the possible combinations of Ry, Ry and Rz (each being matrices also). For
example, for the default rotation order of XYZ, R = Rx * Ry * Rz
3ds Max
Here is how 3ds Max computes
the transformation matrix for a node. All the terms in the equation
are the same as in FBX and Maya, except for the three terms that
represent geometric transformation:
WorldTransform =
ParentWorldTransform * T * R * S * OT * OR * OS
Where this term: |
Is a 4 x 4 matrix that contains: |
WorldTransform |
Transformation matrix of the node |
ParentWorldTransform |
Transformation matrix of the parent node |
T |
Translation |
R |
Rotation |
S |
Scaling |
OT |
Geometric transform translation |
OR |
Geometric transform rotation |
OS |
Geometric transform translation |
Notes:
- Computations are performed from left
to right.
- Geometric translation, geometric rotation,
and geometric scaling relate to the object-offset concept in 3ds
Max. These geometric transformations are applied to the node attribute
after the node transformations.
- Geometric transformations are not inherited: ParentWorldTransform does not contain
the OT, OR, OS of WorldTransform’s
parent node.
- Geometric transformations are implemented
in FBX SDK as three properties of KFbxNode objects: KFbxNode::GeometricTranslation, KFbxNode::GeometricRotation, and KFbxNode::GeometricScaling.