Sign in to follow this  

two question about skeletal animation

This topic is 4734 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
"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

This topic is 4734 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this