Animator editor - Outerra/anteworld GitHub Wiki

Animation editor can be found in Plugins -> Animation -> Animator editor

image

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.

image

Editor views

Hierarchy

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

image

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.

image

Note: You can move in the animation graph by holding middle mouse button, when the mouse is in the animation graph space, and moving the mouse.

Expression

Animation graph supports simple expression evaluator for node conditions.

image

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

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

Note: input "Retract", that is used in condition in the example image above, is defined in "Inputs" tab.

image

This input is later used in script, to set it's value, when player presses the gear retract/extend button. This plays the appropriate animation.

For more information, see Using animator inputs through script .

Nodes

To add new node, you have to right click in the animation graph space (where the landing gear nodes are located in the picture), and choose desired node from the shown list of nodes.

image

Every node has following properties:

  • Name - text representation of node used in the Hierarchy view and in transition definitions
  • Condition - expression, that must be true, for to node to be selected and it's animation played
  • Selectable - if checked, the node can be entered from any other node (if condition is true), even if there are no transitions connected to it from the last active node. This mechanism lighten transition definitions, that usually ends up as from every node to every node.
  • Events, Entry events, Exit events

Note: each node type has it's own color.

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, slow down or play the animation in reverse (if the value is negative)
  • Loop - if true, animation will be played in loop
  • Animation slot - name of slot used (in this case, the gear retract animation is called "Scene"...)
  • Weight - used for weighting probabilities of animation picking

image

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
  • Value - value on input axis
  • Animation slot - name of slot used

image

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 slot - name of slot used

image

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 animation parameters
    • 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 slot - name of slot used

image

Group Node Used as container, to group multiple nodes together.

image

Layers Node

image

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

image image

Null Node

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

image

Input Node

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

  • Input - animation input of type float
  • Animation slot - name of slot used

image

Transitions

To create transitions from a node, hold ctrl + left mouse button click & hold on the node. The transition is set to another node, when you release the left mouse button on that node.

image

These transitions properties are primary used when exiting node

  • Blend length - duration of blending when switching to another node
  • Condition - to transition be used, this expression must be true
  • Has exit time - if the transition should have exit time
  • Exit time - relative time at witch transition can be used

image

Animation 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

Clips

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.

image

Note: in this case, "Scene.anim" animation file is used to animate gears retracting/extending proces.

Inputs

Management of input values used in nodes and conditions as parameters. This is the only way to manipulate the state of animation instance from outside. Programmer can access these values and set them as they like. Supported types are: float, bool and int.

image

Constants

Constants are used in Conditions for better readability.

image

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.

image

IK

In this tab, 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.

image

Debugging

In animator editor

In animator editor, you can start debug session by clicking on the start button, which is located on top.

image

When debug session is active, in Graph tab you can check which node is active and what is the state of transition, by the yellow frame around the node and the percentage indicator.

C47_gears_animation

⚠️ **GitHub.com Fallback** ⚠️