Search Unity

Target Eye Right doesn't work

Discussion in 'Daydream' started by Hemuuuli, Feb 14, 2017.

  1. Hemuuuli

    Hemuuuli

    Joined:
    Dec 18, 2012
    Posts:
    19
    I have a situation where I need individual cameras per eye, one using target eye right and another left.

    If I have two cameras in the scene, one for each eye, only left eye gets rendered. This error doesn't show up in the editor play preview, a build is needed.

    Problem is easy to repro, just add two cameras, one per eye and build the game for the device.

    I am using Unity 5.6.0b7 and Google VR SDK for Unity v1.20. The game renders correctly using GearVR with similar setup.
     
  2. thep3000

    thep3000

    Unity Technologies

    Joined:
    Aug 9, 2013
    Posts:
    400
  3. Hemuuuli

    Hemuuuli

    Joined:
    Dec 18, 2012
    Posts:
    19
  4. dmoroni

    dmoroni

    Joined:
    Mar 10, 2015
    Posts:
    23
    Hi, is there any news about this issue?

    Currently (v 2017.1.0p4) it seems the "Target Eye" field in Camera inspector is not working at all. If I set it to "Left" or "Right", the camera doesn't render anything, while setting it to "Both" works as usual and objects are visbile.

    I mainly work with 360 stereo pictures and movies so that's really a big problem for me, I hope it will be fixed very soon.

    Riccardo
     
  5. MarkGUnity

    MarkGUnity

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    1
    Are you using Single Pass Stereo rendering? And could you provide a repro project with the issue you are experiencing?
     
  6. dmoroni

    dmoroni

    Joined:
    Mar 10, 2015
    Posts:
    23
    I'm using GearVR and Multi Pass Stereo rendering. Anyway, I also did an attempt with Single Pass and in that case I had just the Left camera working and rendering all the objects layered "Left" and "Right" (it's the usual 360 stereo setup, with two spheres on two different layers, each one visibile to just one camera). Unfortunately I wasn't able to replicate it, so right now i have cameras rendering nothing, both using Single and Multi Pass.

    Here's the test project with the issue, you'll see it's a very basic setup:

    https://drive.google.com/open?id=0BxxMSs794qxfU3hRUGVVOXlHU3c
     
  7. Dennis-DeRyke

    Dennis-DeRyke

    Unity Technologies

    Joined:
    Aug 20, 2013
    Posts:
    4
    Hi dmoroni, I tried your test project on Gear VR using my MacBook Pro with two versions of Unity.

    Using Unity 2017.1.0f3 I saw the problem occur on Gear VR. The skybox and white cubes appear in both eyes but neither the green cube nor the orange cube appear in either eye.

    Using Unity 2017.2.0b8 the problem does not occur on Gear VR . The green cube is in one eye, the orange cube is in the other eye, and both eyes show the white cubes and skybox.

    I have passed this information on to our VR devs here at Unity Technologies for further investigation. Thanks for calling this to our attention, and for providing the test project!
     
  8. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    652
    Although this does not address the Unity bug, you can achieve the desired effect by using shaders to render the content to the left or right eye. This way, you will only need 1 camera but you still can specifiy which objects are rendered to left or right eye. I've developed a shader for this:
    https://www.assetstore.unity3d.com/en/#!/content/88499
     
    efge likes this.
  9. dmoroni

    dmoroni

    Joined:
    Mar 10, 2015
    Posts:
    23
    Yes, I solved my problem just using your shaders.
    I really think your package should be included in Unity standard shaders.

    Thanks!
     
    Selzier likes this.