Search Unity

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

Discussion in 'VR' started by JazzCat-9, May 17, 2019.

  1. JazzCat-9

    JazzCat-9

    Joined:
    Sep 1, 2015
    Posts:
    16
    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. JazzCat-9

    JazzCat-9

    Joined:
    Sep 1, 2015
    Posts:
    16
    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:
    27
    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.
     
    JazzCat-9 likes this.
  5. JazzCat-9

    JazzCat-9

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

    Digilithic

    Joined:
    Nov 1, 2018
    Posts:
    15
    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:
    2,266
    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. Digilithic

    Digilithic

    Joined:
    Nov 1, 2018
    Posts:
    15
    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:
    270
    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.
     
  10. dienat

    dienat

    Joined:
    May 27, 2016
    Posts:
    417
    In 2019 Vr with PP doesnt work i get a distorted screen
     
  11. unity_ARVIlab

    unity_ARVIlab

    Joined:
    Jan 24, 2018
    Posts:
    2
    I noticed PP version 2.0.17 (preview) works fine in 2019 VR
     
  12. BorjaFAC

    BorjaFAC

    Joined:
    Sep 29, 2015
    Posts:
    9
    I am triying the 2.2.2 of PP and doesn't work for me... :(
     
  13. Digilithic

    Digilithic

    Joined:
    Nov 1, 2018
    Posts:
    15
    You mean PP is working?

    Or Ambient Occlusion is working?
     
  14. hcpinteractive

    hcpinteractive

    Joined:
    May 20, 2019
    Posts:
    9
    Yes checked many version with any version of PP. it DOES NOT WORK, its broken!
    I am using Rift.
    Unity please fix this.
     
  15. hcpinteractive

    hcpinteractive

    Joined:
    May 20, 2019
    Posts:
    9
    Can you post a sample working project to check?
     
  16. Noa3

    Noa3

    Joined:
    May 29, 2012
    Posts:
    84
    i get some wierd errors still in unity2019.3 all versions on the legacy pipeline. its hard to upgrade a 300gb+ Project with the new pipeline
     
  17. unity_ARVIlab

    unity_ARVIlab

    Joined:
    Jan 24, 2018
    Posts:
    2
    I mean Ambient Occlusion is working fine with Single Pass Rendering. As well as other PP effects. But I had to manually copy the folder with PP 2.0.17 (preview) package to Library\PackageCache folder. Because of I use Unity 2019.3.8 and minimum support PP version for this Unity is 2.2.2.