Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Horizon Based Ambient Occlusion - HBAO image effect

Discussion in 'Assets and Asset Store' started by jimmikaelkael, Feb 21, 2016.

  1. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    606
    HBAO does not rely on PPV2. It should work along with it.
     
    leslviv likes this.
  2. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    606
    Yes it can depend on your settings. Is your 3D objects scale correct ?
     
  3. mrCharli3

    mrCharli3

    Joined:
    Mar 22, 2017
    Posts:
    627
    I understand ur not getting it on ur end but its not like im sitting here lying... Instead of trying to make it seem like its my fault maybe just try to help?

    Ill try to profile the GPU, you could have just suggested that instead of writing it like ur talking to an idiot. I might not know as much as you about this stuff.
     
  4. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    606
    Seriously ?
    Are you kidding me ?

    Are you expecting me to learn you how to profile ?
     
  5. Yavvn

    Yavvn

    Joined:
    May 8, 2019
    Posts:
    12
    It appears this asset is currently not compatible with MSAA enabled under URP.

    It creates a white outline around any contrasting pixels, mainly the borders of differently colored objects. I have Depth Textures enabled but as someone else said, it appears that MSAA is doing an earlier pass that messes with this HBAO.
     
  6. mrCharli3

    mrCharli3

    Joined:
    Mar 22, 2017
    Posts:
    627
    Ofc not, thats not what I said, I said you could have suggested that I try it. Jesus man relax, its ur product. Plus there is little point in me profiling the issue when it goes away if I disable your product, nothing else fixes it. You havent once asked me to send you any material that might help you debug.

    Gotta say, this is the first time I've had a negative experience with an asset creator, ur asset is really cool but you are not very pleasant. I'll just move on.
     
    Last edited: Aug 29, 2020
  7. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    606
    Was that offending to you?
    I never meant to offend, I'm really sorry you took it like that...

    Am I saying that you're lying? no.
    Am I treating you like an idiot ? no.
    Am I giving you clues? yes.

    I haven't asked because I know you are GPU bound, that's all. HBAO has a cost on GPU, and in your case enabling HBAO consume more GPU time and then CPU is awaiting GPU to finish.

    Well, no offense taken.
     
  8. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    772
    @jimmikaelkael Have you had a look at the depth pass available in URP 10 yet? I remember you had mentioned you could get a speed boost when that was ready. Unity’s new AO is quite disappointing, btw.
     
  9. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,487
    Has anyone used this on mobile yet? How is the performance?

    And does it work on WebGL?
     
    Last edited: Sep 1, 2020
  10. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,213
    Can this give me similar results to something like a Ground Truth-based Ambient Occlusion? I would want to have a bigger range for big details and smaller range for the finest details, would be nice if it has good thickness two. I'm looking to achieve something close to this:

     
    Lars-Steenhoff likes this.
  11. CmartinezSaltoki

    CmartinezSaltoki

    Joined:
    May 21, 2020
    Posts:
    8
    Hi again!

    I'm writting this time because our console is showing +999 warnings. As far as I'm aware everything compiles correctly (I'm not the team programmer though), in fact, visually it seems to be working fine (we're getting the shadows we want).

    If anyone could help us out would be great!

    Thanks in advance.

    WARNING-HBAO.PNG
     
  12. Graham-B

    Graham-B

    Joined:
    Feb 27, 2013
    Posts:
    277
    Hi,

    Is it possible to exclude this effect from certain objects or layers? For example, I would like to have this effect on my environment, but not on my characters.

    Thanks!
     
  13. Jess_AA

    Jess_AA

    Joined:
    May 8, 2019
    Posts:
    18
    Hi,

    Sorry if I've missed it somewhere but how do I get this working with the PPv2 stack? I'm unable to find it in the overrides.
     
    Last edited: Sep 14, 2020
  14. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    606
    I will need to check it.

    I still do not recommend it on mobile. Standard pipeline version works fine on Standard and HDRP pipeline. In URP currently all post-processes are disabled on GLES by the pipeline code.

    No you won't get this. HBAO is not raytraced AO.

    It seems HBAO shader does not compile... You should select the HBAO.shader file and check what the inspector says.

    No, I'm sorry but this is not possible, HBAO is a screenspace image effect.

    In Standard pipeline, HBAO does not rely on PP stack to work, it is standalone. You need to attach the effect to your camera, I suggest you to read the documentation.
     
    florianalexandru05 likes this.
  15. CmartinezSaltoki

    CmartinezSaltoki

    Joined:
    May 21, 2020
    Posts:
    8
    We did what you suggested and the inspector doesn't say anything. It seems there are 2 different HBAO.shader... Is this suposed to be like that?

    Thanks again!
     
  16. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    606
    Hmmm, sometimes after updating asset it can happen... Try to delete the asset completely and reimport.
     
  17. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    1,455
    Hi this looks impressive, can it do better than the built-in AO in HDRP, which does this:?!

    ao.png
     
  18. McPeppergames

    McPeppergames

    Joined:
    Feb 15, 2019
    Posts:
    16
    I am trying to make it work with URP and when adding the HBAO to the Post-Process-Volume and hitting Apply Preset I can see a warning: "The effect is disabled by default, you need to override intensity value in order to enable HBAO."

    How can I do this?
     
  19. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    606
    You need to expand HBAO settings in your post process volume, go to the intensity slider, enable it then adjust intensity slider to something like 1 or whatever you like.
     
  20. CmartinezSaltoki

    CmartinezSaltoki

    Joined:
    May 21, 2020
    Posts:
    8
    We deleted it and re imported and everything works fine now!

    Thank you!
     
  21. Zapan15

    Zapan15

    Joined:
    Apr 11, 2011
    Posts:
    104
    We get the following message, if we enable VR (via XRLoader, e.g. the new VR system), Anti Aliasing, forward mode, Legancy Render Pipeline:
    Code (CSharp):
    1. A multisampled texture being bound to a non-multisampled sampler. Disabling in order to avoid undefined behavior. Please use Texture2DMS in the shader.
    Stereo Rendering mode is set to Multi Pass. If VR or antialiasing is disabled, HBAO works as expected. HBAO and antialisaing works without VR.

    Do you have an idea how to correct this?
     
  22. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    273
    Will there be any improvements for curved surfaces in URP?

    My main issue is my characters have sharp edges on round organic surfaces... It looks really weird.

    upload_2020-10-16_23-44-0.png

    upload_2020-10-16_23-45-4.png

    It comes up in all kinds of weird ways, i've mitigated this a bit with some settings, but it's quite disappointing.

    Mitigated settings
    upload_2020-10-16_23-46-50.png

    upload_2020-10-16_23-47-19.png
     
unityunity