Animadead 2.0 review

Download
by rbytes.net on

Animadead is a skeletal animation library designed to load and play skeletal animations. Animadead supports models that are composed

License: LGPL (GNU Lesser General Public License)
File size: 0K
Developer: John Butterfield
0 stars award from rbytes.net

Animadead is a skeletal animation library designed to load and play skeletal animations.

Animadead supports models that are composed of several swappable meshes bound to a single skeleton that can be driven by multiple animations. There is an export plug-in for Maya, and others are in development, including plug-ins for 3D Studio Max and Lightwave.

It is written in C++ and has no dependencies. However, an example implementation is provided that uses OpenGL and SDL.

I wrote a shader in CG for OpenGL, which didn't work well on my system, I think due to the best OpenGL CG profile my card supported doesn't utilize the full potential of my card, and I had trouble with passing the list of bone matrices to the card.

The compiler for the supported profile had a ridiculously low number of uniform parameters I could send. So for my simple boxman demo, which has 41 bones or so, I couldn't get it to work, and I didn't feel like making a model with fewer bones.

So after running into a bit of trouble with CG, I wrote a shader in GLSL, which at first had problems as well, but it turns out all I needed to do was upgrade my graphics drivers. Once I did that I got the shader to work, and it's nice and fast.
I plan to have both shaders working well and will provide them with the next release.

Here are some key features of "Animadead":
Exporting and file types:

Custom file types used for meshes and animations.
Meshes can be static, or deformable and bound to all or a subset of the skeleton.
Animations use a skeletal hierarchy and local transformations for every bone at every frame.

Loading files:

The library loads and caches animations and meshes by filename.
Meshes are broken down into surfaces, which have a texture name, vertices, faces, and a pointer to user defined data.
A callback function can be set that can load textures when the mesh is loaded, and set the user data for that surface.
Models in animations can be moving, but when the model is loaded, the movement of the root bone is extracted and removed. This information is stored, and can be used to move the frame of the model at the speed the modeler intended or used to scale the speed of the animation.

Setup (initialize):

A model is composed of several animations and swappable meshes, but can also contain blends and bone selection masks.
Blends are used to calculate a pose, usually from two other poses.
One type of blend is an animation player, which is used to keep track of the current time in the animation and can generate a skeletal pose at that time (between two frames).
Another type of blend is a blend between blends. When this blend is calculated, it first calculates the two blends it's blending, and then blends those together with a user-defined weight. Since this is a recursive definition, blends can in fact be setup in a hierarchy, and the user only needs to call the top level calculate function.
A bone selection mask is a selection of a subset of the entire skeleton. The hierarchy is used to make the selection process simpler. Essentially, all bones are the same selection state as their parent, unless set directly.
In addition to being able to calculate a pose from a complex system of blends, the calculate function can be given an optional bone selection mask, which limits the calculations done for that blend to only the subset of bones defined by the selection. This allows you to calculate different parts of a skeleton with different animations.

Drawing:

The library doesn't actually draw the model, but provides all of the necessary information for your engine to draw the model.
Data is prepared and organized for use in vertex shaders.
A pose can be converted to a set of matrix world transformations. (Most shaders like the data like this)
Examples are shown that actually draw the model.

Animadead 2.0 search tags