Putting a Avatar Camera on an Avatar

Alrighty, here’s some background with my issue. I do a lot of VRChat streams and I had the setup where I’d use the SteamVR Mirror as my POV and the VRChat Stream Camera output as a “webcam” type thing where it would be pointed at my avatar so people could see what I was doing. I chose this because VRChat’s first person mirror had awful FOV and the jitters were crazy.
The issue that I had was that the SteamVR Mirror FPS was half or even less than my actual FPS (this is just SteamVR Mirror’s limitation). This lead to me having a low FPS POV and high FPS webcam in the corner.

Once VRChat released the smoothed desktop output first person POV, I was very happy because I could have a high FPS POV without the intense jitters (still limited FOV), but I had to lose my webcam camera for my stream because you can’t use the smoothed POV and Stream Camera at the same time as different outputs. Limitation of only one desktop mirror.

Here’s what I’m looking for:
I know many streamers had similar effects built directly into their avatars previously. Where they used a Camera component on their avatar to create the webcam of their avatar to show on stream. They did this before Stream Camera was introduced as well as other things. I’m curious about how it works and if somebody can point in the proper direction/resources to figure out how to do it myself.
As far as I’m aware, I need a camera on my avatar pointed at me, I need to find out a way to make it so the camera output is somehow only rendered on my viewpoint/face so when I am in that avatar I see a mini camera of my avatar, this will be the webcam part in the stream, and I need to make it so that the camera output doesn’t render this on top of anyone else’s screen as well.

So, how do Unity cameras work, how can I get the camera output to render onto my POV and stick properly (perhaps some sort of screenspace shader or something?) and how do I prevent it from annoying everyone else.

I saw someone mention they used the camera component to render a crosshair onto their screen for their weapons, and other people use it or a shader to create a HUD like thing, so I’m thinking this will be very similar.

Here’s something I wrote for showing a camera on-screen.

It’s really configurable. you can change how it is positioned on desktop view and on VR view separately. Message me at Lyuma 0781 on discord if you have any questions!

Desktop / Camera “Screenshot” button / Photo Cam / Stream Cam looks like this:

VR / SteamVR Screenshots / Headset View looks like this:

Note how you can make it transparent in VR and in the center while keeping it opaque and out of the way otherwise.

This is designed to work in stereo (cross your eyes and look at the VR screenshot above) , so make an object pointed at you, and put two identical cameras inside it, slightly offset on the x position + and -. one for the left eye and one for the right eye. I highly recommend stereo since it feels more immersive to see yourself, but you can of course just use it in mono. You can also set it to only show up on the stream camera, or vice versa, etc.

Be considerate of course in how it is used, by making sure it is only enabled locally for you: Easiest way is to make sure the camera components are enabled by default. That way, it will only render for you. Works best if you tell it to only render MirrorReflection, and you can put the AvatarCam object on the UIMenu layer to avoid it rendering to itself.

Note: if you do turn on the cameras with an animation, your friends may lag by rendering the camera, so make sure not to animate it on for friends. In AV3, you can solve this by using the IsLocal bool parameter to avoid turning it on (Cameras and their attached textures are destroyed for non-friends anyway)