1

I can't seem to be able to wrap my head around the definitions I find on the web. From what I can gather, these are shadows that YOU paint onto your mesh? Why is it a good idea to have static shadows? Don't shadows change all the time?

For example if I paint ambient occlusion on my model, it's only going to get darker, even if I put lights where they are, isn't that unrealistic?

Jimmy Lin
  • 572
  • 1
  • 5
  • 17
  • 2
    it's a trick to create fake shadows, it improves the object appearance, it can also be used to create dirt, etc – moonboots Jan 05 '21 at 18:04
  • So you they are permanent shadows you would paint on to your mesh to save rendering time? That's confusing, isn't the enter scene "realistic"? Why would a realistic scene have permanent shadows? – Jimmy Lin Jan 05 '21 at 18:07
  • 2
    Ambient occlusion is a form of fake shading, that does not depend on the actual lighting of a scene, it is thought of as a non-directional shading. The main use is to save time on shading instead of calculating ray shading. Practical applications are up to you. Some folks use it to create dirt maps, as the points where one surface touches other surfaces will always be darker (and dirt might collect there as well). Others use it to exaggerate the shading effects on a scene, and others use it instead of shading or just to evaluate modeling. – susu Jan 05 '21 at 18:16
  • If you are rendering in cycles there is no need to use ambient occlusion, as cycles strives to be a physically accurate ray tracer. – susu Jan 05 '21 at 18:18

1 Answers1

5

AO is rarely painted. It is likely baked from a high poly mesh to a low poly mesh. Although there's nothing wrong with doing some hand-painting on top of the bake. It is used as part of a workflow that tries to represent mesh details using texture details instead, because vertices are expensive and texture lookups aren't.

For an example use case of AO, consider a game engine with a baked normal map. Because the normal map is not real geometry, but only tricks that manipulate the way that light bounces off the surface, a recessed area may get lighted in an inappropriate way-- after all, there is no genuine recess there, it's just flat geometry. If you wanted, you could just darken the diffuse texture in those recesses, but there is some lighting that should reach the recess. So you can use ambient occlusion to limit only the ambient lighting, without affecting other lighting.

This is all a trick. There is nothing remotely physical accurate about ambient occlusion, because there is nothing remotely physically accurate about the concept of ambient lighting to begin with. It is not a good idea from the standpoint of realistic lighting. It is a good idea from the standpoint of balancing a good looking picture with reasonable performance-- usually, the real-time performance demanded by games. Achieving this reasonable performance means that you can't use enough vertices to acquire the shadows realistically.

Some people recommend multiplying AO into diffuse for use in Cycles. This is not a good idea. If any texture artist thought that their diffuse should be multiplied by their AO, they'd just do that themselves in PS and skip the AO. Frankly, there's no real way to use AO in Cycles, because Cycles isn't designed for the same goals that game models and textures are designed. If you wanted to use ambient occlusion in Cycles, the closest you could get would be to composite (add) two renders, each using some subset of your lighting/world, and to multiply AO into diffuse in only one of those renders. That would leave AO occluding only some of your lighting, rather than all of it, which is the goal of the use of AO in game engines. So, no, in Cycles, if you use AO as properly as you can, it will not just get darker-- it will get darker in a specific way.

However, AO is appropriate to use in Eevee. Unfortunately, the only shader with an AO input is the Specular shader. Getting game-like renders out of Eevee, using AO, with other shaders, is again possible-- but only with compositing. In this case, a render without your world should use straight diffuse, while a render with your world but without your lights should use diffuse*AO. Your world is the ambient lighting in Eevee that should be occluded by AO. Again, if you use AO properly in Eevee, it will not just make your model darker, it will make your model darker in a specific way.

Nathan
  • 24,535
  • 1
  • 22
  • 68
  • Thanks All. And yes I'm using a program (substance painter) to bake in my AO. So my last question is, if I have AO painted on the mesh, those areas will even be darker in dark scenes right? Almost black even?

    Also what's the difference between me painting it on and using AO the Evee Engine provides?

    – Jimmy Lin Jan 05 '21 at 18:47
  • @JimmyLin If you render in a game engine, using AO, the areas with AO will get less ambient lighting. That will not be brighter, but how much darker it is will depend on your ratio of ambient lighting to non-ambient lighting. As you darken the main lighting, the AO areas will darken along with the rest of your mesh. As your darken the ambient lighting, the AO areas will not darken as quickly as the non-AO areas, because they're already dark. – Nathan Jan 05 '21 at 18:48
  • When you say it will not darken as quickly, does that mean the AO has a separate node we can hook up to the base color? Are AO maps supposed to be black and white? I've been just darkening them with a darker version of my base color. – Jimmy Lin Jan 05 '21 at 18:54
  • @JimmyLin AO are black and white, yes. I don't know what you're asking with regards to AO having a node. There is no AO node, there are only image texture nodes that can reference AO texture images. The only shader with an explicit AO input is the Specular shader for Eevee; for other shaders, to use AO in Blender, you would have to composite as I described above. – Nathan Jan 05 '21 at 18:59