How to create a Preview Camera on your avatar [Tutorial]

How to create a Preview Camera on your avatar and will always follow your head. A very useful feature to have for avatar makers or streamers.

Before I start, I want to give a shout to Smash-ter for showing me how to set this up and Lyuma for creating the unity package.



First, you need to download the Lyuma Unity Package and set it up in a folder to keep things orangized.

LyumaAvatarCam_v7.unitypackage - Google Drive

Constructing Cam Container

Create four game objects and rename them all shown.

Main Camera


Also make sure you set all the positions to 0.



Highlight the Shader and add a Parent Constraint. Check the boxes Is Active and Lock. Locate the Head armature of your avatar and drag it into the Sources. After you drag the head in the sources, Uncheck and check the Lock box to program the position Axis.


The same thing with the Shader, highlight the Main Camera but add a Position Constraint.


Combining the Cam Container

Now you can drag the game objects together. Also to make it complete, you can right-click the Main Camera and add a Camera.

Shader > CamContainer
Preview > Shader
Main Camera > CamContainer
Camera > Main Camera


Go to Preview and click on Layers. There you need to set 4 layers and make sure you spell them correctly. Once you added all the layers, set the preview to UiMenu.


Create Materials

(Optional) Drag the QuadAssetLargeBounds in the Materials Folder.
Right-click and create a Render Texture and call it Camera Texture. Right-click again to create a material and call it Preview Material.

Camera Texture Settings


Camera Settings

NOTE: In Culling Mask. Turn off everything and only have it set to MirrorReflection.

In the Background, you need to set it to a specific color in the hexadecimal.
Background Color: 030303

For a quick test, in the Culling Mask turn the Default and move your camera until you find a good a spot. Make sure you give a good space for your avatar to move its arms up and down. Just in case to prevent clipping.


Preview Settings

NOTE: In the Preview Material drag the Camera Texture into the empty slot. Just under the VR Multiply Color.


You can now drag the CamContainer onto your avatar and give it a build test. Which of course it might not work in the first try. This is where you need to set some of the preview settings on your own depending on what you’re using in Additional Show Condition. Moving the X and Y Offset it is optional to size the preview up or down.


For more information on how I did it. I made a video on how to set up the Preview Camera.