Jump to content
  • Advertisement
Sign in to follow this  
CaossTec

Getting the bind pose on Skinned mesh

This topic is 4747 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I had successfully loaded a skinned mesh, but as I don't want to use the ID3DXAnimationController to animated it, I had extracted all the RST keyframes out of the animation sets so I can interpolated them and animate the model by myself. Well, in fact I had only extracted the Rotation component of the keyframes since Scale and Position will remain constant in most character animations (e.g. an arm will not get any bigger). Being the matrices formed by that Scale-Positions the bind pose. But the problem I'm facing is that I indeed need to know the matrices of the bind position in order to render the model correctly given the bone rotations. That Scale-Position components can be extracted from one Keyframe of any of the animation sets. But if I load a .x with a skinned mesh and no animation sets attached; where I can get the Scale-Position components of the bind pose?

Share this post


Link to post
Share on other sites
Advertisement
You get the bind pose using ID3DXSkinInfo::GetBoneOffsetMatrix and equation (3) below.
Definitions:

Li is the local transform of bone i.

Bi is the bind-pose local transform of bone i.

Ci is the combined transform of bone i.
Cp(i) is the combined transform of the parent bone of bone i.

Mi is the offset transform of bone i.
Mp(i) is the offset transform of the parent bone of bone i.

Fi is the final transform of bone i.
Fp(i) is the final transform of the parent bone of bone i.

Equations (1) and (2) are the standard skinning equations (ignoring bone weights and the weighted summation):

(1) Ci = Li Cp(i)

(2) Fi = Mi Ci = Mi Li Cp(i)

Equation (3) expresses a bone's bind-pose local transform as the product of the bone's inverse offset transform and the parent's offset transform.

(3) Bi = Mi-1 Mp(i)

Substituting Bi for Li in equation (2) results in a bone having the same final transform as its parent:

(4) Fi = Mi Bi Cp(i) = Mi Mi-1 Mp(i) Cp(i) = Mp(i) Cp(i) = Fp(i)

Suppose Croot = Mroot = I. Then setting Li = Bi for every bone in the skin's hierarchy results in every bone having the same final transform Fi = I. That satisfies the bind-pose condition.


[looksaround] Or I could be wrong.



[Edited by - Happy Noodle Boy on July 24, 2005 5:36:47 AM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!