Unity: SSAO — Oculus
New to the forums? Click here to read the "How To" Guide.

Developer? Click here to go to the Developer Forums.

Unity: SSAO

MalfateMalfate Posts: 16
edited April 2013 in Support
I thought i would post in here to have it down for other people to see and maybe to eventually have fixed.

Problem:
-True "Ghost" like effect with the AO not where its not suppose to be

Cause:
-Two cameras separate z-buffers each of the camera are having trouble with the effect on upclose/animated object. Its really noticeable on an animated "up-close" sprite such as moving grass. Infact its very distracting

Comments

  • cyberealitycybereality Posts: 26,156 Oculus Staff
    Can you post a screenshot? I just tested putting SSAO on the OVRCameras and it looked OK.

    Also, are you using the latest Unity package (version 0.2.1)?
    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
  • mdkmdk Posts: 356
    I tried a transparent material quickly in my scene (unity 3.5.7) and I noticed that with a regular transparent material It didn't seem to get any SSAO from the object and with a cutout material I got SSAO that looked funky if it had intensity at 4, but with 1 it looked ok. I would recommend not setting SSAO too high in VR. The 2 eyes have a separate Z-buffer so they will interpret the shadows in a different manner. You should post a screenshot of the problem area so we get a better picture of what is happening.
  • MalfateMalfate Posts: 16
    I am using it with 0.2.1, However i disabled the chromatic abberation correction so you can see it better.

    It almost seems as if the post-processor is "lagging" Because they will at times line up. In the pictures i do it in one camera by itself to compare... however the same effect happens if both camera have the effect

    Easiest way to see it is actually through DoF because its behaving the same way (same problem?). I only seem to notice it on sprites getting affected by wind(such as grass moving in my scene). The AO/DoFeffect IS moving with the wind, it just lags behind and looks like they aren't in sync

    DoF (Screenshot: is 3,4) but it affect HDR scatter aswell
    http://i.imgur.com/ESgt4A7.jpg

    Subtle SSAO
    http://i.imgur.com/yDLicqf.jpg

    Extreme SSAO - enabled in both cameras
    http://i.imgur.com/YkpeRKj.jpg
  • mdkmdk Posts: 356
    I experimented a bit in my scene. I noticed that by changing the clipping planes on the camera and tweaking the MinZ value on the SSAO shader I was able to change the look of the SSAO alot and even got some weird looking stuff. The only advice I can give you is try changing those values and see if you get any improvement.

    Edit: Oh yeah I noticed that you have the SSAO effect done after lens correction. It's always better to do image effect before the lens correction. That might help as well.
  • MalfateMalfate Posts: 16
    Sorry developers you may hate... but i thought i'd let tuscany become be over run with weeds to test out ;-D. It was for science.

    Need weed-be-gone.
    http://i.imgur.com/kz8NUr6.jpg

    I imported the tuscany scene to the same project that my other scene is in. Did the same steps, and it doesn't seem to be affected. My other scene is MUCH bigger, and and utlizies much more assets + higher poly assets, and even stresses my GTX 680 a good amount.

    I'll continue looking into it, but that is particularly odd that my other scene seems to be affected.

    MDK: i'll see if i can tweak them to within acceptable levels.
  • mdkmdk Posts: 356
    Malfate wrote:
    My other scene is MUCH bigger, and and utlizies much more assets + higher poly assets, and even stresses my GTX 680 a good amount.

    It might run alot faster with deferred rendering instead of forward. Deferred rendering however has some issues with Rift cameras and might break other things. I have deferred rendering in my scene, but I had to change the default skybox to a custom made one for it to look right.
  • MalfateMalfate Posts: 16
    Forgot i switched the renderer to Forward because of the shadow issue. Changing it to Deferred fixed the issue.

    Yes, there is a performance gain, and now that they fixed the annoying shadows i'll be sure to use that since SSAO is subtle butt effective post-process that i like to use. :D

    I'll just have to be on the look out for any other issues that may pop up with deferred render.

    Forward -> BAD SSAO, DoF problem
    Deferred ->Working SSAo/DoF.
Sign In or Register to comment.