Hi guys,
I'm having some problems implementing basic skeletal animation. I'm not concerned with skinning at the moment, just bone movements. I understand the concept, but am missing something.
I have a simple setup like this:
root->child
float4x4 transforms[2];
// root
matrixTranslation(&translation,&pose.joints[0].pos); // the pose's root joint position
matrixRotationQuaternion(&rotation,&pose.joints[0].q); // the pose's root joint orientation
matrixMultiply(&transforms[0],&rotation,&translation); // combine
// child
matrixTranslation(&translation,&pose.joints[1].pos); // the pose's child joint position
matrixRotationQuaternion(&rotation,&pose.joints[1].q); // the pose's child joint orientation
matrixMultiply(&temp,&rotation,&translation); // combine
matrixMultiply(&transforms[1],&temp,&transforms[0]); // incorporate parent's transformation
// then I would use the transforms I made to transform the actual vertices
I don't know where to take into account the inverse_bind_pose, or if I'm doing it right at all.
I also don't understand why there is a position/translation in the pose joint; when the parent joint is rotated doesn't that automatically change the child's position/translation since the imaginary bone between them is rigid ?
I can give more code and structs if needed.
Thanks.
edit: title should be Bind pose, not Bine