Using Multiple Camera and GUI

I am developing a VR application. I will show the different object to the left and right eyes. I will have a GUI that I will not show in VR HMD. I want to show left and right camera view and my gui on the desktop monitor. is this possible?

is this impossible?

More information on your setup would probably get some more/better answers. I’ll take a guess and believe you’re using SteamVR. As such, it is possible yes.

Drawing or not drawing to different cameras is fairly easy by using the camera’s culling mask.
Unity - Manual: Camera component ← should find some info there.

I want to see that;
3378319--265070--upload_2018-2-2_21-21-55.png

Set up a second UI only camera and set its layer to UI in the components dropdown. Have the other cameras not use the UI layer. The next trick after that that I am seeking i how to get the OVR pointer events and have them trigger clicks that are already on the UI buttons and widgets.

I think I couldn’t explain my problem well. I have not a problem with the vision on the oculus rift. when i start my application it opens a window on my desktop. it shows just left or right eye camera vision. i can add a camera to my scene to see a UI just on desktop window. i set this camera’s target eye as “None (Main Display)”. i set this camera viewpoint rect as X:0 and Y:-0.7. so I can get MY CANVAS UI part as i sent in my previous post. When i use camera viewport rect parameters to get LEFT EYE and RIGHT EYE parts it affects the vision on oculus rift. i can add 2 cameras more and make them the child of Oculus LeftEyeAnchor and RightEyeAnchor camera game objects.then i can set viewport rect to get LEFT EYE and RIGHT EYE parts. This will mean double rendering. How can I get left and right eye camera renders of Oculus and show them separately on the window on my desktop?

Ya know… Digging through hundreds of docs yesterday I did come across some render VR thing that passed the string (“Split”). I just woke up and am having coffee so my memory of it is vague but using Split in your searches may help you find the method.

@ippdev afaik split is to generate output for google cardboard devices. i use oculus rift. i googled unity vr split and i found info for cardboards.

When i use target texture feature, i get what i want on application windows. this time HMD is black. As i understand oculus gets left and right camera output directly to the HMD displays. It shows just left eye camera output as full screen. i think only workaround for this, is to use 2 more cameras as child of anchor cameras for ui panel.

at last, i did it;

void OnRenderImage(RenderTexture src, RenderTexture dest)
{
Graphics.Blit(src, dest);
Graphics.Blit(src, TargetRenderTexture);
}

1 Like