Jump to content
  • Advertisement
Sign in to follow this  
coollofty

two question about skeletal animation

This topic is 5036 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 export skeletal animation from 3dsmax with IGameExporter library. But my exported skeletal data from maxbone are always right, and from biped bone ara always error. I think my skeletal animation code has some problems, because I don't understand skeletal animation at all. So, the two questions are: 1. The matrix get from IGameSkin::GetInitSkinTM interface can do what? 2. I think, the bone init matrix get from IGameSkin::GetInitBoneTM interface, is a world matrix, the bone world matrix, so, invert this matrix and multiply to skinned vertices can transformed vertices to bone space, then use the bone node matrix to multiply all these vertices, should a good way to complete skeletal animation. But, it is works fine in maxbone, the biped bone always error. Why? THX.

Share this post


Link to post
Share on other sites
Advertisement
"and from biped bone are always error"... what error? That's not very specific.

If I had to take a wild, shot-in-the-dark total guess, I would be that you're importing your bone hierarchy wrong.

Share this post


Link to post
Share on other sites
My guess is that bones from biped don't have normalized weights, so you might have to normalize all the weights for a single vertex to add to 1.0 yourself in the exporter. I only use the Skin modifier, though, so I'm not sure whether this is the case.

The InitTM is the pose of the skinned things at the time when the modifier was inited (which means skeleton attached to skin). You can use this to calculate the "zero twist" or "identity" pose, i e, what would the mesh look like when all the bones are in identity orientation.

Are you using scale in your animations, or scale in your bones? That's something that often don't work well with skeletal animation; especially trying to calculate the identity pose; the reason is that the actual vert you get is already a blend of matrices with different scaling, so finding an inverse that will transform this vertex "back" to identity pose is tricky.

Share this post


Link to post
Share on other sites
Thanks for replys, I think I have a little understand, so I write my second skeletal animation code, like the under:

BoneTM = BoneSpaceTM * ParentTM
FinallyTM = BoneInitTM * BoneTM

relative to a child bone, the "ParentTM" is his parent "BoneTM".

and the BoneInitTM is :
BoneInitTM = InitSkinTM * Inverse(InitBoneTM)

note the "InitSkinTM" and "InitBoneTM" are all get from IGameSkin class.

////////
OK, the "FinallyTM" is the vertices skinning matrix. and all the vertices is in object space.

Is this method right? Or if it imperfect, please point out. THX:)

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!