Using Ambient Occlusion Textures in 2.8 Eevee?

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.

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.

1 Like

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).

1 Like

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.

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.

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.

Works great. But what if you have a Specular map? Do you just swap it out with the the Specular Value node?

Specular maps are very different based on what workflow they were created for. This question can’t be answered without seeing the whole texture set.

Its year old topic, but i havent seen solution so far, so:

Use Shader to RGB node to get mask of something like direct/ambient light to get properly multiply only ambient areas.
But that will work only in simple scenes where light source is clearly way more powerful than environment.

Specular BSDF vs PrincipedAOmixed

eg. something like that:
Albedo AO mix:

Material AO mix:

1 Like