Article
files/tutorials/dog-skeleton

9 Tips for Creating Rich Behaviors on a Low Animation Budget

Alex J. Champandard on November 4, 2007

When creating character AI, your bottleneck is the presentation; there are never enough animations. Whether you’re making a big-budget production or a small independent game, you can always use more types of movement to bring your characters to life.

Here are nine techniques to help you get the most out of your meager resources.

Dog Skeleton Screenshot 1: A dog’s skeleton during a walk animation cycle.

1) Controlling Speed

Idea: Vary the rate at which you step through the animation for playback, accelerating or slowing the animation down.

Application:

  • Use this to create different kinds of locomotion pace from a standard walk cycle. You can fake a sneaking animation and a fast-walk with a single animation clip.

  • It works very well for creating different types of gestures, like fast and slow variations of punching or kicking motions.

Limitations: It doesn’t work very well for jogging or running as it’s a different style of gait altogether: only one foot is on the ground.

2) Reversing Playback

Idea: Step through the animation backwards, or set the speed to a negative value if your animation system supports it.

Application:

  • Use this to create backwards walking, or any other kind of locomotion.

  • You can also generate reverse transitions from two different postures if you don’t have them. For example, standing to crouching and back again; one of the two can be generated.

Limitations: The animations won’t look entirely right to the human eye, as the momentum of the limbs is different in reverse.

3) Procedural Overriding

Idea: Use code to control certain bones in the skeleton according to the type of motion required.

Application:

  • You can do very simple gazing around with such a system by turning the neck bone to the correct facing direction.

  • You can also use a procedural mover to make any locomotion animation move correctly in space…

Limitations: It can look weird unless you add constraints onto the code. For example, turning the neck to far or moving the root channel to fast in space.

4) Splicing Limbs

Idea: Play a different animations on different parts of the skeleton, for example upper and lower body.

Application:

  • You can use it to combine actions of the hands with a lower-body locomotion, like carrying an object or shooting while running.

  • This technique can also help you to animate the head separately from the body.

Limitations: It doesn’t look great as the two motions will be visually out of sync (wrong momentum alignment) unless you perform a post process.

Dog Animation Screenshot 2: A looping sitting idle posture.

5) Combining Segments

Idea: Split up your animations into very small logical chunks of motion, and combine them together to create more complex animations.

Application:

  • If your artists are creative, they may create animations that have more than just the logical animation. For example, these animations have the dog look around before pooping, then kicking the dust to cover it up. You can split this single animation into three logical segments.

  • When you have raw motion-capture data, there may be sections that you can reuse in a different context, for example the actor warming up before running.

  • Using this together with splicing is even more interesting. You could, for example, use an upper-left-body running animation (half cycle) as a punch.

Limitations: It doesn’t always look very realistic to combine short clips, and it’s not always trivial to figure out good combinations.

6) Blending Poses

Idea: Use two similar animations, making sure they line up logically, and blend them together to create new motions.

Application:

  • By blending a running and a walking cycle, you get an interesting “lazy jog” that looks like an old man.
  • Also, blending any kind of punches and kicks together allows the animation to target different points in space. If you blend a left punch with a right punch you can get a center punch.

  • Finally, by blending different turning animations together, you can get variations for locomotion too. For example, blending walking forwards with walking left can yield a walk cycle that turns slightly left.

Limitations: Blending gestures works very well, however for locomotion it’s harder. It’s important to synchronize the animations so the feet line up logically, and make sure the speed of playback matches.

7) Mirroring Limbs

Idea: Take any animation and use its symmetrical counter part as well in appropriate situations. The mirroring algorithm can be tricky to implement, but it could reduce your animation costs by 50%.

Application:

  • You can use this to automatically generate left punches and kicks from the same animations on the right side.

  • Also, if you need variations in locomotion, for example starting to walk with the left foot and the right foot, then half of the cases can be mirrored.

Limitations: Requires a mirroring algorithm. Apart from that, it can help in most cases reduce your cost by half.

8) Inverse Kinematics

Idea: Use an algorithm to work out the position of multiple limbs for an end effector to reach a target.

Application:

  • This is particularly useful for computing a good position of limbs based on the target effector, for example finding a leg’s posture based on the foot’s ideal position, or placing an arm to find ways for a had to touch a specific point.

  • A more extreme version of this approach can be used for the whole body, as an optimization process for satisfying constraints from an original posture. For example, based on an idle pose, find a way to make the character fit below a certain height.

Limitations: Two-limb I.K. is rather simple to implement, but as you add more limbs, it becomes harder to get right and slower to compute. It’s often less realistic than mocap or hand-animated motion also, even if constraints are imposed on the limbs.

9) Physics Simulation

Idea: Model the skeleton as a set of connected rigid bodies, then use the forward kinematics of a standard physics engine to simulate the system.

Application:

  • This is useful for whole body ragdolls, when the character hits an object, falls onto the floor, or dies.

  • You can use splicing with this technique to have individual limbs react to collisions, for example arms being hit by objects.

Limitations: Partial body physics for small amounts of time looks good. Full body it only looks acceptable if you consider the character is dead, and you setup the velocities from the animation correctly. However, for other full body cases like falling over, it can look lifeless before blending back to traditional animation.

If you have any more tips, feel free to share them below by posting a comment!

Discussion 3 Comments

Ian Morrison on November 4th, 2007

I suspect that I'll be writing a custom 2D animation system for my own game, so this is pretty relevant to me. Great article!

meshula on November 4th, 2007

On controlling speed: First let me acknowledge that adjusting speed of animation is a cheap and easy to implement way to accomplish the goal of controlling speed, so I'm not disagreeing with your point. However :) We (and all walking creatures, actually) control walking speed by adjusting stride length, not by adjusting frequency. The reason for it is simple physics, which you can read about it here if you're interested: http://en.wikipedia.org/wiki/Pendulum Basically a walking organism is effectively a pendulum, so the gait timing is T = 2PI*sqrt(l/g), where l is the length of the pendulum and g is the downward force due to gravity. Walking is a low energy process, and so walking cadence is governed by T. If you have an IK solution in your engine, you can easily leverage it to adjust stride length to satisfy T, and you will get much more natural looking animation at very little cost. In general, strides not governed by T are forced locomotion effects, like quick marching, or sneaking as you mention. IIRC an article in a recent issue of Game Developer magazine had a lot to say about this...

meshula on November 4th, 2007

I liked this article by the way - good summary, should've mentioned that :) On point 5, I might suggest people look up Lucas Kovar's work, or Zoran Popovic's to see some interesting approaches and results on stitching motion graphs together from large motion databases.

If you'd like to add a comment or question on this page, simply log-in to the site. You can create an account from the sign-up page if necessary... It takes less than a minute!