Jump to content
  • Advertisement
Sign in to follow this  
Code-R

Skeletal Animation Questions

This topic is 4833 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

when using skeletal animation, will I have to recalculate the normals of the mesh's vertices after the model is transformed, or fo they correspond with the weights? (mind says no, though I might as well ask.). as for tangents (for normal mapping), they would also need to be recalculated per transformation, as in, all I'd want to store statically in the model file would be positions and texcoords, of the bind pose. Am I right so far?

Share this post


Link to post
Share on other sites
Advertisement
Technically, yes, you will need a transformed set of normals for the verticies you're playing with. That's the bad news.

The good news is that if you're doing rigid-segment animation you shouldn't need to worry in the least. Transformations on the model will affect the normals as well, if you're using an API. If you're transforming all the verticies by hand, or stitching some of them together, then you're boned (pardon the pun).

If you're using OpenGL, glTranslate and glRotate are your friends!

Share this post


Link to post
Share on other sites
Influenced by more than one joint in the sense that it's the lower arm or fingers, or more than joint like the back of the hand (which is affected by a myriad of little bones and is NOT rigid)?
If you're trying to animate child bones, just stack the transformations. That's what the matrix stack is for.
If you're trying to stitch verticies together, I'm not very sure. I know there's an article in Game Programming Gems 1, but haven't seriously perused it.

Unfortunately, I have no experience with vertex shaders.

Share this post


Link to post
Share on other sites
A common technique for handling normals is by only transforming by the strongest weighted bone's rotation (usually denoted by being indexed first in the weights), and then renormalizing. If you have no scaling in the transforms, then you don't even need to normalize.

Sta7ic: No, he meant "influenced by more than one bone" in the sense that the vertex is transformed independently by several bones, then the final position is calculated by a linear interpolation of those transformed points based on the "weights" that correspond to each bone for that vertex.

The "matrix stack" is all computed out before any of this happens.

Share this post


Link to post
Share on other sites
If a vertex is affected by more than 1 bone... lets say 2 to make it simple, here is what you do:

(M-bone1 * v * weight-bone1) + (M-bone2 * v * weight-bone2) = v´

v is your vertex
M is a Transformation Matrix

Hope it helps..

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!