🎠Animation Sequencer

Multi-track animation clip blending and sequencing

Use Animation Sequencer to blend any number of animation clips in a keyframed sequence with smooth transitions, multi-track layering, and IK support.

When to Use

Animation Sequencer is best suited for characters with existing animation clips that you wish to choreograph in Timeflow, creating smooth transitions between a series of animation clips.

If you only need to play individual clips one at a time, use the Animation Clips behavior, which also provides the ability to time remap the clip using keyframe curves.

If animating a game character with an Animator Controller, you might alternatively consider using the Animator Blend Trees approach to animate the character using control parameters instead of sequencing animation clips. Which method you use depends on your use case.

Inspector Overview

Default Clip

This specifies the base animation to play when no other animation clips are playing. This can be an animated clip such as an idle animation or a hold pose.

When an Animator Controller is present the Default Clip is only used for rebinding, since the base layer of animation is provided by Animator.

Rebind Animator

Use this button to reset the binding pose and rebuild the setup. This might be needed if your character gets into a weird state for some reason. When using Animation Rigging constraints, this also rebuilds the Rig Builder graph.

Note that rebinding the Animator and Rig Builder is affected by the Default Clip assigned.

Blend Weight

Controls the overall blend between the base animation, which is either defined by the Animator Controller or if none is assigned then the Default Clip provides the base animation.

  • 0.0 = base only

  • 0.5 = equal blend

  • 1.0 = sequencer animation overrides base animation

IK Constraints

Animation Sequencer supports IK (Inverse Kinematics) constraints from the Animation Rigging package using Rig Builder.

For a free tool to quickly setup a control rig see: https://assetstore.unity.com/packages/tools/animation/control-rig-249848

Or you can use the Mechanim Avatar IK system. This is a scripting solution that works by implementing the OnAnimatorIK callback, for example to calculate foot placement.

Apply Root Motion

Toggles Animator.applyRootMotion while the sequencer is active. This also allows Animation Sequencer to modify when root motion is applied with the following setting:

Single Track Only

When enabled, root motion is applied only if exactly one track contributes to prevent drift from multi-track blends.

Animation Clips

This section lists all of the animation clips available to the sequencer. Animation clips are automatically added from the Animator component when the Animation Sequencer is first applied. You may also add more individually by pressing the + button.

After a new slot is created by pressing the + button, assign an Animation Clip asset by dragging and dropping it from the Project window, or click the target icon on the right to search the project for a clip.

Drag and Drop Animation Clips

To quickly add animations, you can also drag and drop Animation Clip assets from the project view into a Clip Track in the Timeflow window. The animation clip appears highlighted in green until it is dropped into position. The new clip is automatically added to the list in the inspector.

Clear All

Removes all animation clips from the list.

Sort

Sorts the list of animations alphabetically. This only affects the display in the inspector and does not impact sequencer keyframes.

Reload

Click this button to repopulate the list of animation clips with those used in the Animator Controller. This operation does not remove the animation clips already assigned, but will add any new clips found in the Animator Controller that haven't been added yet.

Clip Tracks

In the Timeflow view, animation sequences are created using keyframes on a Clip Track. Each keyframe defines an animation clip to play with optional blend in and out durations. Multiple tracks may be added as needed to layer animations.

Adding Tracks

To create a new clip track, right click on any existing track and select Add Animation Sequencer Track.

Animation Sequencer does not have a limit of how many tracks can be added, though only the first 10 tracks have an animatable blend weight.

Track Blend Weight

Each clip track has a weight value determining how much it mixes with the layers below it. The weight for each track may be adjusted in the info panel in the lower left.

Or alternatively the weight may be adjusted in the inspector in the Tracks section.

Animating Track Weights

Each Clip Track has a weight value that may be animated (with support up to 10 tracks) using a standard keyframe channel. Below is an example which animates the blend weight of Clip Track 1 to smoothly transition the character from walking to idle, then walking again.

The weights are exposed as values named BlendWeight00, BlendWeight01, ... BlendWeight09.

Additive

Enable Additive mode to blend the animation additively, rather than overwriting the underlying animation. This is used for animation layers that apply relatively to augment or accentuate movement. Additive mode works only with animation clips that have been configured with an Additive Reference Pose.

Additive Animation Clip Setup

It's important to note that additive is only applicable for animation clips that have been especially created as additive.

  1. Select the Animation Clip asset in the Project view

  2. In the Inspector, click the 3 dots menu and switch to Debug mode to expose all fields.

  3. Enable Has Additive Reference Pose and be sure to assign the Additive Reference Pose Clip, which is used as the baseline to determine the relative offsets from.

The Additive Reference Pose Clip is not required if your animation was created as additive in the first place. The reference pose is only needed to calculate the delta offset from non-zero resting pose values.

Avatar Mask

An optional filter that limits which transforms the sequencer drives. This masks the output of all animation clips on the clip track.

  • Humanoid: mask by body parts (upper body, hands, head…)

  • Generic: mask by transform paths (ensure names match your rig)

For more information see the Unity documentation for Avatar Masks.

Keyframes

Each keyframe on a clip track defines an animation to play with options to adjust playback and create a smooth transition from one clip to the next.

Tip: you can expand the height of channels by clicking and dragging the bottom edge of the channel below the channel name, or right click to select a channel height from the context menu.

The selected keyframe(s) can be edited in the Timeflow info panel.

Time

Specifies the keyframe time in the timeline. This is when the animation clip begins playing. Note however that the animation clip may start playing either from the beginning or at any point in the clip based on the Clip Range Start time.

Colorize

Enable this to override the track color for the selected keyframes. Assigning specific colors to keyframes can serve as a visual aid to classify and group animations.

Animation Clip

Select an animation clip from the drop down menu. This only lists the animations that have been added to the Animation Sequencer. To add and manage clips, see the Animation Clips section in the inspector.

Click the arrow icon button next to the drop down menu to select the animation clip in the project window.

Click the pencil icon to open the animation clip in the Animation window for editing.

Loop

This toggles looping for the selected keyframes. If looping is off, then the animation will hold that last pose if the keyframe duration exceeds the animation clip length. You can also toggle the loop icon in the track view for each keyframe.

The end of the animation is denoted by a vertical grey line. When loop is enabled, the following region is filled in by repeating the animation, with each loop numbered. Though if loop is disabled, then the animation holds on the last frame for the remainder of the keyframe.

Limit

When loop is enabled, the limit specifies how many times the animation can loop after which it holds on the last frame. To loop without any limit, set the value to 0.

The example image above shows a loop limit of 2. Note that the animation actually plays a total of 3 times, so when you set your loop limit keep this in mind to get the desired total number of repeats.

Speed

This multiplies the speed of the animation clip playback. If for example it is set to a value of 2.0, then the animation clip plays twice as fast.

Speed can be set per keyframe, however it is not animatable. As a work-around, there are 2 options:

  1. Use 2 or more keyframes with the same animation clip to blend from one speed to another smoothly. Adjust the duration of the transition to control the rate of change.

  2. Use the Animation Clips behavior instead of Animation Sequencer to play a single animation with an animation curve to time-remap the animation. The caveat to this approach is that it does not support animation blending nor is it compatible with Animation Sequencer, so it's best for a one-off animation. If for example you're creating a bullet-time effect, you could duplicate your character and use the Animation Clips behavior just for this shot, while other shots may use a copy of the character setup with Animation Sequencer, using camera cuts or animated visibility to switch between them.

Note that the speed of the entire Animation Sequencer can also be changed by setting the Time Scale in the Update Settings.

Clip Range (Start - End)

This determines the portion of the animation clip to play. The Start and End fields allow numeric entry for the start and end of the range slider.

If you wish to play only a portion of an animation clip, adjust the clip range as desired. This sub section will be looped if Loop is enabled.

Blend In/Out

Specifies an optional duration in seconds to transition the keyframe in and out.

To reset the in/out curves to default, click the circular reset icon

The blend in and out animation curves can be edited by clicking on the green curve field. This opens Unity's built-in Curve editor window. Here you can customize the curve, as well as apply and create presets.

The curves are visualized in the track view. Drag the square handles to adjust the in and out durations. If the keyframe is not overlapping any others, then it blends with the layer below it. Ultimately the layers blend with the Default Clip or Animator Controller animation.

When the keyframe is overlapping another, the two blend together, indicated by the crisscrossing ramps.

When two clips blend together, the transition is based solely on the In Blend animation curve. The preceding keyframe's Out Blend curve is not used in this case. This ensures a smooth transition.

When blending 2 animation clips together, mathematically the combined blend weight of both must always add up to 1.0. So the out transition weight must compliment the in transition weight. Otherwise it allows underlying animation to peak through unpredictably causing unwanted artifacts and strange behaviors during the transition.

Duration

The length in seconds of the keyframe track.

In the Track View, this is the duration of the keyframe track outlined in yellow when selected. Click and drag on the yellow block handles on either side to extend or shorten the duration.

Out Time

This sets the end time of the keyframe. This is tied to the Duration, so changing either one affects the other. Both fields are provided as a convenience to improve editing workflow.

Foot IK / Playable IK

These toggles are only available when using the Mechanim Avatar IK system. They enable on a per-keyframe bases whether foot and other playable IK constraints are applied.

When using Animation Rigging, the Foot IK and Playable IK settings are not applicable. Instead, these effects are achieved using Rig Builder constraints.

Playable Graphs

Animation Sequencer implements animation clip blending and IK using Unity's playable graph system. Below is an example graph showing the structure of an Animation Sequencer with 2 clip tracks, a default clip, and using the Animation Rigging IK setup.

Get the free Playable Graph Monitor editor tool: https://github.com/SolarianZ/UnityPlayableGraphMonitorTool.git

Limitations

Last updated