Pages

Sunday, March 11, 2012

Animation Systems

The animation system in Ruined is much different then most other games.
Usually the animation system in a game works by storing a TON matrices that transform each of a model's "bones" for each animation. While this may be fine for single animations it is unacceptable for more complex animations. Let's say, for example, that we want the character to be running while swinging a sword in one hand and then suddenly jump. In the standard system, the character would suddenly, choppily switch to the jumping animation. This is because the standard system takes only one input and, as a result, has only one output.

The Standard System results in a choppy timeline.
As a result of this choppiness, games designers have adopted a system of smoothing between animations. This allows the switch - from say running to jumping - to be much smoother. The "Smooth System" takes two inputs: the current animation, and the desired new animation, and smoothly transitions between them. The matrices that make up the animation should be decomposed before blending.

A Smooth System allows for smooth transitions from one animation to the next
Now the issue with the Smooth System is that it only supports one stream of animation. A "stream" can be thought of as an animation that only effects a certain part of an object. Separate streams can exist for the arms, legs, head, fingers etc. This allows each stream to animate independently of the the others. So the character can be running while swinging his sword, shooting a bow or eating a sandwich...

A Stream System allows for dynamic control of multiple animations, smoothing, and gives the best results overall.
In Ruined, the engine can make use of all three of these systems. This way, the proper system can be used depending on need:
  • Standard Animation is used for things that are perpetually animated, like a train engine.
  • Smooth Animation is good for most NPC's or monsters/creatures/wildlife.
  • Stream Animation is best for complex characters, such as the main character.
Another cool feature is that all three of these systems allow for optimization (cutting 1340 frames down to 60), which I'll talk about in another post :)


No comments:

Post a Comment