Search Unity

Ambient Occlusion (PostProcess v 2.x) broken in VR broken?

Discussion in 'VR' started by Amadhia-Albee, May 17, 2019.

  1. Amadhia-Albee

    Amadhia-Albee

    Joined:
    Sep 1, 2015
    Posts:
    4
    I’ve got a standard 3D Application in development and have just begun an Oculus branch of the project. However, I’ve noticed some serious problems with the VR implementation of the PostProcessing 2.0 system in VR.

    I’m wondering if anyone else has found similar issues and if there are workarounds.

    NOTE: I’ve gotten similar errors with both the “PostProcessing 2” package available through the Package Manager, and when DL’d directly from GitHub. I also have downloaded the latest version of Unity from the Hub and tested with it before posting, (Unity 2019.1.3.f1).

    1) In order to get _any_ image on the Oculus headset when Post Processing Layer is on any camera, (even a camera in a virgin scene,) one must UN-check the box labeled, “Directly to Camera Target.” (Otherwise the screen stays black, or if checked while the game is running, the last displayed image freezes on-screen.)

    2) VFX including Bloom, Vingette, Chromatic Aberration, and _especially_ Ambient Occlusion yield varying degrees of garbage:

    * Bloom seems okay with low levels of Intensity, but higher levels yield a lot of stair-stepping garbage.

    * Chromatic Aberration and Vignette put a line down the center of each eye-camera as if it’s trying to apply the effect to separately to EACH HALF of BOTH eye cameras.

    *Ambient Occlusion is just wrong — it puts ghosts of objects in the walls of other objects.

    I’m typing this on an iPad, and can post screencaps from my desktop system later if anyone would like to see the issues I’m experiencing. (I can’t upload the project itself due to NDA’s, but I could try to create a demo scene that exhibits these problems and upload that if you’d like.)

    Thanks for your thoughts, and hopefully your help in figuring out how to get at least a little post-process goodness into the VR version of what we’re working on.
     
  2. Drebble

    Drebble

    Joined:
    Apr 10, 2019
    Posts:
    7
    Hey, got the output on the HMD now, thanks for the "directly to camera" hint.
    I'm having similar issues in VR , check my post
    Post processing (V2) renders blank screen on HTC Vive and in editor

    Cheers
    Jim
     
  3. Amadhia-Albee

    Amadhia-Albee

    Joined:
    Sep 1, 2015
    Posts:
    4
    No worries, Jim! I'm glad my own poking-about-blindly was able to help you too! Thanks for lettin' me know that this fix-in-progress worked for you as well!
     
  4. Tibor0991

    Tibor0991

    Joined:
    Dec 11, 2016
    Posts:
    18
    I can confirm the double rendering issue: I wrote a custom PP effect to enable object highlighting, it worked fine until the last Unity update, where it attemps to render the effect twice, once for each eye, resulting in a squished highlight.
    I will attempt to halve the horizontal size of the temporary texture to see if it fixes things.
     
    Amadhia-Albee likes this.
  5. Amadhia-Albee

    Amadhia-Albee

    Joined:
    Sep 1, 2015
    Posts:
    4
    Thanks for the info, and for helping to find a workaround!
     
  6. Hexagonon

    Hexagonon

    Joined:
    Nov 1, 2018
    Posts:
    10
    So... Post Processing in Unity 2019 is NOT working in Virtual Reality !?

    The PostProcessing in VR-Projects all worked well in Unity 2018. An Update to Unity 2019 made Post Processing not working correctly anymore. Main Issues are Ambient Occlusion and Depth of Field (screenshots).

    The Post Processing is there, but seems to be out of position. (Only in VR-mode)

    - not a matter of Post Processing Versions
    - not a matter of Project-Settings
    - not a matter of Preferences
    - not a matter of Rendering Path
    - not a matter of single-pass or multi-pass
    - according to other posts it seems to be not a matter if htc vive, hololens or oculus user (I am using the vive though)

    PP-issue-VR_01.PNG PP-issue-VR_02.PNG

    I tested 7 different unity Versions, different settings and project-builds and PP-Versions:

    --> in the end it always came to the main issue of Unity 2019-Versions and only for VR !

    Any new leads or ideas?

    Best,
    Hexagonon
     
  7. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    791
    Ran into this myself last week, my conclusion was that post processing in VR no longer works in the legacy render pipeline since 2019.1. This is because Single Pass Stereo Rendering has apparently been deprecated (without notice it seems) in favor of Single Pass Stereo Instanced. Post processing effects have to be updated to support this.

    Ironically, the Post Processing Stack v2 is no longer getting any major updates, in anticipation of the new post processing framework coming in 2019.3. The same team is probably working on that now. So there's a feature gap at the moment.

    VR in 2019.1+ requires you to use either the LWRP or HDRP, which internally seem to handle the screen coordinates correctly (including the depth texture).
     
  8. Hexagonon

    Hexagonon

    Joined:
    Nov 1, 2018
    Posts:
    10
    Thx for your answer!

    I can't find news on new versions or updates for PP Stack either!

    You tested it?! It seems to be too much of an effort for now. But I will look into it, as it seems to be a solution right now:
    https://blogs.unity3d.com/2018/02/2...er-pipeline-optimizing-real-time-performance/

    I am hoping for Prism 3.0 (realistic Post Processing)

    Thank you, I will keep this post updated, as well if we find out more:
    https://forum.unity.com/threads/pos...019-is-not-working-in-virtual-reality.723887/
     
  9. slembcke2

    slembcke2

    Joined:
    Jun 26, 2013
    Posts:
    263
    Hi, we've been dealing with this issue for a while. Outside of VR, Ambient occlusion is working nicely:


    But in VR, it's a mess:


    There's an open issue for the ambient occlusion issue here:
    https://issuetracker.unity3d.com/is...d-and-using-multi-scale-volumetric-obscurance

    Maybe if we can get enough votes there, we'll get some progress on it. It's been an issue for us since May (2019). I just tried updating my bug replication projects to 2019.2.1 and Postprocessing 2.1.7, but the issue persists.

    Our client work will need to be released before 2019.3 is released. I know the LWRP is freshly out of beta (or will be soon), but I don't think the standard render pipeline should be considered garbage already.