Animator Controller Group

🚧

In this document, we assume that you already know about Unity Animator Controller.

We will explain how our animations are designed and how Animator Controller works in an easy-to-understand way.
But this is still an engine feature that needs to be understood through learning. The following document is written assuming that you understand Animator Controller.

For more information, please see Unity's official documentation on the animation system: Animation Overview

Our avatar consists of 8 layers of Animator Controller, each of which is used to control the effects of different avatar behaviors.

  • Base Layer: Used for animating your avatar as it moves while standing (eight directions), crouching (eight directions), and jumping.
  • Additive Layer: Used for playing additional animations when your avatar is doing other actions. Additional animations such as breathing and swinging hands will be added on top of the base layer.
  • Action Layer: Used for playing some custom human bone animations for your avatar. Animations, such as bone displacement and rotation on your avatar, should be added to this layer.
  • Posture Layer: Used for animating your avatar when it's doing some special behaviors. Specifically, this layer is used for animating the avatar when it is sitting down.
  • Gesture Layer: Used for animating your avatar's hands when it's using its hands, such as raising the hand when picking up an object.
  • FX Layer: Used for customizing any non-human bone animation. You're free to customize this layer as you wish.

The animation effects of any above-mentioned Animator Controller layer will override animations of lower layers by sequence (down to top). For example, when you play the animation effects of the action layer, its animation effects will override those of the base layer (in most cases).

There are 2 special layers:

  • T-Pose Layer: A special Animator Controller, which sets the T-Pose of the avatar and assists in calculating the avatar's viewpoint as well as the position and orientation of its palm.
  • IK Layer: A special Animator Controller, which sets the avatar's IK-Pose and determines the major bending settings of joints. This is a reserved special posture that will be used on VR devices later on.

In SDK, each Animator Controller layer has an official default configuration to ensure that your avatar always has an available Animator Controller.

You can fully customize any Animator Controller layer to create animation effects for your avatar.


❗️

Attention!

Please copy an official default file and create your own Animator Controller based on official specifications, as there are some required parameters.

Operation buttons of the platform are associated with some specific parameters. If you change the names of such parameters, the platform's features will not be performed normally.

For example, the parameter for walking forward is Forward. If this parameter does not exist in your custom Animator Controller, the walking-forward animation effect of your avatar cannot be played.

However, you can still change the entire Animator Controller if you want. Yet for the reasons above, some animation effects of your avatar may become abnormal.

Please make sure that you are fully aware of the effects at runtime when you make every modification to the Animator Controller.

Base Layer

The base layer of the Animator Controller is used for animating your avatar as it moves while standing (eight directions), crouching (eight directions), and jumping.
Please note that the standby effect while standing is also a movement animation.
The animations for standing, crouching, and jumping are all composed of animation trees.

The default Animator Controller is the standing Animator Controller. You can use the Turn and Forward parameters to play movement animations of a standing avatar. You can use the left joystick of the platform to adjust the values of these two parameters.

  • When the Turn parameter is set to be a positive value, the animation effect of moving rightward will be played. When the Turn parameter is set to be a negative value, the animation effect of moving leftward will be played.
  • When the Forward parameter is set to be a positive value, the animation effect of moving forward will be played. When the Forward parameter is set to be a negative value, the animation effect of moving backward will be played.

Jumping Animation
To trigger a jumping animation means that your avatar is not "standing" on a collider. In practice, the jumping animation will be played when your avatar leaves the ground.
When your avatar leaves the ground, the parameter OnGround will be set to False, and the jumping animation tree will start to play animations. After you press the jump button on the platform, the avatar will leave the ground, and the jumping animation tree will start to play animations.
Then, you can use the Jump parameter to control the playback of the jumping animation.

Crouching Movement
The crouching animation tree is triggered when the Crouch parameter is set to True. You can set this value by pressing the crouch button on the platform.
When the avatar crouches, you can use the Turn and Forward parameters to play movement animations of a standing-crouching avatar. You can use the left joystick of the platform to adjust the values of these two parameters.

  • When the Turn parameter is set to be a positive value, the animation effect of moving rightward will be played. When the Turn parameter is set to be a negative value, the animation effect of moving leftward will be played.
  • When the Forward parameter is set to be a positive value, the animation effect of moving forward will be played. When the Forward parameter is set to be a negative value, the animation effect of moving backward will be played.

Additive Layer

The additive layer is used to play animations of additional human bone movements, such as chest breathing effects, on top of the movement animations played on the base layer.

The additive layer will keep playing animations. We recommend you not to add animation files with very large motions on this layer. If you do so, additional animations may integrate poorly with basic animations.

  • By default, the additive layer is empty, without any additional animations added.

Action Layer

The action layer is used to play some human bone animations such as dancing.
Please note that "human bones" here refers to the standard Humanoid bones in Unity. Therefore, the bones of the animal ears, tails, and appendages in your avatar are not considered human bones.

You can add animations of non-human bones on this layer. However, we strongly recommend you not to do so if you want to ensure the collaboration of avatar animations.

By default, SDK will configure the official default settings of the action layer for you, which contain 19 different expression actions to ensure basic expression performance.

For information about basic expressions, please see the Para Avatar Expression chapter.


Posture Layer

The posture layer is a special Animator Controller that is only used to design the animations of your avatar's movement of sitting down.
When your avatar interacts with the seat component on the platform to sit down, the avatar's action is subject to the animations on the posture layer.

The author of the map can also customize the animations of sitting on the seat. The author-defined animations of the sitting posture will override your custom sitting animations.

The parameter to control sitting is Seated. This parameter will be set to Turn when you trigger a seat on the platform, the sitting animations will be played.
You can replace the posture animations here to customize the sitting position for your avatar.


Gesture Layer

The gesture layer is an Animator Controller that is specially used to design and configure the animations of your avatar's movement of picking up items.
When your avatar picks up an item, the corresponding animation on the gesture layer will be played.

This Animator Controller has three sub-layers by default, all of which contain masks for human bones:

  • Both-Hand Layer: This layer is empty by default. Among all animations of human bones, only the animations of both hands will take effect on this layer.
  • Left-Hand Layer: This layer contains the animations of raising the left hand when it picks up props. Among all animations of human bones, only the animations of the left hand will take effect on this layer.
  • Right-Hand Layer: This layer contains the animations of raising the right hand when it picks up props. Among all animations of human bones, only the animations of the right hand will take effect on this layer.

The parameters for picking up items are GestureLeft and GestureRight, which are for left-hand and right-hand gestures, respectively. When the value of the parameter is 1, the picking-up effect will be played.
On the platform, picking up any item will set the value of such parameters as 1.


FX Layer

The FX layer is a special layer that is used to design and configure any non-human bone animation effects.
On this layer, you should add effects such as tail shaking, item switching, component switching, component parameter adjusting, material image replacing, and particle emitters.

When editing animation files on this layer, avoid adding animations that contain human bones.

You can also configure human bone animations on the FX layer. However, we recommend you not to do that, as this may cause your customized animations to conflict with those on the posture and gesture layers.

You can unleash your creativity on action layer and FX layer without limitations.