Implementing SSAO - looking for test content

Hey folks, I’m doing a small example project on how to implement SSAO (ambient occlusion) in Defold but I don’t really have any good or even decent looking content to use for testing. So I’m looking to the community to see if anyone out there has anything they would be inclined to share publically or privately?

Anything at all is better than my boxes and spheres that I’m using right now :slight_smile: thanks!

8 Likes

Sure I created a Defold material showcase model just for this type of thing and would love to share. I can put it together for you asap.

5 Likes

Lovely! There’s no rush, I’m not really close to anything yet so take your time :slight_smile: much appreciated!

2 Likes

Here’s the progress so far, not 100% sure everything is done in the correct space but it does something at least :slight_smile:

5 Likes

Looks like its coming along . It seems like screenspace or clipspace?

Test scene is ready for SSAO.

3 Likes

Thanks for the content! Yes it’s screen space. It’s lacking a post-blur on the SSAO result so it’s a bit noisy right now.

1 Like

I want to use this for a project, how close is it to being usable? :pleading_face:

1 Like

I think @morgerion has a better looking version that this, maybe he’s willing to share it? :slight_smile: Otherwise, I could add the blurring to this I suppose. What platform will you be running on?

1 Like

HTML5 for release/Windows for dev is my personal priority if possible.

I didn’t invent anything interesting and just adapted the shader from here: Shader - Shadertoy BETA

If you’re not doing a Seus PTGI shader, there are a few nuances:

  1. SSAO is not a good technique for mobiles, to get the most out you have to use render-target with linear depth, with half-float format 16F, and with reduced resolution (e.g. 1024x1024 or 512x512).
  2. use 10…16 samples and a small radius.
  3. do not use MRT - an extra run of geometry will cost you less than a pixel fillrate.
  4. forget old and retarded devices (my favourite point).
2 Likes

Sharing functional example projects are still useful for more novice users to learn from and have something useful for their own projects more quickly. What’s obvious to you is not obvious to others.

1 Like