Last Updated on April 24, 2022
VRChat consist of playable layers which allows you to carry out different animations. Each layers use a Unity Animator and overlay it on top of one other.
All of these playable layers are blended into a single animator when you run VRChat. This Animator is the root and most important animator of your avatar, and you can handle any part of it.
Read on to learn how to use custom animation in VRChat!
How To Use Custom Animations In VRChat
Step 1: Make an avatar folder and add the animation files to it.
Make a copy of the “SimpleAvatarController” located in VRCSDK2 > Sample Assets, rename it, and move it to your avatar folder in the asset folder.
If the animation you’ve imported is a fbx, you’ll need to first make it a “humanoid” in the “rig” tab, then collapse it and use Ctrl-D to extract the animation file.
Select the animation layer under the “Layers” tab by double-clicking your renamed AvatarController.
Step 2: Replacing Standard Walking Animations
Replace your walking animations in the inspector by double clicking on the blend tree. You’ll need Idle, forward walking, right, and left. You can put the walking forward animation in the same slot as the walking backward animation, and it will just reverse the animation. If you do this, you can skip to the last step below.
Step 3: Adding a New Animation When You Press and Hold a Key
In the Animator, select the Parameters tab close to the Layers tab. Toggle the animation by selecting “+,” “bool,” and the name you want to use.
Drag the animation you want into an empty animation layer space.
By right-clicking and selecting “make transition,” you can create a transition from the blend tree to your animation.
Select the connecting arrow line and add a condition by clicking “+” under conditions, then selecting your newly formed parameter name from the left dropdown list and “true” from the right dropdown list.
Create a transition from your animation to the blend tree and repeat previous step, except this time the correct condition should be “false.”
Is It Possible To Use The Same Controller In Different Playable Layers?
As an aside, you should never use the same controller in several playable layers. This may work in some situations, but it is poor practice and will cause severe problems when your avatar’s functionality expands.
What Do Playable Layers Do?
The base layer comprises locomotion animations such as walking, running, and strafe blending trees. Jumping, falling, dropping fast, crouching, and crawling are among the animation states included. Keep in mind that putting something here will require you to redefine your locomotion animation states.
The additive layer is designed for additive transform motion on top of humanoid bones that are animated in the base layer. Because it is always set to “Additive” blending, the additive layer is unique.
The gesture layer is for animations that need to act on specific body parts while the underlying animations for the rest of the body continue to play. It’s similar to AV2 Gestures, but it may be used on any area of the body.
Use Avatar Masking to make sure the animations only impact the sections of the avatar you wish to move! So, if you just want your gesture parameters to produce left/right hand shapes, you’ll need to mask those hands out on each of the layers.
When you require complete control of the character, use the Action layer for bone animations that will override all other layers.
By default, this layer is blended to zero. Use the Playable Layer Control State Behavior to mix this layer up before transitioning to the actual action you’re doing before doing anything in the action layer.
FX is a unique layer. Material animations, shader property animations, and blendshape animations should not be used on any other layers because they aren’t replicated to your mirror clone.
However, everything is transferred over to the FX layer! If you’re utilizing Viseme parameters, this is where you’ll place them. To put it another way, everything that isn’t a transform or muscle animation should be placed on the FX layer. This includes shader animations, enabling and disabling game objects, particle system animations, components, material swaps, and so on.