OpenGL : Bone Animation, Why Do I Need Inverse of Bind Pose When Working with GPU?

deniz picture deniz · Jun 15, 2013 · Viewed 10.7k times · Source

I implemented an MD5 Loader with software skinning. Bind pose in md5 is final, absolute position and rotations, you just need to do computations for weights which are joint dependent.

I tried to implement GPU skinning but i am stuck at a point. Since these coordinates are final, why can't i just convert my 3d vectors and quaternions into a matrix and just upload it to the shader ? As I have read here : http://3dgep.com/?p=1356 , i need to multiply my skeleton with inverse of the bind pose. But I don't understand this part because I always thought that only thing I need to do is upload the final matrices to the GPU and calculate the rest there (sum of weights etc. etc.)

Can you explain me the behavior of inverse bind pose ?

Answer

Jeremiah picture Jeremiah · Sep 30, 2013

As the original author of that article, I will try to explain what multiplying by the inverse bind pose does:

The "inverse bind pose" basically "undoes" any transformation that has already been applied to your model in its bind pose.

Consider it like this: If you apply the identity matrix to every joint in the model then what you will get is your model in the bind pose (you can try this by sending a skeleton frame filled with identity matrices. If what results is the bind pose, then you are doing it right).

If you apply the bind pose matrices (uninverted) to every joint in the model then what you will get is spaghetti because you would be applying the bind pose twice!

So to fix the spaghetti model, you simply multiply the resulting joint transformations by the inverse bind pose to "undo" the transformation that have already been applied to your model.

I hope this clears it up a bit...