Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Darker Lighting in Extended mode vs Direct To Rift

JonDadleyJonDadley Posts: 91
Hiro Protagonist
edited March 2015 in Unity Development
I've encountered a strange bug where my app has significantly darker lighting when run in extended mode than when it is run in Direct To Rift or simply run on a monitor with a non OVR unity camera.

Here are two images to demonstrate the bug:

Standard unity camera on a monitor (this is also how Direct To Rift in "Direct HMD access from Apps" mode looks):
ZKmd8Lbl.png
notice how the floor, towers and skybox are all clearly visible.

Now, here's how a comparable image looks when in extended mode:
i7bxoH4l.jpg

Nothing is visible. Only the self illuminated materials and areas that have point lights in them.

The REALLY weird part is when in extended mode if I hit 'space' to bring up the Oculus frame rate counter OR move the headset out of the camera tracking volume (to bring up the yellow warning text) the brightness corrects itself and looks like the monitor / direct to rift version! As soon as I hide either of these overlays, the lighting returns to being really dark. This issue also occurs in the Unity editor in 'Play' mode (although looks fine outside of play).

This all seems to be a consequence of being in Linear lighting mode. When I switch back to Gamma, everything looks like the second, dark picture all the time. I'd rather not switch to Gamma just to get around this bug.

Thoughts? Has anyone encountered this or know what might be causing it? You can test it for yourself here.
My VR projects - Stage Presence and LMD
VR Projects I've contributed to The Matrix VR and Star Citizen
Follow me on Twitter @JonDadley

Comments

  • yezzeryezzer Posts: 48
    Brain Burst
    Hey! I'm getting this bug - found via google :)

    Was there a fix / reason for this?
  • KevinComerfordKevinComerford Posts: 19
    NerveGear
    Hey guys, I wanted to address this issue as well. The oculus script seems to be showing everything in gamma space rather than linear. As you mentioned, the OVR menu script seems to trick the images to be put back into linear space. I really don't know why this is an issue (or even why everything still defaults to the wrong gamma space, but that's a whole other rant). I think it has to do with some type of matrix conversion not acting 100% correctly.

    The way I got around this oddity was to trick the OVR menu to stay on but not render anything. I turned fade time to 0 use no texture, disable the menu button, call the function to open the menu on start, and disable the function that closes it. It's not ideal, but it'll get you around the issue in a few minutes.
  • yezzeryezzer Posts: 48
    Brain Burst
    Thanks! I'll give that a go.
  • JonDadleyJonDadley Posts: 91
    Hiro Protagonist
    I just tried it and it worked! Thanks for the tip - hopefully Oculus can get a fix in for this so we don't have to hack it in future.
    My VR projects - Stage Presence and LMD
    VR Projects I've contributed to The Matrix VR and Star Citizen
    Follow me on Twitter @JonDadley
  • HeadTripHeadTrip Posts: 164
    Hiro Protagonist
    This is INSANELY frustrating, My scene goes very dark when I play in editor, making it useless.
    I really hope there will be a fix for this in the next sdk.
  • cyberealitycybereality Posts: 26,156 Oculus Staff
    @HeadTrip: Can you provide some details to your setup (Oculus SDK version, Unity version, OS, and GPU driver version)? This may be the sRGB issue that we just discovered but I'd like more information to be sure.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i
    Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
  • HeadTripHeadTrip Posts: 164
    Hiro Protagonist
    @HeadTrip: Can you provide some details to your setup (Oculus SDK version, Unity version, OS, and GPU driver version)? This may be the sRGB issue that we just discovered but I'd like more information to be sure.

    sure thing. I can fix it momentarily by dragging my unity game window around then re docking it back into the main window. Its fixed but the window is very thin, if you resize it breaks. It will also break eventually even if you don't resize.
    The scene view window flickers and flashes as well.

    - Oculus SDK: 0.4.4
    - Unity5.0.0.f4
    - Win7
    - Display Driver Version: 1.2.2.0
    - Camera Driver Version: 0.0.1.7
    - Geforce 780ti 344.65
Sign In or Register to comment.