Skeletal Animation Questions

Started by
7 comments, last by ASL 18 years, 8 months ago
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?
Advertisement
Anyone?? >_<
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!
what baout vertices influenced by more than one joint?
And with shaders?
Another nameless person in the virtual space...
huh? what would shaders do? (tm)
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.
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.
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..

This topic is closed to new replies.

Advertisement