Search Unity

Camera Target Eye not working (GearVR)

Discussion in 'AR/VR (XR) Discussion' started by dmoroni, Aug 23, 2017.

  1. dmoroni

    dmoroni

    Joined:
    Mar 10, 2015
    Posts:
    23
    Hi, I have a problem using the Target Eye parameter in Camera inspector, for a GearVR app.

    In last Unity versions (i'm currently using 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" it works as usual, and objects are correctly displayed. The problem shows up just with Virtual Reality enabled.

    I mainly work with 360 stereo pictures and movies so that's really a huge problem for me, 'cause at the moment i'm not able to let my customers watch 360 stereo pictures.

    Is there any hope to see it fixed soon?

    Thanks,

    Riccardo
     
  2. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    652
    I don't have a solution but I did create a workaround that performs better anyways. Instead of using multiple cameras and spheres, I've developed a shader to split the left and right images BEFORE rendering.
    Here's the pack:
    https://www.assetstore.unity3d.com/en/#!/content/88499

    I also included the shader with 360 Video Player:
    https://www.assetstore.unity3d.com/en/#!/content/86778

    While this does address the Unity bug, it does solve the problem and in the process performance is increased (1 camera and 1 sphere is a lot faster than 3 cameras and 2 spheres)
     
  3. dmoroni

    dmoroni

    Joined:
    Mar 10, 2015
    Posts:
    23
    Your solution is really interesting. Just to be sure, I guess it's anyway possible to assign a movie/picture loaded runtime to your shader, using the mainTexture property as usual.
     
  4. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    652
    Correct this is just the main texture on the Shader so you can change that it run time. It will display images of course or video if you're using a video player like Unity 5.6 or Easy Movie Texture.
     
  5. dmoroni

    dmoroni

    Joined:
    Mar 10, 2015
    Posts:
    23
    Great, I didn't know your plugin and the performance consideration is very interesting too. I'll give it a go, for sure.
    Thanks!

    Riccardo
     
  6. dmoroni

    dmoroni

    Joined:
    Mar 10, 2015
    Posts:
    23
    Just to say I bought VR Eye Shaders and it works perfectly and in a very efficient way, I'll use it for my 360 VR viewers from now on.
     
    Selzier likes this.