Skip to end of metadata
Go to start of metadata

Time-Aligned Blending

When blending between different locomotion assets linearly the blended result will have artifacts on the legs and feet - due to the fact that the assets have different length and the footsteps don't fall into the same places.

The Animation System supports time-aligned blending to counter this effect. See below on how to turn on time-aligned blending when transitioning between animations.

The Time-Aligned blending will take two left footsteps of each animation and make sure they are aligned when transitioning. For regular cycles that start and end with the left foot on the ground, no special markup is needed.

For assets that contain multiple steps, the animation needs to be marked up inside the Character Editor.

Markup in the Character Editor

The markers for the time-aligned blending are stored inside the characters Animation Events Tracks Database, which is mapped in the .chrparams File. See the Mapping Animation Assets documentation for more information.

  1. Load the character and select the animation that will be marked. Adjust the view so you can see the character well, and turn of Animation Driven Motion for easier handling.
  2. Select the Animation Control Tab and Pause the animation. This allows you to use the slide to scrub through the animation.
  3. Scrub to each left footstep and place marker. You do not need to mark the footstep at the first or the last frame of the animation.
  4. Save Database.

Using the markup for blending

The markup will not automatically be used, since this could lead to undesired effects. The Animation System has to explicitly be told when to use the time-alignment when transitioning between assets.

All assets inside a Locomotion Group are automatically time-aligned. It is therefore possible to have assets with different numbers of steps inside a single locomotion group - for example a multi-step forward asset, and regular two-step side and turn assets.

In Character Editor

To turn on time-aligned transitions, check the box "Transition Time Warping". When you select a new animation now, it will be blended in using time-alignment with the last animation. This allows for testing of the footstep markup outside of an LMG.

In Animation Graph

In the Animation Graph there's two options on how to turn enable time-aligned blending. It can be enabled as a general parameter on a state - which will cause time-alignment to always be used when this animation is being transitioned into - regardless of which animation is currently playing.

Or alternatively it can be enabled between groups of animations - for example all locomotion animations. This way time-alignment will be enabled for example for Walk and Run, but not when transitioning to an idle.

This is done using the Time-Alignment Group Modifier - for more information please see the AnimationGraph Modifier Reference.

In Code

When starting Animations directly from Code using the StartAnimation() function, you can specify the following flag in the parameters to specify that the animation should be transitioned into using time-aligned blending:

CA_TRANSITION_TIMEWARPING
  • No labels