Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

URP Post-Processing: Ambient Occlusion availability?

Discussion in 'Universal Render Pipeline' started by ivank, Sep 6, 2019.

  1. ivank

    ivank

    Joined:
    Nov 16, 2013
    Posts:
    41
    Hello, its great that URP is now equipped with its own set of post/processing effects. However the AmbientOcclusion effect is still currently missing and is not even mentioned in in-progress documentation on Github.

    Can we get any info about the Ambient Occlusion effect status - it means will it make it into 2019.3?

    Thanks
     
  2. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    830
    Ambient Occlusion isn't available because URP doesn't render a geometry normals texture, which is the pillar of any ambient occlusion effect:



    I don't know if they're adding the option (can't see anything related on GitHub). But URP is apparently also getting Deferred rendering in the future, where normals are always available, making AO work out of the box. So I suppose they're either going to implemented it at some point, or wait until Deferred rendering is in place.
     
    ivank likes this.
  3. gustavolsson

    gustavolsson

    Joined:
    Jan 14, 2011
    Posts:
    314
    An idea: calculate an approximate normal from the depth texture (that is available) and use that? If you are comfortable with creating your own post-process effect that is.

    Useful article on the subject (especially "Cetral differences for Terrains"): http://www.iquilezles.org/www/articles/normalsSDF/normalsSDF.htm
     
  4. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    273
  5. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,260
    yes, it supports MultiScaleVO
    which relies on the depth buffer only as far as i remember.

    it was not really stable (image wise) but under certain conditions better than nothing.
    doing an extra normal pass or using multiple rendering targets when rendering forward lighting sounds a bit bandwidth heavy to me, so i guess we have to live with a rather simple ssao solution.
     
    noio likes this.
  6. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    273
    @larsbertram1 The hack I posted above simply re-enabled Unity's own PPv2 AO under LWRP. But as 2019.3 has ditched PPv2 I suppose it won't work anymore. Are there currently any working URP 2019.3+ solutions that you know of? Any of your assets?
     
    noio likes this.
  7. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,260
    i don't know.
    i just wanted to clearify that normals are not mandatory if you use some special SSAO techniques.
    they are super good to have but maybe just too expensive – at least in case of URP and forward.
     
    Matt-Cranktrain likes this.
  8. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    924
  9. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    1,489
    Unity really needs to sort out this custom post processing asap. URP seems like incomplete and feels like it has gone backward now.
     
    superjayman and JimmyCushnie like this.
  10. superjayman

    superjayman

    Joined:
    May 31, 2013
    Posts:
    142
    I can't believe what a mess it is!, I mean SSAO is a trivial old school method and there is no proper implementation with URP. So, what is the best way to get normals? if URP is so flexible how come you can't even do SIMPLE SSAO???
     
  11. create3dgames

    create3dgames

    Joined:
    Aug 20, 2012
    Posts:
    261
  12. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    924
    Source files linked through pastebin.
     
  13. create3dgames

    create3dgames

    Joined:
    Aug 20, 2012
    Posts:
    261
    o_Oo_Oo_Oo_O
     
  14. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    273