Advertisement

Offset Matrix/Bone space Matrix

Started by March 07, 2020 04:29 PM
0 comments, last by emil0 4 years, 10 months ago

I'm in DirectX c++ and trying to import my own animations.

I am following a book by Frank D Luna where he explains you essentially need 2 matrices for the final transform, the “toRoot” matrix and then an offset matrix.

The offset matrix if I understand it correctly is supposed to take you from bind space into bone space.

I have searched alot but can't find how you are supposed to calculate that by yourself.

I know how to program in python for maya, so I guess the best thing to do would be to calculate the offsets in there and then export them with the other information, or I guess I could calculate them in DirectX.

The mesh I have imported is in T-Pose, the animation I have imported does not start in T-pose, cus it's a walk cycle and it loops.

If the Offset Matrix is the inverse toRoot matrix at keyframe 0 then nothing will happen if I multiply it with the toRoot at keyframe 0 since I create the ID but the mesh is not supposed to be in Tpose at keyframe 0.

I assume I only need to calulate the offset once, so I don't need one for every frame?

I was following some examples here from before, but they only work if the Tpose is in the same world space as the animation.

Problem as far as I understand is that I can't just apply the rotations from maya into DirectX cus it's a different coordinate system so I need to translate the toRoot matrices with another matrix but I don't know what that matrix is.

Am I clear?

I found something that talks about a meshframe.toRoot but I have no idea what a meshframe to Root matrix is.

This topic is closed to new replies.

Advertisement