800 Carnarvon Street, #323 New Westminster V3M 0G3

CG Lighting Myth #2 – Ambient Occlusion Shaders are Awesome

Well, OK, Ambient Occlusion shaders can be good…as long as you’re not too picky about the quality of your render.  For stylistic 3D Animation, games, archvis and other similar work it can be just fine.  But in visual effects, photo-real renders on hero objects it is one of the worst lighting solutions you can use.  Here’s the problem (as usual it begins with a bit of history):

Way back in the old days, before processors had the power to crunch more than point lights and shadow maps, ambient occlusion was essentially impossible.  Now let’s be clear what ambient occlusion really is.  It is the “occlusion” or “clouding” or “blocking” of “ambient” light.  Ambient light means indirect light; Light that does not come directly from a light source but first bounces off one or more surfaces before arriving at the subject.  So Ambient Occlusion simply means shadows from bounced light.  Since bounced light is usually diffused off of very large things like walls and floors, it also means that the shadows will be very soft, not very sharp, in most cases.  So what we are really talking about is soft shadows from indirect light sources.  That’s what Ambient Occlusion really is.

But in the old days that was way too expensive to render.  So instead, some clever blokes (Hayden Landis, Ken McGaugh and Hilmar Koch) came up with a method of approximating these soft shadows by cleverly measuring the distance between certain vertices and appropriately darkening the material.  It is more complicated than that, but the result looked far better than anything that had been accomplished before.  Furthermore, since it was a shader and did not require the complex calculation of ray-traced and reflected light, it was extremely efficient and therefore very fast to render.  They called this method “Ambient Occlusion”.

When artists started applying the ambient occlusion shaders to their clay-shaded models they were astonished how much better they looked.  It’s a breakthrough!  Why wouldn’t they use this shader?  Why wouldn’t they ALWAYS use this shader?  In fact most studios today make an AO shader pass a standard and required render pass for every shot, even in photoreal visual effects.  Yuck!  On the other hand, since few artists really know how to light well, this might be a good thing for compositors.

So here’s the thing.   Yes, Ambient Occlusion (known as AO to those in the industry) does make an untextured grey model look better, especially when it has not been well lit (not better than an untextured grey model that has been well lit).  But AO is not directional.  In other words, it doesn’t listen to, nor obey, the direction, intensity, colour or size of light sources the way real indirect light does.  It doesn’t animate with changes in light parameters.  So in the end an AO shader on a finished, animated model under light tends to look more like dirt and grunge rather than shadow from indirect light.  It is one of the most common and easily identified problems in CG rendering that makes people say “Hmmm, something’s not quite right there”.

Now if you are talking about distant objects in a shot like cars way down on the street in a big city shot, or a forest of trees across the valley AO may work just fine, and remains more efficient than real ambient occlusion.  It can be a great optimizing solution.  But it’s not a heavy lifter.  For hero objects, it just looks awful as clearly evidenced in many shots of Star Trek TOS Remastered and so many other vfx shots across TV. and film.  Today, CPUs are powerful enough to easily calculate real soft indirect shadows.  The behavior of real AO is spectacularly superior to the AO Shader.  My advice is to invest a few more CPU cycles and make your objects light beautifully by using real indirect shadows.  You’ll be glad you did.

I hope this post generates as much hate mail as my “ban 3-point lighting” post did. It’s nice to know these old crappy methods are becoming a point of discussion. Maybe in this way we can change old, incorrect perceptions and create a new era in which the lighting artist actually does beautiful lighting instead of the compositing artist having to sweat to assemble something barely acceptable from the hideous render passes generated by the lighting department.

NB