Skip to main content

Animation Trees

Overview

An Animation Tree allows projects to produce node-based action playback management.

Anim Tree Editor

image-20230129175722881

No.Description
1Menu Bar
2Toolbar
3Preview Window
4Anim Tree Edit Window. Anim Tree can be created, edited and debugged here.
5Property Window. Properties related to the currently selected Anim Tree node object can be previewed and edited here.
6Animation Browser. It displays the Action List, from which you can drag animation assets to the Anim Tree to create corresponding playback nodes.
Animation Parameter Window. It is used for Anim Tree parameter management and real-time debugging.
7Slot Manager. It is used to add or delete Slot groups or Slots and modify Slot names.

Opening the Anim Tree Editor

In the Animation Editor, click File -> Create, select Anim Tree in the drop-down box, name the Anim Tree and select the file save path, then click Yes to enter the Anim Tree Editor.

image-20220929142611288

image-20220929142817962

Anim Tree Playback Nodes

Sequence Playback

Sequence Playback Node in the Anim Tree can sample Skeleton or Animation Sequence assets and output poses at specific points in time.

Using Nodes

Right-click on the Anim Tree edit panel to open the Node Select panel. Expand the Animation category to browse all valid sequence playback nodes.

image-20220909172625547

Select a node and place it.

image-20230130131638065

Connect the output pin to the input pin of the target node.

image-20230130131628594

image-20220909172659959

Click the Apply button in the Toolbar to preview the effect as needed. If the button is enabled, the playback node will be driven and the playback will be shown in the Preview window.

image-20230130133817505

Property Settings

image-20230330155955711

PropertyDescription
AssetAsset used by animation playback node.
LoopWhether to loop play.
Play RateThe playback rate of the animation. When checked, this property uses animation parameters, and you can select the animation floating point parameter as the playback rate.
Start LocationThe time when the animation starts to play ( in seconds ). When checked, the property uses the animation parameter, and you can select the animation floating point parameter as the Start Location.
PreloadWhether to preload the animation while opening the Anim Tree.
Basic Play RateScale the animation play rate.
Ignore Relevancy TestWhen checked, the animation is made to ignore its relevance when switching states in the State Machine.

Blend Space Player

Blend Space Player Node in the Anim Tree can use Blend Space assets to output poses at specific points in time.

Using Nodes

image-20220909172802808

The placement process is similar to that of the sequence playback node.

image-20220909172810865

Property Settings

image-20230330160112502

PropertyDescription
LoopWhether to loop play.
Play RateAnimation paly rate.
Start LocationAnimation start time (in seconds).
PreloadWhether to preload the animation while opening the Anim Tree.
X CallbackObtain the horizontal parameter control from the specified callback function.
X ParameterWhen checked, this property uses the animation floating point parameter, and the drop-down list specifies the parameter from which to get the horizontal direction parameter control amount.
Y CallbackObtain the vertical parameter control from the specified callback function.
Y ParameterWhen checked, this property uses the animation floating point parameter, and the drop-down list specifies the parameter from which to get the vertical direction parameter control amount.
Ignore Relevancy TestWhen checked, the animation is made to ignore its relevance when switching states in the State Machine.

Blend Space 1D Player

Please refer to the Blend Space Player Nodes.

Aim Offset Player

Aim Offset Player Node in the Anim Tree can sample Aim Offset Blend Space assets and output poses at specific points in time.

Using Nodes

The placement process is similar to that of the Blend Space Player node, but specifying input for the Base Pose pin is required.

image-20220909172848268

Property Settings

image-20230330160308591

PropertyDescription
LoopWhether to loop the node.
Play RateThe play rate of the node.
Start LocationThe start location of the node while playing.
PreloadWhether to preload the animation while opening the Anim Tree.
X CallbackObtain the horizontal parameter control from the specified callback function.
X ParameterWhen checked, this property uses the animation floating point parameter, and the drop-down list specifies the parameter from which to get the horizontal direction parameter control amount.
Y CallbackObtain the vertical parameter control from the specified callback function.
Y ParameterWhen checked, this property uses the animation floating point parameter, and the drop-down list specifies the parameter from which to get the vertical direction parameter control amount.
Additive AlphaAdditive Alpha.
Sample XX coordinate sampled in Blend Space.
Sample YY coordinate sampled in Blend Space.
Ignore Relevancy TestWhen checked, the animation is made to ignore its relevance when switching states in the State Machine.

Aim Offset 1D Player

Please refer to the Aim Offset Player Nodes.

Blend Nodes

Blend Nodes

This node can blend input two poses based on the given weight value.

Using Nodes

Right-click on the Anim Tree Edit panel to open the Node Select panel. Expand the Blends category and select Blend.

image-20220909172917494

Blend added successfully:

image-20220909172924426

You can still configure the node with appropriate inputs/outputs.

image-20230130135943098

Property Settings

When a node is selected, its properties will be shown in the Property Window.

image-20220909172949929

PropertyDescription
Use Weight ParameterWhether to use weight parameter.
Blend WeightBlend weight.
Blend Weight OffsetOffset of blend weight.
Blend Weight ScaleScale of blend weight.
Reset When ActivatingReset child node when reactivating.
Curve Blend OptionSet curve blend behaviors to control the blend methods of animation layers.

Blend Pose By Boolean

This node controls the output to switch between two inputs based on the Boolean parameter.

Using Nodes

Right-click on the Anim Tree Edit panel to open the Node Select panel. Expand the Blends category and select Blend Pose by Boolean.

image-20220909173044571

Adding successfully:

image-20220909173106524

You can still configure the node with appropriate inputs/outputs.

image-20220909173116076

Property Settings

When a node is selected, its properties are shown in the Property Window.

image-20220913133042472

PropertyDescription
Transition ModeTransition mode used when playing the node.
False Blend TimeTime required to blend into the false pose.
True Blend TimeTime required to blend into the true pose.
Callback StringConfigure the callback function, and decide whether to migrate based on the return value.
Use ConditionsPlease refer to the Animation Parameters.

Multi Way Blend

This node can blend multiple poses inputted based on the given weight value.

Using Nodes

Right-click on a state graph of the Anim Tree to open the Node Select panel. Expand the Blends category and select Multi Way Blend.

image-20220909173157062

Multi Way Blend added successfully:

image-20220909173202688

Click Add Pin on the node to add a new pin for it.

image-20220909173208504

Pin added successfully:

image-20220909173218076

You can still configure the node with appropriate inputs/outputs.

image-20220909173226570

Property Settings

When a node is selected, its properties are shown in the Property Window.

image-20220909173234020

PropertyDescription
Is Additive NodeWhether the input of this node is an additive type animation.
Is Normalize AlphaWhether to use normalized Alpha values.
Blend Weight OffsetOffset of blend weight.
Blend Weight ScaleScale of blend weight.
Curve Blend OptionSet curve blend behaviors to control the blend methods of animation layers.
  • Override: The curve with a higher input pose number overrides that with a lower pose number.
  • Do Not Override: The curve with a higher input pose number does not override that with a lower pose number.
  • Weight Normalization: After normalizing the weight of each way pose, the curves are weighted and averaged.
  • Blend By Weight: Weighted average according to the weight of each pose.
  • Use Base Pose Value: Use the curve of the first way input pose.
  • Use Max Value: Use the maximum value of each way curve.
  • Use Min Value: Use the minimum value of each way curve.
Use ParameterAllowed to blend the animation poses according to the animation parameters after using them.
Desired AlphasEach item in the list corresponds to the Alphas expected to be assigned to each pin. If the "Is Normalize Alpha" is not checked, the normalized Alpha value will be used.

Blend Pose By Int

This node controls the output to switch among multiple inputs based on the Integer parameter.

Using Nodes

Right-click on the Anim Tree to open the Node Select panel. Expand the Blends category and select Blend Pose By Int.

image-20220909173257860

Blend Pose By Int added successfully:

image-20220909173310392

Click Add Pin on the node to add a new pin for it.

image-20220909173322718

Add Pin added successfully:

image-20220909173331549

Then you can configure the node with appropriate inputs/outputs.

image-20220909173338868

Property Settings

image-20230330160558529

PropertyDescription
Transition ModeTransition mode used when playing the node.
Blend TimeTime required for each pose to blend in.
Callback StringConfigure the callback function and decide whether to migrate based on the return value.
ParameterWhen checked, this property uses the animation integer parameter, and the drop-down list specifies the parameter from which the parameter control amount is obtained.

Layered Blend Per Bone

This node can add multiple layers of poses using a per-bone mask on the base pose. It is often applied to realize the demand that different parts of the character are driven by various animations.

Using Nodes

Right-click on the Anim Tree to open the Node Select panel. Expand the Blends category and select Layered Blend Per Bone.

image-20220909173416216

Layered Blend Per Bone added successfully:

image-20220909173425173

Click Add Pin on the node to add a new pin for it.

image-20220909173432807

Add Pin added successfully:

image-20220909173441596

Then you can configure the node with appropriate inputs/outputs.

image-20220909173454432

Property Settings

When a node is selected, its properties are shown in the Property Window.

image-20220909173503437

PropertyDescription
Blend Weight ListSet the weight of each layer.
Mesh Space Rotation BlendWhether to blend rotation in the mesh space.
Layer SettingLayer Setting Bone Weight Mask. Each layer represents the corresponding blend pose, and the number of layers is the same as that of the blend pose inputted. Each layer can be configured with multiple branches. Each branch can specify a bone as its root and a depth value as its transition depth. When the Depth is less than or equal to 0, the bone and its child bones will not blend but apply the base pose. When the Depth is greater than 0, the bone and all its child bones will blend with the base pose, gradually increasing the blend weight of the blend pose as the Depth increases.

Applying Additive Pose

This node can add sample data of the Additive Animation on the base pose.

Using Nodes

Right-click on the Anim Tree to open the Node Select panel. Expand the Blends category and select Apply Additive Pose.

image-20220909173535225

Apply Additive Pose added successfully:

image-20220909173543282

Then you can configure the node with appropriate inputs/outputs.

image-20220909173551300

Property Settings

image-20220909173559378

PropertyDescription
Use Weight ParameterIf checked, the animation parameter will be used. Select the float parameter. After using it, the blend weight can be determined based on the animation parameter. Uncheck to modify the value of the blend weight.
Blend WeightBlend weight.
Blend Weight OffsetOffset of blend weight.
Blend Weight ScaleScale of blend weight.
LOD ThresholdMaximum LOD allowed for this node.

Applying Mesh Space Additive Pose

This node can apply the sample data of the Apply Mesh Space Additive Animation on the base pose.

Using Nodes

Right-click on the Anim Tree to open the Node Select panel. Expand the Blends category and select Apply Mesh Space Additive Pose.

image-20220909173624349

Apply Mesh Space Additive Pose added successfully:

image-20220909173630211

Then you can configure the node with appropriate inputs/outputs. Note: The animation inputted from the Additive Pin needs to be configured as an Additive animation in Mesh Space.

image-20220909173637382

Property Settings

image-20220909173644179

PropertyDescription
Use Weight ParameterIf checked, the animation parameter will be used. Select the float parameter. After using it, the blend weight can be determined based on the animation parameter. Uncheck to modify the value of the blend weight.
Blend WeightBlend weight.
Blend Weight OffsetOffset of blend weight.
Blend Weight ScaleScale of blend weight.
LOD ThresholdMaximum LOD allowed for this node.

Creating Dynamic Additive Pose

This node can dynamically create data of Additive Animation.

Using Nodes

Right-click on the Anim Tree to open the Node Select panel. Expand the Blends category and select Create Dynamic Additive Pose.

image-20220909173653403

Create Dynamic Additive Pose added successfully:

image-20220909173700705

Then you can configure the node with appropriate inputs/outputs.

image-20220909173707415

Property Settings

image-20220909173715152

PropertyDescription
Mesh Space AdditiveWhether to create additive pose in Mesh Space.

Creating Saved Cache Pose Nodes

This node can save the output pose data of any node of the Anim Tree for other nodes to use.

Using Nodes

Right-click on the Anim Tree Edit panel to open the Node Select panel. Expand the Cached Poses category and select Create Saved Cache Pose.

image-20220909173744524

Create Saved Cache Pose added successfully:

image-20220909173752064

Click the title area to modify the name as needed.

image-20220909173758460

Add a Blend Space node and configure the node with appropriate inputs, so that the output pose of the Blend Space can be cached for other nodes to use.

image-20220909173806105

Property Settings

When a node is selected, its properties are shown in the Property Window.

image-20220909173814700

PropertyDescription
Cache NameEdit cache name.

Using Cached Pose Nodes

This node can output cached pose data for other nodes to use.

Using Nodes

Right-click on the Anim Tree to open the Node Select panel. Expand the Cached Poses category and select Use Cache Pose Saved Test Pose.

image-20220909173909969

Added it to the diagram:

image-20220909173916106

Then the cache pose node can be connected to any required node. E.g.

image-20220909173922964

Slot Nodes

The Slot node is used to insert animation poses played outside the Anim Tree for other nodes to use.

Using Nodes

Right-click on the Anim Tree to open the Node Select panel, select Slot under the Montage category.

image-20220909173933652

Slot added successfully:

image-20220909173940855

Slot nodes are often used together with Layered Blend Per Bone nodes to achieve upper and lower body movement synthesis for characters. E.g.

image-20220909173957562

When there is no input outside the Anim Tree, the input of the Slot“UpperBody” pin equals to the output. The character plays a Locomotion animation.

When there is input from the exterior, the node’s output will switch to the external input. The upper body of the character will be replaced by the inputted animation.

Property Settings

When a node is selected, its properties are shown in the Property Window.

image-20220909174009469

PropertyDescription
GroupSlot group.
SlotSelect different Slot.
Transition ModeSelect the transition mode when playing a Slot node.
  • Cross Fade: The weight of the original animation gradually decreases and that of the new animation gradually increases.
  • Inertia Transition: The inertia of the original animation is retained at the beginning of the transition, and it disappears gradually during the transition.

Other Nodes

Pose Snapshot

This node can use previously cached Pose Snapshots.

Using Nodes

Right-click the Anim Tree to open the Node Select panel, expand the Misc. category and select Pose Snapshot.

image-20220909174034626

Pose Snapshot added successfully:

image-20220909174041098

Pose Snapshot can be used to save a pose from a certain time in the past for future use.

For example, we can use it to achieve the effect of the character getting up after falling down in a ragdoll pose.

image-20220909174047457

Capture a Pose Snapshot when the character standing up, then switch from the snapshot pose to the playing standup pose by using Blend Pose By Boolean Value node.

Property Settings

When a node is selected, its properties are shown in the Property Window.

image-20220909174056151

PropertyDescription
Snapshot NameDesired name for the snapshot.

Annotation

This node provides annotations for the Anim Tree and marks out the area it covers, and offers text description and uniform drag-and-drop operations via the Title Bar.

Using Nodes

Right-click the Anim Tree to open the Node Select panel, and select Add Annotation.

image-20220909174119675

Add Annotation added successfully:

image-20220909174133279

The node can be resized by dragging and dropping it to encompass the area of the node to be annotated.

image-20220909174302098

And by setting the text in the Title Bar to complete the annotation of this area.

image-20220909174257386

Property Settings

When a node is selected, its properties are shown in the Property Window.

image-20220909174725054

PropertyDescription
AnnotationEdit annotation text.

Animation Post-processing Nodes

CCDIK

This node applies the CCDIK algorithm to parse the input pose.

Using Nodes

Right-click to open the Node Select panel in the Anim Tree, expand the Animation Post-processing category and select Add CCDIK.

image-20220909174752726

CCDIK added successfully:

image-20220909174758962

The pose that requires CCDIK solution can be connected to its input pin.

CCDIK Node Property Settings

image-20230330160724960

PropertyDescription
Target Error ValueThe maximum permissible value between the tip and the target.
Max IterationsThe maximum iterations of the solution algorithm.
Tip BoneTip bone.
Root BoneRoot bone index.
Callback StringExecute the callback string. When the callback string returns false, the node capabilities will not be executed.
Target Point NameMark the target point position of the bone.
Bone Rotation Limit ArrayA list of values separated by commas is used to limit the rotation of bones. If the array elements are less than the number of bones, the unmatched bones will not be restricted. If the array elements are more than the number of bones, the excess values will be discarded.
AlphaBlend weights.
Target Rotate TypeDescribe the rotation type of the Tip Bone after it is solved to the target point.
  • Tip Bone Source Rotation: Tip Bone rotation uses the Tip Bone to do the source rotation before IK.
  • After IK Tip Bone Rotation: Tip Bone uses the Tip Bone to do the rotation after IK(by default).
  • Target Position Rotation: Use the rotation of the target point as the rotation of the Tip Bone.

FABRIK

This node applies the FABRIK algorithm to parse the input pose.

Using Nodes

Right-click to open the Node Select panel in the Anim Tree, expand the Animation Post-processing category and select Add FABRIK.

image-20220909174836972

FABRIK added sucessfully:

image-20220909174843758

The pose that requires FABRIK parsing can be connected to its input pin.

Property Settings

image-20230130143231454

PropertyDescription
Target Error ValueThe maximum permissible value between the tip and the target.
Max IterationsThe maximum iterations of the parsing algorithm.
Tip BoneTip bone.
Root BoneRoot bone index.
Callback StringExecute the callback string. When the callback string returns false, the node capabilities will not be executed.
Target Point NameMark the target point position of the bone.
AlphaBlend weight.

TwoBoneIK

This node applies the TwoBoneIK algorithm to parse the input pose.

Using Nodes

Right-click to open the Node Select panel in the Anim Tree, expand the Animation Post-processing category and select Add TwoBoneIK.

image-20220909174928178

TwoBoneIK added successfully.

image-20220909174933373

The pose that requires TwoBoneIK parsing can be connected to its input pin.

Property Settings

image-20220909174944728

PropertyDescription
Tip BoneMarked IK tip bone.
Callback StringExecute the callback string. When the callback string returns false, the node capabilities will not be executed.
Target Point NameMark the target point position of the bone.
Joint Point NameJoint point position.
Alpha NameSpecify the name of the animation's floating point parameter, and use the value of this parameter as the blend weight.
Target Rotate NameSpecify the name of the animation parameter (string or vector type) and use the value of the parameter as the rotation of the target point, with the rotation components separated by commas for the string type.
Rotate From TargetWhether to rotate according to the target point.
Rotate From ParentWhether to rotate according to the parent bone.
Allow StretchWhether the bone allow stretch or not.
Stretch StartStretch start ratio.
Stretch MaxMaximum stretch scale.
Allow RotateThe maximum rotation angle of the target bone.

State Machine Nodes

State Machine

A State Machine node contains several states and transitions among states. Each state contains an Anim Tree and each transition includes a set of transition rules. Driven by external logic, the State Machine switches between states according to transition rules. The State Machine blends the output animation of the active state as its own output pose, and then passes it to its Anim Tree for further processing.

Creating State Machine Nodes

Right-click to open the Node Select panel in the Anim Tree, expand the State Machine category and select Add New State Machine.

image-20220909175011129

Add New State Machine added successfully:

image-20220909175017735

Click the title area of the node to enter the edit mode and modify the name of the State Machine.

image-20220909175024303

Double-click the node to enter the state graph of the State Machine node.

image-20220909175030937

The state and organizational structure can be created in the state graph.

Creating State Nodes

In the State graph, right-click to open the Node Select panel, and select Add State.

image-20220909175044243

Create a New State node.

image-20220909175052983

Click on the title area of the New State to edit the state name.

image-20220909175058541

Property Settings

image-20220909175104333

PropertyDescription
State NameEdit state name.
Start State EventThe name of the Start state event callback function.
End State EventThe name of the End state event callback function.
Fully Blend Into State EventThe name of the fully blend into state event callback function.
Reset On Every EntryWhether to reset the child nodes of the associated Anim Tree on every entry.

Creating Transition Nodes

An arrow representing transition can be pulled up by dragging the mouse from the state border.

image-20220909175146290

Release the mouse in the appropriate place, and a node selection menu will pop-up, then select the desired node to create.

image-20220909175153111

Select Add State.

image-20220909175200592

In this way, a transition state and a target state are created at the same time.

How to Build the State Machine

In practice, an overall design can be carried out in the state graph according to the action requirements of the character.

image-20220909175208112

And then implement state by state, transition by transition.

For example, double-click the Ground state node to open the associated Anim Tree.

image-20220909175219887

Various Anim Tree nodes mentioned above (including State Machine nodes) can be added to the Anim Tree to fulfill the desired ground action requirements. Here take the Blend Space Player node as an example:

image-20220909175232385

Once this state is set, you can use the Navigation Bar to jump out of the editing layer and return to the previous state graph.

image-20220909175239393

Next, edit other states and transition rules. For example, you can select a transition between the Ground and Begin In Air states and edit it in the Property Window to complete the configuration of transition rules.

image-20220909175246290

image-20220913132724147

PropertyDescription
Transition ModeTransition Mode to connect two state animations.
DurationThe duration applied to fade in and fade out.
Blend ModeThe blend mode applied to fade in and fade out.
PriorityAnimation Editor transition priority.
Switch Automatically When Action EndsWhether to stop the automatic switch when the previous state action ends.
Callback StringConfigure the callback function and determine whether to transit based on the return value.
Use ConditionsRefer to "Animation Parameters".

Conduit

Unlike a regular state, the Conduit can be regarded as a special state, which does not contain an Anim Tree. In addition to controlling state transitions, State Machine also provides a kind of node called Conduit for one-to-many, many-to-one or many-to-many state switching requirements. The Conduit is similar to a state where the Anim Tree has been removed. It has an internal “allow transition or not” rule. By configuring this rule, when a state attempts to transit through a Conduit, it can be determined whether further transition can occur through it.

Creating Conduit Nodes

In the state graph, right-click to open the Node Select panel, and select Add Conduit.

image-20220909175318306

Create a new Conduit node.

image-20220909175326312

Click on the title area of the newly created state to edit the name.

image-20220909175333512

Property Settings

image-20220909175340468

PropertyDescription
Conduit NameEdit conduit name.
Can EntryWhether can enter the conduit node.

Using Nodes

As shown below, the Killed node in the graph is a Conduit node. When the character is attacked in the Walk or Run state, and the health point is below the death threshold, the logic will control state to transit to the Killed Conduit node. Specific transition rules will determine which state to switch to.

image-20220909175406545

State Machine Property Settings

When a node is selected, its properties are shown in the Property Window.

image-20220913111732661

PropertyDescription
State Machine NameEdit state machine name.
Max Amount Of State Switch Per FrameThe maximum amount of running state transitions per frame.
Whether Reset When Re-entryWhether a reset is required during second entry, if unchecked, update from the last leaving state.
Whether Skip First Transition When InitializingIf checked, it will be directly transited to the state that satisfies the rules; Otherwise, the entry state is transited to the state where the rule is satisfied.

Copying/Pasting Nodes

To facilitate editing, the Flexi Editor allows users to perform copy and paste operations on all nodes and their connections within the currently selected area.

Build an existing node structure in the current Anim Tree, which you can choose to copy from an existing Anim Tree (This can be done between different Editors). The operation is as follows:

First, select a target area in the Anim Tree.

image-20220909175439183

Then use the shortcut keys Ctrl + C or right-click on any selected node and select Copy Nodes.

image-20220909175445471

Finally, press the shortcut keys Ctrl + V or right-click on a blank space in the target Anim Tree and select Paste Nodes.

image-20220909175457295

Animation Parameters

Each Anim Tree instance can hold a set of parameters that can be modified externally and read internally of the nodes.

image-20220909175508289

Adding Parameters

Click image-20220909175526888 to select a desired parameter type to add a new parameter.

image-20220909175516661

image-20220909175535459

Editing Parameters

In the new Parameter entry, Parameter Name, Parameter Value and Parameter Instance Value can be edited.

The Parameter Value refers to the default value of the Anim Tree.

The Parameter Instance Value refers to the parameter value in the current Anim Tree instance. Modifying this value can affect the Anim Tree in real-time.

Applying Parameters

For example, in the Blend Pose By Int node, the control values of node can be specified by using parameters, so that the animation data processing inside the Anim Tree can be controlled externally.

image-20220909175547700

Another example is that in the Mix Pose by Boolean Value node, various parameters can be applied for conditional expressions, and the final results are used to control the blend of nodes.

image-20220909175556404

Anim Curve Viewer

The Anim Curve Viewer is in off mode by default. Click Window -> Anim Curve Viewer to bring it up.

image-20230130145444319

image-20220909175610958

This panel displays the current values of the curve contained in the target skeleton in real time.

image-20230130145645144