Search Unity

Right eye goes wonky when set to SinglePass rendering (Vive + SteamVR)

Discussion in 'AR/VR (XR) Discussion' started by OUTERDARKNESS, Feb 21, 2017.

  1. OUTERDARKNESS

    OUTERDARKNESS

    Joined:
    Feb 27, 2013
    Posts:
    35
    Not sure what caused it, but my VR project suddenly went a bit screwy. I'm noticing that the HMD tracks properly, and the left eye looks normal, but something is off with the right eye. When you look straight ahead with both eyes open, it looks like you are cross-eyed, but when I rotate my head, I can especially tell that something is "off" with the camera matrix for the right eye. When the global setting for "Stereo Rendering Method" is set to "Multi Pass (slow)", it looks fine. Setting it back to "Single Pass (fast)" makes the right eye wonky again. Has anyone else come across this?

    Some troubleshooting findings of interest...

    • No other external VR apps / games tested seem to have this issue.
    • Opening the SteamVR "example" scene (sea of cubes) in my troubled project will fail (wonky right eye). This makes me think this is NOT due to any of my asset / scripts messing up SteamVR rendering.
    • A new clean project with nothing but the SteamVR plugin (v1.2.0) WILL successfully work in "Single Pass" mode.
    • In the troubled project, completely re-installing the SteamVR plugin (v1.2.0) will continue to fail (wonky right eye).
    • In the new clean project, exporting a package of the working scene into the troubled project will continue to fail in the troubled project (wonky right eye).
    • This is the most telling... If I *hide* my "ProjectSettings" folder (rename folder to "ProjectSettings.Hidden") and then start up Unity, a new ProjectSettings folder is created (presumably with default values). After starting up the project, the SteamVR "example" scene WILL successfully work in "Single Pass" mode! Closing Unity and replacing my old ProjectSettings brings back the issue.

    So based on that last troubleshooting test, I DO have a workaround, but before I start digging into what specific ProjectSetting caused the issue (or rebuilding all my project settings from scratch), I'm curious if anyone else has come across this issue before and knows how to fix it / avoid it in the future. I can pack up and provide a stripped down version of the troubled project if anyone is curious.

    OS: Windows 10
    Unity: v5.5.0f3 (64bit - Pro)
    SteamVR: v1.2.0
    HMD: HTC Vive (consumer version)
     
    Last edited: Feb 21, 2017
  2. OUTERDARKNESS

    OUTERDARKNESS

    Joined:
    Feb 27, 2013
    Posts:
    35
    Ok, here's an update...
    In the previous post, I mention that clearing all the project settings seemed to fix the issue. I am noticing that issue is gone for the rest of the Unity Editor session, but as soon as I restart the Editor, the issue is back.

    Luckily, I had asset serialization set to "Force Text" before purging my settings, so I can compare differences between my non-working settings files and the newly generated settings files (as well as newly created files before and after restarting the editor and loosing functionality).

    The issues all seems to come down to whether or not the file "ProjectSettings\ProjectSettings.asset" includes the parameters for "m_BuildTargetVRSettings".

    The wonky right-eye issue appears if the Unity Editor starts up with the project settings file to include:
    m_BuildTargetVRSettings:
    - m_BuildTarget: Standalone
    m_Enabled: 1
    m_Devices:
    - OpenVR
    - None


    But if all the parameters for "m_BuildTargetVRSettings" are removed, or if they are all the same as above, but the line "m_Enabled: 1" is changed to "m_Enabled: 0", then you will NOT have a non-wonky right eye after you start up. Of course, you will need to go to PlayerSettings and enabled the "Virtual Reality Supported" check box, but after that you can mess with any of the settings, turn them off and back on and for the rest of the session the right eye is rock-solid.

    If the "Virtual Reality Supported" check box is DISABLED before closing the editor, the next time Unity is opened, I can re-enabled this checkbox and have no issues.
    If the "Virtual Reality Supported" check box is left ON while closing, after restarting the editor, this option is written back to the ProjectSettings.asset file and the wonky-right-eye issue will plague you all throughout the next session.

    So I could probably come up with a work-around editor script that disables / re-enables this option on Editor close / startup, but I'm super curious why this is happening today and not any other day over the last few months. Also, am I the only one seeing this issue?
     
  3. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Thanks bud, I had the same problem. The editor even got hang after stopping the game several times.
    I disabled "Virtual Reality Supported" and restarted the editor. I went again to that menu and turned it on again. Hit play and... magic, the render is correct in both eyes both in editor and build

    Thanks
     
  4. VampireLestat

    VampireLestat

    Joined:
    Oct 15, 2016
    Posts:
    14
    I had the same problem and was trying to figure out what I could possibly have done, thanks for the workaround!

    I just updated my Nvidia drivers yesterday and (I'm pretty sure) this is the first time I have run my app since then. I know I wasn't seeing this issue a few days ago and that's the only thing that changed AFAIK. Currently on 378.66 of the GeForce Game Ready Driver on a 980 Ti.
     
  5. Alex_curiscope

    Alex_curiscope

    Joined:
    Apr 4, 2017
    Posts:
    55
    Has anyone got a fix for this? We're experiencing this issue and the workaround doesn't seem to be reliable. Looks like it might be something to do with mixing Oculus and Vive headsets in our studio. We're on the exact same set up as the OP - 5.5.0f3, win10, steamvr 1.2, consumer vive (and consumer oculus)
     
  6. Alex_curiscope

    Alex_curiscope

    Joined:
    Apr 4, 2017
    Posts:
    55
    There must be a hidden internal setting that isn't in the project settings, but which gets set when the VR settings are generated when they don't already exist in the settings asset.
     
  7. Alex_curiscope

    Alex_curiscope

    Joined:
    Apr 4, 2017
    Posts:
    55
    We're still getting this. Sometimes the ritual of "Disable VR, restart Unity, re-enable VR" works, and sometimes it doesn't. If it doesn't you're screwed for a long time. We really need help here.
     
  8. Alex_curiscope

    Alex_curiscope

    Joined:
    Apr 4, 2017
    Posts:
    55
  9. amarkham

    amarkham

    Joined:
    Feb 21, 2017
    Posts:
    5
    Oh thank you very much for your troubleshooting. This was driving me NUTS! Working one minute then next editing session, WHAMO, wonky right eye.

    I hope they fix this SOON!
     
  10. Alex_curiscope

    Alex_curiscope

    Joined:
    Apr 4, 2017
    Posts:
    55
    Don't count on it. If the problem went away after 5.5, it won't get fixed. It's extremely hard to reproduce as well, making the chances of a fix vanishingly unlikely. Just bite the bullet and reinstall Unity if you get the bug.
     
  11. jsleek

    jsleek

    Joined:
    Oct 3, 2014
    Posts:
    61
    This bug still occurs in 2017.2.0f3. When I untick "Virtual Reality Supported", save project and restart Unity, it comes back ticked with all the old settings still there. Super weird.

    Multi-pass fixes this issue for me, but ideally I don't want to be using Multi-Pass..
     
  12. Keeetrab

    Keeetrab

    Joined:
    Aug 9, 2016
    Posts:
    2
    same here, deleting Library fixes the issue for a while until the bug comes again.
    Changing to Multi-Pass also works