ambient occlusion shader in blender?

I saw in Blender 2.64.9 that there is the Ambient occlusion shader. But I want to ask: why a shader and not a map? I would like to use an ambient occlusion map to map some values like diffuse, roughnes or reflection, or to mix different shaders or textures. How can I do these things with a shader? Why do they did a Shader node and not a texture node?

A simpler approach is to turn off Ambient Occlusion in Blender Internal and just turn on Environmental lighting. You can set that to use the Sky Color to tint your scene. Both options can use either Gather method. Raytrace or Approximate.

Ambient Occlusion

Environmental lighting set to use the sky color.

In Cycles you can get similar results by just using the Sky color.


I once discovered that you could control AO per object using obIndex on the render layers, but for that it means to split apart the whole render and then composite back with nodes, here’s a not so goob example of mine, hope it helps. Not sure on how to composite back without the aliasing problem.

By the way I screwed around with the color balance/rgb curves to modify the ao color, not sure what works better…

There’s an ambient occlusion shader but it isn’t possible to change its parameters (it uses the AO settings from the world tab) and also it isn’t possible to link it into a Mix or Math node to adjust it.
These two features (AO shader adjustment and allowing it to be changed with other nodes) are very important imho. This way we could make a dirt map a la V-ray without having to mess with vertex colours or uv mapping.