Skip to content

Animator editor

Jakub Lukasik edited this page Nov 15, 2023 · 1 revision

Animation editor is part of the Outerra editing tools. It is possible to create or edit animation graphs (*.graph), that are used by animation system to skin animate skeletal models. Editor also provides debugger, that can be attached to model at runtime to observe current state of graph.

Animation graph

Graph is kind of state machine that is playing and blending animations. Main source of state changes are animation inputs that are fed from outside. Outputs from graph are animation events, that can be used to update code states or play some effects.

Expression

Animation graph supports simple expression evaluator for node conditions.

Operators: <> = * + / <= < >= > and or not

Functions: sin(value), cos(value), eq(value1, value2, epsilon)

Editor views

Hierarchy

In this view, nodes can be added or removed, they can be connected via transitions or layered with mask.

Node

This view shows properties of selected node for edit. Multiple node types are supported, list and detail about their functionality is listed below.

Every node has following properties:

  • Name - Text representation of node used in the Hierarchy view and in transition definitions Events, Entry events, Exit events

Simple Node

Used for simple animation playing, more then one animation can be defined, animation to play will be picked by weighted random.

  • Time multiplier - used for speed up or slow down animation
  • Loop - If true, animation will be played in loop
  • List of animations
    • Animation - Name of slot used
    • Weight - Used for weighting probabilities of animation picking

State Machine Node

Regular state machine with one improvement. If children node is marked as selectable, it can be entered from any other node. This mechanism lighten transition definitions, that usually ends up as from every node to every node.

  • Blend length - Duration of blending when switching from one node to another without transition

Every child node also defines these properties:

  • Condition - Expression, that must be true to node to be selected
  • Selectable - If true, node can be entered from every node.
  • List of transitions - These are primary used when exiting node
    • Blend length - Duration of blending when switching to another node
    • To - Node to transit to
    • Condition - To transition be used, this expression must be true
    • Exit time - Relative time at witch transition can be used

Blend 1D Node

Every animation in list specifies value at which should be played, defined float input controls which 2 animations are playing and blended together. Useful for movement (forward, idle, backward) or aiming (45°, 0°, -45°)

  • Input - animation input of type float
  • List of animations
    • Value - Value on input axis
    • Animation - Name of slot used

Blend 2D Node

Every animation in list specifies two values at which should be played, defined two float inputs control which 3 animations are playing and blended together. Useful for movement (2D planar movement)

  • X Input - animation input of type float (x axis)
  • Y Input - animation input of type float (y axis)
  • List of animations
    • X Value - Value on x input axis
    • Y Value - Value on y input axis
    • Animation - Name of slot used

Direct Blend Node

Blending all animations at the same time. Every animation is weighted from 0 to 1. Useful for morph targets or additive animations.

  • List of animations
    • Input - Animation input of type float
    • Min - Minimum value of input (zero weight of this animation)
    • Max - Maximum value of input (full weight of this animation)
    • Animation - Name of slot used

Layers Node

Child nodes (layers) of this node are played in order and later ones override prior changes. With using of mask, this node is useful for animating selective group of bones differently on top of generic animation (for example full body walk with bone masked animation of hands on top) Every child node also defines these properties:

  • Mask - Name of mask used, or none

Null Node

Useful for state that do nothing (for example, default state of layer)

Input Node

Animation time parameter is controlled by input. Useful when user wants to animate programmatically.

  • Input - Animation input of type float
  • Animation - Name of slot used

Slots

Named fields that are referenced in nodes. Animations are never directly referenced in node properties but slot indirection is used, more info in section Animations

Animations

In this section animation files are managed. Every animation used by graph must use slot, so animation system knows what animation file to use when some slot comes to play and also every animation must define what set it is part of. Sets are mechanism to easily change every animation for graph without defining whole new copy of graph. It can be used for example for characters, one graph created, and on slot 0 are male animations and on slot 1 are female animations. Default active animation set is 0.

Inputs

Management of input values used in Conditions or in Nodes as parameters. This is only mechanism how to manipulate with state of animation instance from outside. Programmer can access these values and set as they like. Supported types are: float, bool and int.

Constants

Constants are used in Conditions for better readability.

Layers

Layer masks are lists of bones, that can be used in Layer for masking which bones will be affected by resulting layer animation pose.

IK

In this place inverse kinematics chains can be defined. Up to 8 chains can be created each with maximum of 16 bones. These chains can then be programmatically controlled by two parameters. First parameter is desired target position of leaf bone, and second is weight of solution to existing animation pose.