BlueStreak

11-11-2016, 11:20 PM

Let me start off by saying a thank you to Dark Photon already for his post here:

https://www.opengl.org/discussion_boards/showthread.php/179419-Need-help-with-skeletal-animation it's a few years old but it really helped me.

I have a very similar issue in that I can't get the correct matrices and apply it to my opengl project which is a basic collada viewer also this is not for homework and I have no training in this I am just doing this for hobby work but I can't seem to grasp what is happening. I have read many sources and read Dark Photon's reply many times as it has made good sense but its not working likely due to my misunderstanding of some fundamental concept.

I am going to do my best to explain my issue as clearly as I can using the terms that Dark Photon used (or at least my understanding of them).

So the first thing I am doing is extracting the inverse bind matrices (IBM) from the controller section of Collada file.

Now am I right in saying that for a basic example I could simply inverse the IBM to get the joints world matrix? To me that makes sense perhaps this is wrong, but in these collada files the rest pose will be the same as the bind pose.

Viewing the bone locations and mesh every thing looks good so I assume this part is correct, next I take the Animation Matrices (A) in from the animation section of the collada document.

And I multiply as follows (working on a bone with 1 parent)

G = (ParentBone.JointWorldMatrix * AnimationMatrix) * (ThisBone.JointWorldMatrix * AnimationMatrix)

In the above I am assuming that the animationMatrix is different for both multiplications? As in the multiple the parentbone.JWM by its animation matrix for this frame?

Then I get the Inverse Bind Pose of this bone

IBP = (ThisBone.IBM * ParentBone.IBM)

Then I calculate the Final Transformation

Could I please get a definition for what exactly this is doing?

Is it the transformation from 0,0,0? If not what is it from / to

F = G * IBP

And I get an unexpected result likely due to not fully understanding one for the matrices above or maybe something wrong with the whole process.

Also some other questions:

What is the animation matrix exactly? Is it how to animate the bone in the bone's local space (bone-space/joint-space)?

https://www.opengl.org/discussion_boards/showthread.php/179419-Need-help-with-skeletal-animation it's a few years old but it really helped me.

I have a very similar issue in that I can't get the correct matrices and apply it to my opengl project which is a basic collada viewer also this is not for homework and I have no training in this I am just doing this for hobby work but I can't seem to grasp what is happening. I have read many sources and read Dark Photon's reply many times as it has made good sense but its not working likely due to my misunderstanding of some fundamental concept.

I am going to do my best to explain my issue as clearly as I can using the terms that Dark Photon used (or at least my understanding of them).

So the first thing I am doing is extracting the inverse bind matrices (IBM) from the controller section of Collada file.

Now am I right in saying that for a basic example I could simply inverse the IBM to get the joints world matrix? To me that makes sense perhaps this is wrong, but in these collada files the rest pose will be the same as the bind pose.

Viewing the bone locations and mesh every thing looks good so I assume this part is correct, next I take the Animation Matrices (A) in from the animation section of the collada document.

And I multiply as follows (working on a bone with 1 parent)

G = (ParentBone.JointWorldMatrix * AnimationMatrix) * (ThisBone.JointWorldMatrix * AnimationMatrix)

In the above I am assuming that the animationMatrix is different for both multiplications? As in the multiple the parentbone.JWM by its animation matrix for this frame?

Then I get the Inverse Bind Pose of this bone

IBP = (ThisBone.IBM * ParentBone.IBM)

Then I calculate the Final Transformation

Could I please get a definition for what exactly this is doing?

Is it the transformation from 0,0,0? If not what is it from / to

F = G * IBP

And I get an unexpected result likely due to not fully understanding one for the matrices above or maybe something wrong with the whole process.

Also some other questions:

What is the animation matrix exactly? Is it how to animate the bone in the bone's local space (bone-space/joint-space)?