Gvr-unity-sdk: GVRViewerMain is missing?

Created on 3 Aug 2017  Â·  14Comments  Â·  Source: googlevr/gvr-unity-sdk

Hi GoogleVR Folks.
I'm trying to figure my way into using your SDK.
Many tutorials I have seen mention starting with GVRViewerMain, but i think its missing from 1.70.0 ?
Anyway. Love the demos. Trying to make my own. Hope there is something to replace GVRViewerMain!!!

<3
drew

documentation bug question

Most helpful comment

GVR Viewer Main camera problem solved.
try this link:
https://www.youtube.com/watch?v=Qn5BCG8SPN8

All 14 comments

It isn't missing, there is now native support for cardboard and daydream in unity (since 5.6)

Is there any way to config myself in 1.7.0? like hide "setting button" use vr mode?

With the native support for Daydream/Cardboard in Unity 5.6 and beyond, there is no longer a need for GVRViewerMain, you simply configure the VR SDK in Player Settings > Other Settings > Virtual Reality SDKs: add Daydream and/or Cardboard as appropriate for your project. Your main camera will automatically become a VR camera. The GVR Unity SDK (since v1.40) no longer supports versions of Unity older than 5.6.

We will update our tutorials and documentation accordingly. Thank you for pointing this out.

@theboneses Currently the best place to get started is to open up the different demo scenes which are included in the SDK. Just type t:Scene in Unity's _Project View_ to see all scenes. Look for the GVRDemo scene as a starting point. (Note that the GVRDemo scene supports both Daydream and Cardboard, via the DemoInputManager prefab, so there's likely slightly more there that you need to get started.)

You might also find it helpful to read through recent release notes.

Hi, I've been following tutorials for a stereoscopic project that reference the right eye and the left eye in GVRViewerMain in order to provide a different image to each eye. With the depreciation of GVRViewerMain, I no longer have access to the creation of a left and right eye and culling masks. Do you have any advice on how to manage stereoscopic images? Thank you

I'm not sure but they may be created at runtime, try to print the children of the "mono" camera

You could also create 2 cameras, one for the left eye, and one for the right. See https://docs.unity3d.com/ScriptReference/Camera-stereoTargetEye.html (which can be set in the inspector).

You can also write a custom shader for your stereo image that selects different regions of the source image based on eye index. The gvr video shader has this capability:

https://github.com/googlevr/gvr-unity-sdk/blob/27666a66e54427758c8a6aaa6701084ffd456cff/Assets/GoogleVR/Shaders/Video/VideoUnlitShader.shader#L60

This is probably going to be the most efficient implementation of stereo image rendering. No extra cameras or special culling.

On Wed, Aug 16, 2017 at 9:51 AM Rus Maxham notifications@github.com wrote:

You can also write a custom shader for your stereo image that selects
different regions of the source image based on eye index. The gvr video
shader has this capability:

https://github.com/googlevr/gvr-unity-sdk/blob/27666a66e54427758c8a6aaa6701084ffd456cff/Assets/GoogleVR/Shaders/Video/VideoUnlitShader.shader#L60

This is probably going to be the most efficient implementation of stereo
image rendering. No extra cameras or special culling.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/googlevr/gvr-unity-sdk/issues/675#issuecomment-322832980,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKyK9VAFOEZ-MFEuHMtn56HkuQXWyNDNks5sYx4BgaJpZM4Or3QP
.

Rus,Thank you for the info. It's a bit much for me to implement at my
current state of knowledge, but I'll take a look and see what I can figure
out.

Hi Rus,
That is sooo slick! I played around with it and got to work. (Learned some
new things as well) I can't thank you enough for your help.
Peter

On Wed, Aug 23, 2017 at 10:54 AM, Rus Maxham notifications@github.com
wrote:

Here's a somewhat simpler example written in CG instead of GLSL:

https://github.com/googlevr/media-app-template/blob/
1c6d13e77b4b6f01fc4fe2864276f1e3d5ca03bb/Assets/MediaAppTemplate/Shaders/
MediaScreen.shader#L56

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/googlevr/gvr-unity-sdk/issues/675#issuecomment-324412882,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKyK9Z9zc0wBt681a6ITzcjCRrKhxwf9ks5sbGc1gaJpZM4Or3QP
.

Yeah, the shader lab stuff is daunting at first glance, but super satisfying when you figure it out and make some really powerful stuff. Totally worth taking the time to climb the learning curve. And there's plenty of shader code out and about on the internet in source code form to learn from. If you start feeling super saucy with shaders, check out https://www.shadertoy.com/. That place make my head asplode.

GVR Viewer Main camera problem solved.
try this link:
https://www.youtube.com/watch?v=Qn5BCG8SPN8

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pandailing picture pandailing  Â·  4Comments

jahKIper picture jahKIper  Â·  3Comments

vinhui picture vinhui  Â·  6Comments

RangerMauve picture RangerMauve  Â·  5Comments

vinhui picture vinhui  Â·  6Comments