[Solved] Unity Build is much darker than Playmode in Editor — Oculus
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.

[Solved] Unity Build is much darker than Playmode in Editor

SAOTASAOTA Posts: 43
Brain Burst
edited April 2015 in Unity Development
For Some Reason my unity builds are much darker than what it looks like in the editor at runtime.

The Ovr Warning box is darker and more opaque. And everything is much darker.
Issue below.

Comments

  • SAOTASAOTA Posts: 43
    Brain Burst
    it seems the issue lies in the order of the image effects. but no matter what I do, they wont stay in a specified order, also both camera's rearrange the image effects into different orders. Both eyes now produce different images. :evil:
  • It might be a gamma correction issue.
  • cyberealitycybereality Posts: 26,156 Oculus Staff
    Is there any way you can create a bare-bones example that shows the issue and send me all the project files?

    I haven't seen this myself, but if I can reproduce I can probably get someone to look at it.
    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
  • Interestingly enough, I do notice this same issue on GearVR (device vs. editor). The colors in the editor look really washed out.
  • SCDarkySCDarky Posts: 8
    NerveGear
    If you are noticing image effects going out of order, make sure to save your camera setup as a prefab and Apply the setting each time you change something about the order - otherwise it will reorder itself the next time you go into Playmode.

    However, yes, things definitely get a lot darker inside the Oculus. I don't know if it always was like that, I got my Oculus in January and only used it with the Unity 5 betas and forward so for me it was always like that. I've compensated for it with a higher Tonemapping value that comes as close as possible to what I want it to look like through the device.
  • I had the same results in my own Scene,
    It only felt normal since it's a blend of 2 cameras, not to mention all that chromatic aberration and Barrel distortion filters (notice in the Game view when the 2 cameras are rendering how severe the distortions are, the process of filtering everything does affect the lightness of the scene).

    I lightmapped everything and switched to Forward Rendering (Don't use deferred as it will play against you when it comes to Aliasing (ouch)).

    My scenes are now well lit and very close to the Editor view.
  • SAOTASAOTA Posts: 43
    Brain Burst
    SCDarky wrote:
    If you are noticing image effects going out of order, make sure to save your camera setup as a prefab and Apply the setting each time you change something about the order - otherwise it will reorder itself the next time you go into Playmode....

    This works for Editor. Thanks.

    Also
    I lightmapped everything and switched to Forward Rendering (Don't use deferred as it will play against you when it comes to Aliasing (ouch)).

    About to finish a large baking job and build to see if it makes a difference.

    Hoping for easier implementation of image effects in future oculus integration.
  • SAOTASAOTA Posts: 43
    Brain Burst
    Still driving me crazy.

    When I add the OVR mirror script to one of my camera's it renders correctly, but the other eye still renders dark.

    When I invoke the menu it renders much closer to the brightness that I'm after.

    Very Strange.

  • SAOTASAOTA Posts: 43
    Brain Burst
    It seems exporting a DX9 version of the build solves the darkness issue, but now its Judder I have to deal with.


    [EDIT] This is the problem. Running a DX9 build in -force-d3d11 causes the same issue.

    DX11 with the OVR Camera seems to disable Linear Color Space.

    Other users with similar issues.
    https://forums.oculus.com/viewtopic.php?t=19390

    https://forums.oculus.com/viewtopic.php?t=15111



    It must be a new issue in Unity 5 as I did not have this issue with Unity 4
  • cyberealitycybereality Posts: 26,156 Oculus Staff
    What texture format are you using? Does the issue occur in both direct mode and extended mode?
    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
  • SAOTASAOTA Posts: 43
    Brain Burst
    I have tried Default, Default HDR and ARGB32.
    All have this issue.

    This issue only occurs when I am in DX11 mode, not in the editor, only in builds.

    It occurs in both direct and extended.

    It definitely has something to do with linear color space. I have sent you a pm with a basic scene which reproduces this issue. Make sure to build the scene in DX11 to see the issue.
  • SAOTASAOTA Posts: 43
    Brain Burst
    What do you know. I solved this by modifying the OVRMainmenu script.
    What this does is enable the now empty menu at runtime. This fixes the Linear color space Issue I had in DX11 builds.

    I've attached it for reference.

    if you would like a fps counter remove the // from line 443
    so
    // OVRUGUI.strFPS = strFPS;

    becomes

    OVRUGUI.strFPS = strFPS;

    BAM! DX11 is a 20fps increase for me so I hope this helps others with this issue.
  • Unfortunately this didn't fix it for me - unity 5, ovr version 0.50.1 and line was already uncommented but build is still dark (objects appear as black) when built with directx11 and linear colour space... :( Fine in editor however!
  • tankuntankun Posts: 3
    NerveGear
    Hi Saota,

    You said you've attached the OVRMainmenu script but it's not here (or am I missing something?)

    Anyhow, can please post/re-attach the script here?

    Thank you
  • SAOTASAOTA Posts: 43
    Brain Burst
    Not too sure what happened to the upload. Fix is available here.

    http://forum.unity3d.com/threads/design ... vr.300002/
  • tankuntankun Posts: 3
    NerveGear
    Yes, that worked, thank you. The whole post is a great resource by the way.
  • ImFromTheFutureImFromTheFuture Posts: 1
    NerveGear
    Hi, I am getting this error ... at this time. 
    Using 2017.1 with the latest GearVR SDK. The build is really dark. It's not black. It's just really dark. There isn't a OVRMainmenu script in the package either so I don't know what to do about it.
    Is there a solution to this?

Sign In or Register to comment.