Stereoscopic rendering with the Google VR SDK ?

Hello Everybody I am building an app for the google daydream that makes use of 2D stereoscopic images. I am having issues figuring out how to set up my Main camera and how to tweak the instances of the left and right eye camera that the API creates.

Essentially I would like to create a Left eye camera that has a culling mask that only includes the left eye images and a right eye camera that only renders the right eye images.

Here is my main Camera in the inspector am I missing anything ?


Also is there anyway for me to set the Left and Right eye camera culling mask values outside of manipulating them through code ?

Click on ā€˜Update Stereo Cameras’ you will get two camera as child, then you can set culling mask on both of these cameras.

We’ve developed a shader for this and it’s now been approved on the asset store, here’s the link:

Video:

Hey Everybody I just returned to this and after trying to update the stereo cameras I am still having issues rendering in Stereo . It almost seems like the ToggleCullingMask enum isn’t working on builds even though I can see that it’s working in editor .

Here is my main Camera :

my left Camera:

and my right camera:

am I setting something wrong ? Also I am noticing that when I set the target Eye property on the individual eye cameras themselves, they default to whatever the main camera is set to at runtime . If the main camera is targeting both eyes could that be the source of my issues? Is there anyway I can stop The main camera from setting the target eyes of the children cameras at runtime ? Thank you for any and all help .

On further investigation the settings work perfectly in editor , however on builds it seems like my cameras culling masks or Stereo settings are being set or the entire stereo camera rig whose settings I set are replaced. has anyone else encountered this ?

are you using Unity 5.6 with native integration? Then this won’t work because there is no left and right camera in the run-time build, only in the editor.

GVR 1.5 also removes the GVR stereocontroller, eye and gvrmain etc scripts it’s being replaced by an editor script that only moves the camera around in monoscopic view.

You can either mimic the setup by having a Main Camera, Left Eye Camera and Right Eye Camera with the ā€œTarget Eyeā€ property set to Left and Right and the main camera on Main Display (I think).
If you can’t figure it out, getting the asset Selzier made would be a quick solution, I’m not sure how well it works though as I haven’t tried it myself since it is another $20.

Wow Thank you Masked Mouse , I am using 5.6 with Native integration so I’ll roll my project back to an earlier version of unity and perhaps an earlier version of the GVR .

if you want to benefit some of the features in 5.6 you could potentially use the non-native GVR 1.40 in Unity 5.6
https://forum.unity3d.com/threads/unity-5-6-0f3-native-gvr-android-ios-enabling-and-disabling-vr.464499/#post-3064592

I’m not sure if it works well as I haven’t tried that yet either since we’re just waiting for a fix of GVR overall since it is not working properly on iOS using a later version than Unity 5.6.0p1 (i.e 5.6.0p2, p3, p4, 5.6.1 are broken)
GVR native is just a buggy mess to work with thats for sure.

1 Like

Thank you again , I will try using the non-native version then !

By re-reading your opening post, you’re targetting daydream ain’t that 5.6 and higher only?
Not sure if that non native approach will work without the daydream sdk in the virtual reality supported but it is worth a shot I guess

If ya cant get it done, don’t waste too much time on it :wink:
Might want to consider to buy the asset

1 Like

You may be right Masked Mouse and yes you are right I am targeting Daydream specifically. I’ll take your advice and look at the Asset . I’ve spent far too much time trying to sort this out.