Using Ambient Occlusion Textures in 2.8 Eevee?

(upncoming) #1

How do you do it or is it no longer necessary? I was thinking that using Overlay over the color textures would work fine but I’ve read somewhere that this not exactly the ‘right’ way to do this.

(helluvamesh) #2

This gives ok results but it would be nice, if the developers implemented ao in the Principled Shader. AO should only affect indirect lighting without affecting direct lights. This is not possible with the current state of the Principled Shader.

Edit: by saying indirect lighting I meant the Environment Cubemap, not bounced lighting, so let’s just say ao should only affect the Environment Cubemap.

(CarlG) #3

How so? I thought AO should only affect ambient light (it occludes/prevents the ambient light from reaching) without affecting direct or indirect lights. Reacting to a strict bounced light scenario would also look wrong. But we don’t really use ambient light anymore, except when world AO is enabled. My intuition says reduction of world AO is the only thing it should really affect (although I would probably plug it into specular as well).

(helluvamesh) #4

You’re right, it should only affect ambient lighting. I used the term ‘indirect light’ because in realtime rendering, if you want good performance with full dynamic lighting, ambient cubemaps are used to fake bounced lighting.


I like to just factor in a mix shader with the AO, with the second input empty. That leaves a perfectly black result without any shading from the specular map for example.

(JonMicheelsen) #6

When you render, AO happens naturally in the renderer - even if you just have normal map detail and no displacement mapping. The ambient light is naturally traced from outside and bounced away occluding cavities. That’s why it’s not needed. AO as a texture is an approximation of this. Having it as a separate multiplier for ambient light/reflections is what you would do in a game engine or real time non-ray-traced render engine if you ambient light/reflection was provided from one or more cubemaps/light probes and “just” sampled from a simple normal/reflection - not traced, thus not bouncing off and less reaching cavities. Depending on your end goal, you might need it, but you shouldn’t have to in Blender.

(CarlG) #7

AO serves two main purposes I can think of:

  1. It fakes GI when true GI is replaced by ambient lights, and can help if you terminate GI early using the simplify bounce option, and maybe even if you number of bounces isn’t enough (not sure).
  2. It can add depth to objects which has fake geometry such as narrow spaces; cabinet doors, cracks between sharp tiles or wooden floor boards and so on.