In this post I would like to give you an overview of what skeletal animation means and what you need to know in order to properly take advantage of it in your 2D/3D animations. If you are an animator, a game developer, an artist or just a reader this theoretical concepts will be helpful for your future work at some point.
Skeletal animation or bone-based animation is a technique in computer animation in which the object being animated has two main components: a surface representation used to draw the object (skin, mesh, character) and set of interconnected bones used to animate the surface (skeleton, rig, set of bones).
Skeletal animation is often used for animating characters, but it could be also used to animate anything you might want. Once the two parts are defined, then the skeletal animation can be also used for animating cars, trees, doors, birds, etc. There is no restriction on using this animation approach.
I have found a few sources over the internet that deal with this subject where more detailed definitions could be found. Here are some of them:
Skeletal animation is based on building a simple skeleton that can fit the important parts of your animated object. Marionette Studio animation software is based on skeletal animation because is a relatively simple-to-use technique and can simulate any jointed object, from people to animals to machinery. Defining a skeleton for your character is basically the first step in the skeletal animation process. Image 1. shows how a possible skeleton can be identified in a such manner that can control the most important parts of your object.
The skeleton is the most important object in a skeletal animation system. A skeleton is a set of bones that can be hierarchical organized. Usually an object has some important joints (vertexes). For instance, for a character the most important joints are the hip, the knee, the neck, etc. A bone connects two already defined joints and this can be viewed in Image 2.
Creating a skeleton may be a bit complicated and sometimes is time consuming, but using it afterwards is very easy. More than that, there are some tools on the market that can help you to simplify even more your work. A very important step is how bones are connected between them. A very used method is connecting them as a hierarchy. This means that a a bone belongs to a parent, and each bone can have a child as per Image 3.
Affecting a bone also affects all of its children. So, when setting up a skeleton, the first joint is called the root bone. Every subsequent bone will be connected to the root bone either directly, or indirectly through another bone.
The benefit of the hierarchical structure is that you can take advantage of several controlling techniques such as forward kinematics, inverse kinematics, dynamical simulation, canned animation and more. These techniques are successfully used when complex natural movements are wanted.
Once a skeleton is defined the rigging step comes in. Is recommended to place the bones exactly where they would be in a real world skeleton. Each defined bone must be attached to its belonging part of the object being animated. In this way the bones control the final movements.
A key frame in animation is a drawing that defines the starting and ending points of a smooth transition (source: Wikipedia). A sequence of key frames defines a sequence of movements the viewer will see in the final animation. In order to have a smooth transition between key frames other inbetween ones are inserted.
For obtaining a certain pose of your character you need to change the position of the bones. This can be done by using geometric transformations such as translation, rotation and scaling.
All skeletal animations have key frames. When speaking about game animations, they usually have animation cycles. An animation cycle contains all important keyframes that are needed in order to get a smooth transition between the last and the first keyframes. Image 5. shows a walking animation cycle with all needed keyframes. When working with skeletal animations, all frames inbetween keyframes are automatically generated and inserted in order to obtain the desired result.
Once the key frames are setup and the animation looks good when playing in loop you are ready to use it anywhere your want. Images 6. & 7. show two different output formats for an animation: GIF and Sprite Sheet. Of course, an animation can be output into various formats and this will be covered into a future post.
Pro and Cons
Of course, this animation approach has its benefits and limitations. Here are some advantages and some disadvantages when working with skeletal animation.Advantages / Benefits
- Simple animation system – using a skeleton to animate objects is easy to use and very intuitive
- Easy to create natural movements – inverse kinematics helps you create complex natural movements
- Save time – by defining only the main keyframes you save a lot of time while animating
- Bone rigidity – bones cannot be moved relative to each other
- Single parent restriction – a bone can have only one parent, so meshes of bones cannot be created
- Hierarchical structure of the skeleton – not suitable for animating liquids or gasses due it’s complexity