Creating Seamless Animation Loops

Overview

This document helps you avoid any possible roadblocks you might encounter when creating and exporting smooth animation loops.

Assuming that your actual animation is itself a perfect animation cycle, we start with following steps:

Animating the Locator

The locomotion locator, or Locator_Locomotion as the node is called, is used in the engine to describe the logical movement and orientation of the animation. This node needs to be added to motions that translate in a non uniform ways, such as a start or stop transition that have peaks and troughs in acceleration.

Just like the first and last keyframe of your animation cycle should match, the locator position relative to the character on the first keyframe should match the position relative to the character on the last keyframe. This is usually very easy to animate for simple one direction animations.

However, for complicated animations like turns, there is a very simple trick to animate the locator.

Here is an Example:

Go to the first key frame of your animation cycle. The locator essentially needs to be a projection of the Bip01 on the ground and facing in the direction the character is facing. However, for turns, it does not exactly need to be below Bip01 but rather between the legs. This will have have better blending results. So, position the locator accordingly.

Create a dummy object and align it to the locator both translation and rotation. Parent the dummy as a child of the Bip01 L Foot (basically the left foot on the ground). Usually, all movement cycles need to start with the left foot on the ground. At exactly midway through the animation the right foot needs to be on the ground. This is the rule we follow in CryENGINE for ideal blending of animations.

Now, go to the last keyframe and use the align tool to align the locator to this dummy object.

Now, you have the locator position matching on both the first and last keyframes of the animation cycle. You can now delete the dummy object.

Since this example is a movement turn animation, animate the trajectory of the locator so it forms a nice circular path.

Debugging the Animation

To debug the animation and find the cause of jerks in your exported animation, follow these steps:

  • If it's a one direction movement cycle, you can easily scrub the animation in the Animation Control panel in the Character Editor and find out the frame where the jerk in your animation is originating.
  • For animations like turns, you can pinpoint the origin of jerks by slowing down the animation to a very slow speed from the Advanced Animation Settings Rollup.

  • If you continue seeing unwanted jerks in your animation cycle, export the animation without RC compression to find out if there are any issues in the original animation. To do this, you can enter a compression value to 0 in the Animations.cba file for your character.
<COMPRESSION value="0"/>