Skeletal Animation

Started by
3 comments, last by Mezz 24 years, 2 months ago
Does anyone know where I can get any information/tutorials on skeletal animation (preferably both theory and practice). Cheers, -Mezz
Advertisement
Somewhere on FlipCode (http://www.flipcode.com) there is a tutorial.

DaBit.

I''m pretty sure GamaSutra has some info on skeletal animation.

Kevin Hawkins
www.gamedev.net

Admin for GameDev.net.

Definitely check out the Game Developer Magazine companion stuff on www.darwin3d.com!
There are numerous articles on the net describing the basics of skeletal animation, but some of them make it sound a lot more difficult than it actually is, provided you have a solid grasp of coordinate space transformations (using matrices, coordinate systems, or however you like). In the end the whole thing boils down to this:

- In normal frame-based (vertex) animation, each vertex stores its world position for every frame of an animation.

- Instead, in bone-based (skeletal) animation, the bones are actually what''s animated, not the vertices. The vertices are only stored once, and are described by "weights" with respect to the various bones in the skeleton.

- A vertex may have any number of weights. Each weight has three main things: The bone that the weight is based on, the position of the vertex *relative to that bone* (coordinate space transformation from worldspace into bonespace), and a weight factor from 0.0 to 1.0. The factors of all the weights for a vertex should add up to 1.0.

- When you want to determine the world position of a vertex, you just take each weight''s offset position relative to the bone and transform it back out into worldspace (according to whatever the bone''s transformation currently is, i.e. determined by the animation or whatever), and multiply that world position by the weight factor. Add these positions up for all the weights of the vertex, and voila, there''s your final position.

- The bones themselves are just transformations. They may have some kind of "physical" form (like a box or whatever) inside an editor or whatnot, but for animation purposes they''re just transformations. The transforms can be either absolute world transforms for each bone, or they can be organized in a hierarchy where each bone transform is relative to the transform of the bone''s parent (in which case you have to walk the hierarchy at runtime to determine a bone''s absolute transform so you can solve the vertex positions). There''s a lot of options for this aspect of things; you can store the bones however you want, as long as somewhere down the line you can get absolute bone to/from world transformations in the end, since that''s what you need when looking at vertex weights.

- Once you have all this set up, you can start mucking with moving bones around on the fly for things like IK and head tracking, and the vertices which are weighted to those bones will automatically follow.

Hope this helps a bit,
- Chris H.

This topic is closed to new replies.

Advertisement