Ambient Occlusion
Ambient occlusion is a technique used in computer graphics to approximate the effect of environment lighting.
How does it work?
Algorithm calculates appearance of each point on model based on how easy it is for a surface to be touched by light sources. From algorithm point of view, FinalMesh enumerates triangles of model. Occlusion is calculated for each 3D point on triangle and mapped to 2d texture image. Generated texture image could be used as emissive texture in order to show baked lighting or modulate standard lighting. In last case texture may be attached to diffuse/specular material channels or to special light map channels.
Apart from classic ambient occlusion this tool may generate shadow maps for current scene lights. Results are high quality soft or hard shadows.
Requirements
- Objects shouldn't be instanced. Each instance has it's own placement and unique lighting.
- Objects made from primitives ( Cube, Plane, Sphere) may work as is
without convertion to polygons. But this work only if each primitive
has it's own texture and #0 UV channel is used. If not, convert them
to polygonal mesh.
In order to do that, select them and in tool menu click "Rasterize Procedural Objects". - Modifiers may be processed without convertion. In this case algorithm will look for meshes or primitives in modifier hierarchy. Not all types of modifiers may be processed.
- Rest objects should be converted to polygonal meshes (see exceptions below) and shouldn't be instanced. Materials must be assigned to objects. Objects with quads or polygons may be triangulated during AO and UV unwrap process.
- If objects do not have materials, please use existing one or create new one. Drag material to objects in order to attach material to object.
Usage
Simple Case - One untextured object
Load any model, check existence of material. If not present, create new one and drop to material. Select Ambient Occlusion from tools menu. Default options will work just fine.
Already textured object
If your objects already have regular color textures and you want to create AO texture, just select objects you want to process and select Ambient Occlusion. Most likely first UV channel (UV0) is used already, so just select second channel (UV1) and go.
Multiple Objects
You may process objects one by one or select all required objects and select Ambient Occlusion tool. It may be logical to use one AO texture for all objects, in this case you should select required objects and UV Unwarp option select "Process mutiple selection as single object".