Jump to content
• Advertisement

# matrix definitions - FBX style

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

If you intended to correct an error in the post then please contact us.

## 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 this post

##### Share on other sites
Advertisement
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 this post

##### 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 this post

##### 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.

#### Share this post

##### Share on other sites

• Advertisement
• ### Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• Advertisement

• ### Popular Now

• 13
• 30
• 9
• 16
• 12
• Advertisement
×

## Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!