Advertisement

How to get the global inverse transform

Started by March 14, 2020 02:05 PM
8 comments, last by emil0 4 years, 10 months ago

I understand I need the inverse of the bindpose for animation, problem is if it's the matrix of the bindpose, then isn't it the identity matrix? Since no rotation is applied?

So meaning the global inverse becomes the identity and does nothing?

How do I correctly get the bindtransform?

Only an identity matrix can have an inverse result being identity, I do not read clear what it is you don't understand. You can inverse rotation 3x3 matrix by transposing it only.

Advertisement

@JohnnyCode I know, I have had this issue for some time now without an answer so I wasn't very clear, my problem is that when I get rotation data from an animation track, and I want to build the correct matrices in DirectX to play the animation with my model, then I don't understand how I'm supposed to get the inverse bind pose data, because if I get rotation data from bind pose I get the identity matrix since no rotation is applied.

And if I do the inverse of that I get the identity, I assume I'm not supposed to use only identity matrices to play an animation, from my understanding I need to create 2 matrices, an “offset/bone/local" matrix and a "toRoot/world/global" matrix, the latter one is created per frame and the first one is calculated once and used every frame.

And If I understand correctly the first one is the global/toRoot inverse bind pose matrix.

But if I get the rotation data from the bindpose then I only get the identity matrix?

The bind pose is supposed to be some pose, in case it is identity, and all is correct, you do not need to use bind pose at all and just use hierarchical rotation data, do not forget to pretransform them in hierarchy as each bone. But I suspect something is wrong as each bone should have same bind pose matrix of some value.

@JohnnyCode Cus I'm not 100 percent sure of what they mean with bindpose, is it the pose I get when I skin the mesh?

Or is it the pose at keyframe 0? Cus if I import my model then it is in Tpose which is the pose when I skinned the mesh.

The pose at the first keyframe is unique to the animation track.

When it is in tpose it has no rotations and so it has no values I can store in a matrix, if I use the pose at keyframe 0 then when I apply the transformed matrices at keyframe 0 they cancel each other out.

Like, if I get the pose at keyframe 0 take that inverse then take the pose at keyframe 0 nothing happens, even though the model is supposed to be in a certain position at keyframe 0.

The bind pose is the collection of transfromations of bones when mesh is in its unchanged/undeformed pose. Every bone has some transformation, even if not key framed in an animation yet, it cannot be an identity becouse all bones would be a single same bone. There stems you problem I am gessing.

Advertisement

@undefined If I am in a modelling program, like Maya, and I bind the skeleton to the mesh.

Then should the joints have transforms at that stage?

If I am inside directX and the I import the mesh in it's bindpose, how do I get those transforms from within DirectX?

emil0 said:
Then should the joints have transforms at that stage?

yes

JohnnyCode said:

emil0 said:
Then should the joints have transforms at that stage?

yes

I need to take the orientations into account I think. I'm gonna make a program in maya and experiment with the orientations to try and replicate what I want to do in DirectX.

This topic is closed to new replies.

Advertisement