# matrix definitions - FBX style

This topic is 2452 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

So, an FBX scene (As with other model loading libraries) contains a node hierarchy, each node containing a relative transformation from its parent. In other model loaders I've used (ASSIMP) this was a single matrix, derived from a rotation, translation, and scalar matrix component. And it is too for FBX files. But in the FBX case, the matrix is derived from what appears to be about 10 individual kinds of matrices. Here is a link to the list of matrix transformations and how they are assembled to form a node's transformation.

I am perfectly comfortable with rotation, translation and scalar matrices and their inverses. But the following descriptions are foreign to me:

"Rotation offset, Rotation pivot, Pre-rotation, Post-rotation, Scaling offset ,Scaling pivot."

I'd like to understand this transformation structure a little better, along with the meaning and purpose of each individual matrix, and how we derive the resulting transformation formula. It appears to me to represent Euler Angles in some sense, plus some additional transformations to avoid gimble lock. Could anyone explain or link me to a good tutorial on this transformation model?

##### Share on other sites
Matrices which only scale or rotate do so relative to 0,0,0. If you want to scale or rotate a mesh with a different point as a pivot, you need to first translate the mesh so that the pivot is at 0,0,0, then do the scale / rotation, then translate back.

That's what Rp and Sp are for. They are translation matrices, and in both cases first the mesh is multiplied by the pivot matrix (translated), then rotated or scaled, then multiplied by the inverse of the pivot matrix (translated back).

The other matrices are mostly used only for animation / joints. For more info see here.

##### Share on other sites
Thank you so much for that prompt and clear answer, Turch.

One more question I had. I've had trouble finding information on what it means to 'Bake' a matrix. Its such a commonly used term so all the hits I get when googling aren't giving me the basic definition.

##### Share on other sites
In general, baking matrices simply means multiplying them ahead of time. Traditional scene graphs are one example of baking, where each node contains a transformation matrix from its parent, and also a full world transformation matrix. When rendering, instead of multiplying all the matrices each frame, the full world transformation is used. If a node's local matrix changes, the change is propagated to its children and the matrices are recalculated. This saves computation at the expense of memory use.

1. 1
2. 2
Rutin
19
3. 3
khawk
18
4. 4
5. 5
A4L
11

• 9
• 12
• 16
• 26
• 10
• ### Forum Statistics

• Total Topics
633768
• Total Posts
3013753
×