ASSIMP 2: Skelatel Animation

Whew! So I found a handful of useful online articles about skelatel animations and “skinning”, but what was especially helpful was the ASSIMP message board.

Various models are loaded in different ways, but the basics of ASSIMPS model structure is as follows:

Each model or “Scene” is composed of a hierarchy of nodes, each with its own “Transformation” which defines the nodes coordinate system relative to its parent. Each node then may refer to a series of meshes. Meshes with different materials are separated into two different meshes, so there’s only one per mesh.

Each mesh (THIS IS IMPORTANT) lives in the coordinate system of the node that referenced it. This mesh in this (local) coordinate system (prior to any animations) is said to be in “Bind Pose”

Moreover, each mesh comes with a set of bones. Each bone has a bone offset matrix, which converts from the local mesh space, back to bone-space. Each bone, has an associated node who’s transformation (together with those of its parent) is multiplied by the bone offset matrix, to get the new location of the bone. Its “location” (or transformation, rather) then influences certain vertices of the mesh, to a lesser or greater extent, based on weights.

Node positions (and hence bone node positions) are updated based on animation data, and then the mesh is deformed according to the location of the bones.

Interpolation between frames of the animation is a very cool trick. For bone locations (3d vectors) standard, linear interpolation of vectors can be used. For bone rotations/orientation (Quaternions) it appears there is a standard formula for performing this type of interpolation called http://en.wikipedia.org/wiki/Slerp (Spherical, Linear Interpolation) and it presumably was invented for 3d animation specifically. So not suprisingly, ASSIMP has a built in interpolation function for its quaternions, which I assump just implemenets SLERP.

Guess thats all I have to say right now, other than I’m very excited and happy with my progress.

Leave a comment