Guides:Shader Motion: Difference between revisions
How to digitilize yourself, but this time it's the how to. |
m Usr 8ee44c1a-f905-4e08-bb61-e1cd34e09fc0 moved page Guide:Shader Motion to Guides:Shader Motion: Misspelled title: "Guides" namespame, not Guide |
(No difference)
| |
Latest revision as of 07:15, 1 April 2026
This guide explains how to set up and use ShaderMotion to record avatar motion in VRChat and export it as Unity animation files. ShaderMotion is a shader-based motion-to-video codec that encodes humanoid bone rotations into video color blocks. It can be used to record performances, create animations for worlds, and stream motion for live events.
Requirements
| Requirement | Details |
|---|---|
| Unity | A supported version of Unity for your VRChat SDK |
| VRChat SDK | VRCSDK3 (Avatar 3.0) |
| VR hardware | A VR headset; full-body tracking hardware (e.g., Vive trackers) is recommended for full-body recording |
| ShaderMotion | Download from GitHub and import into your Unity project |
| OBS (for streaming or recording) | Open Broadcaster Software or similar video capture software |
Setting up an avatar for recording
The VRC Avatar Addon included with ShaderMotion configures your VRChat avatar for motion recording and playback.
Import ShaderMotion
Copy the ShaderMotion project files into your Unity project's Assets folder. The project includes an example scene at Example/Example.unity that demonstrates the full system.
Set up the avatar
- Select your avatar's root GameObject — the one with a VRCAvatarDescriptor component.
- In the Animator component inspector, click the gear icon.
- Select "SetupAvatar" from the menu.
This prepares the avatar's animator for ShaderMotion integration.
Add a Motion Recorder
- With the avatar still selected, click the gear icon in the Animator inspector.
- Select "Setup Motion Recorder".
This adds a SkinnedMeshRenderer to your avatar that outputs motion data as a grid of colored blocks on screen. The motion data is a 6x45 grid of color blocks (within the full 80x45 frame grid) positioned on the left or right side of the screen. By default, the recorder is only visible to an orthographic camera with farClip set to 0, to reduce visual interference.
The rootBone property of the SkinnedMeshRenderer determines the origin of the recording space. By default it is set to the recorder itself. To record locomotion (movement through the world), set it to a fixed Transform and use an emote or gesture toggle to keep it stationary in world space.
Add a Motion Player (optional)
- Click the gear icon in the Animator inspector.
- Select "Setup Motion Player".
This adds a MeshRenderer that receives motion data from Motion.renderTexture for local playback. This is useful for testing and for setting up MotionLink on your avatar.
Set up the Animator
- Click the gear icon in the Animator inspector.
- Select "Setup Animator".
For Avatar 3.0, this modifies the FX layer and expressions. For Avatar 2.0, it modifies the override controller.
Upload the avatar
Upload the configured avatar to VRChat using the VRChat SDK control panel.
Recording motion in VRChat
- Launch VRChat and switch to the avatar you set up with ShaderMotion.
- Open OBS (or other video capture software) and configure it to capture the VRChat game window.
- Ensure the ShaderMotion color blocks are visible on screen. They appear as small colored squares along the edge of the screen.
- Begin recording in OBS.
- Perform the motion you want to capture.
- Stop recording in OBS when finished.
The resulting video file contains the encoded motion data alongside the normal game footage.
Recommended OBS settings
| Category | Setting | Recommended value |
|---|---|---|
| Video | Output resolution | At least 640x360 |
| Frame rate | 60 FPS (lower frame rates are noticeable in VR) | |
| Output / Streaming | Bitrate | 400-800 Kbps (scale proportionally if resolution or FPS is higher) |
| Advanced / Video | Color space | 709 |
| Color range | Partial |
Exporting animations
After recording, you can convert the motion video into a Unity .anim file using the AnimationRecorder tool.
Set up a playback character
In your Unity project, set up a version of your avatar (or any humanoid character) to play back the recorded motion. The character needs a ShaderMotion player component attached.
Create a C# player
Select the main renderer (typically a SkinnedMeshRenderer called "Body") on your avatar. In the Animator inspector gear menu, select "CreateMeshPlayer". This creates a player that reads from Motion.renderTexture.
Alternatively, use the MotionPlayer MonoBehaviour component, which can drive an animator from the motion texture. Unlike the shader-based player, the C# player requires custom scripts and does not work inside VRChat, but it is required for animation recording.
Play back the video
Enter Play Mode in Unity and play back the recorded video. The MotionPlayer or shader player will read the color blocks from the video and animate your character accordingly.
Record the animation
- In the Animator inspector gear menu, select "RecordAnimation".
- The AnimationRecorder captures the bone motion during video playback and saves it as a
.animfile.
The AnimationRecorder may run at reduced speed depending on system performance.
Converting to FBX (optional)
Exported .anim files work directly in Unity animator controllers. To use the animation in other software (such as Blender) or to access Unity's model animation import settings, third-party conversion tools can convert .anim files to .fbx format.
Setting up a world for playback
ShaderMotion includes a VRC World Addon that provides a sample VRCSDK3 world with a video player configured to drive a puppet avatar.
- Import the VRC World Addon into your VRChat world project.
- Place the provided prefab in your scene. It includes a video player and a puppet avatar.
- Configure the video player to play a ShaderMotion-encoded video (either a pre-recorded file or a live stream URL).
- The puppet avatar will automatically follow the motion encoded in the video.
Audiences in the world can move freely around the puppet avatar and view the performance from any angle.
Troubleshooting
| Issue | Possible cause and solution |
|---|---|
| Color blocks are not visible in OBS | Ensure the ShaderMotion recorder is set up on your avatar and the correct camera view is captured. The recorder is only visible to an orthographic camera with farClip = 0 by default. |
| Exported animation is too slow | The AnimationRecorder may run slowly under system load. Increase the playback speed in the animator controller, or edit the animation file to compress the timeline. |
| Motion appears jittery | Check that OBS is recording at 60 FPS with the recommended bitrate (400-800 Kbps). Lower bitrates or frame rates reduce encoding quality. |
| Avatar does not animate during playback | Verify that the MotionPlayer component is attached and that Motion.renderTexture is assigned. Ensure Play Mode is active in Unity.
|
| Locomotion is not recorded | Set the rootBone property of the recorder to a fixed Transform in world space. Use an emote or gesture toggle to lock it in place.
|
See also
Resources
- ShaderMotion on GitHub
- Original ShaderMotion repository on GitLab