Search Unity

[Feature request] Add multi pass SSAO to Post-processing stack

Discussion in 'Image Effects' started by Lex4art, Mar 2, 2017.

  1. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    "Multi pass SSAO" is just SSAO camera effect that reused ~4 times with different radius/intensity settings. As result we have way better shading, here some comparison screenshots original VS multipass SSAO (created with Unity 5.4 + Cinematic image effects pack):
    Orig6.jpg Multipass6.jpg Orig4.jpg Multipass4.jpg
    More comparison screenshots (i like this "Clay render" effect!):1, 2, 3, 4, 5, 6, 7, 8, 9, 10.

    Even if default SSAO effect have 2x or 3x intensity boost the result will be damaged (too dark in one place and too weak in others + no large scale shading), the problem of default one-pass SSAO is radius - small details requires small value, large - large; average medium value simply can't cover small or large details on all distances.

    So, if this simple trick worth attention - please, implement it (just one checkbox for users!):
    Multipass-SSAO-checkbox.png
    It will consume some milliseconds but who need speed can always ignore this checkbox...

    (This multi pass feature may help to make better one virtual world :) ).
     
    Last edited: Mar 3, 2017
    3DCaster likes this.
  2. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    First post is updated: on new screenshots default SSAO has a way more prominent appearance for fair comparison with multipass SSAO (on original screenshots it was way too weak). Also, multipass SSAO now has 4 passes and the last one is with radius set to "15" - effect is soooo coooool :).

    P.S. If you want to achieve same "Clay render" effect here is this tricky clay material settings:
    http://www.techkind.org/Unity5/Clay material settings.png
    (The Uber shader used here only to have visible back side of polygons from trees and bushes, if you have no foliage you can use Standard shader with same settings).
     
    Last edited: Mar 3, 2017
  3. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Since it's slow, but awesome - you could disable SSAO in the stack and run a separate post fx SSAO?

    Personally I'd probably consider baking most of it to get what you want then use the post processing stack AO for the final touch... can't see the benefit of your hand-adjusted 4 pass SSAO being any good for other people.

    Perhaps a better way would be for the SSAO shader to have a custom falloff texture for blending it.
     
    Lex4art likes this.
  4. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    That is the problem here - Post-processing stack, if active on camera, denies use of external SSAO scripts for some reason :( (maybe this is bug? same problem for SSAO from Cinematic post effects pack)...
    If less brute-force solutions possible - of course it will be better, but for non-coder people like puny me this is not a option...
     
    Last edited: Mar 3, 2017
  5. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    389
    You should be able to run external SSAO. I believe there may have to be a few changes to the code though. Many AO devs have fixed this I think