An ambient occlusion map (often shortened to AO map) is a grayscale texture that stores how exposed each point of a surface is to light arriving from all directions. White texels are fully open to the surrounding environment, while darker texels lie in creases, cavities and contact areas where nearby geometry blocks part of that light.
In Texturing & materials, an area of 3D graphics & animation, the AO map is usually baked once from geometry and then used by a material to reduce indirect lighting, which adds depth and contact shadowing at almost no runtime cost.
How an ambient occlusion map is computed
An AO map is produced by casting rays over a hemisphere above each sample point on the surface and measuring what fraction of them escape without hitting other geometry within a chosen distance. The result, between 0 and 1, is written into the texel that corresponds to that point through the model’s UV mapping.
Most bakers weight the rays by the cosine of their angle to the surface normal, because light arriving at grazing angles contributes less to diffuse shading. The maximum ray distance is the most important setting: short distances capture only tight crevices, while long distances darken broad areas such as the inside of a cup or the space under an arm.
| Parameter | Typical range | What it changes |
|---|---|---|
| Sample count | 64 to 1024 rays per texel | Noise level versus bake time |
| Maximum distance | A few millimeters to the object size | How broad the darkening spreads |
| Spread angle | 90° to 180° hemisphere | Directional focus of the occlusion |
| Ignore backfaces | On or off | Avoids dark artifacts from inner faces |
| Ground plane | On or off | Adds contact shadow under the object |
When a high-poly sculpt is baked onto a low-poly game model, rays are cast from the low-poly surface toward the high-poly detail, often guided by a baking cage. The map then contains occlusion from details that the final mesh no longer has, just as a normal map stores their shading direction.
How the AO map is used in a material
In physically based rendering (PBR) pipelines, the ambient occlusion map should multiply only the indirect or ambient lighting, not light from direct sources such as the sun or a spotlight. Direct light already produces its own shadows, so darkening it again would be physically wrong and would make crevices black even under strong direct illumination.
Many game engines pack AO into a single channel of a combined texture, commonly the red channel of an ORM texture (occlusion, roughness, metallic). This saves memory and texture samples. The map is stored in linear color space, never sRGB, because its values represent a physical ratio rather than a displayed color.
| Method | When it is calculated | Typical use |
|---|---|---|
| Baked AO map | Offline, stored in a texture | Game assets, real-time materials |
| Screen-space AO (SSAO) | Every frame from the depth buffer | Dynamic contact shadows between objects |
| Ray-traced AO | Every frame with hardware ray tracing | High-end real-time and previews |
| Path-traced global illumination | At render time | Film and offline rendering, no AO map needed |
| Cavity map | Offline, very short distance | Fine crevice accents and edge wear masks |
Baked and screen-space AO complement each other. The baked map captures detail within the object, while SSAO adds occlusion between objects that move relative to each other, such as a character standing near a wall.
AO maps compared with neighboring texture maps
An AO map is often confused with other grayscale maps in a material set. The comparison below shows how its role differs from maps that look similar in an image viewer.
| Map | What it encodes | Affects silhouette | Affects direct light |
|---|---|---|---|
| Ambient occlusion map | Exposure to ambient light | No | No, in correct PBR use |
| Cavity map | Very local concavity and convexity | No | Sometimes, as a stylistic accent |
| Albedo map | Base color without lighting | No | Yes, as surface color |
| Roughness map | Microsurface scattering | No | Yes, through reflections |
| Displacement map | Actual surface height | Yes | Yes, through real geometry |
The most important distinction is with the albedo map. In modern PBR work, occlusion must not be painted into albedo, because baked-in shadows stay dark even when the asset is lit from another side and they double up with the engine’s own lighting.
Practical uses beyond shading
AO maps are valuable as masks for texture painting and smart materials. Because AO highlights crevices, it is a natural source for effects that gather where geometry meets.
- Dirt and grime accumulation in corners and seams, driven by darker AO values.
- Moss, rust or dust masks combined with curvature for realistic weathering.
- Stylized shading in hand-painted assets, where a subtle AO multiply adds readable form.
- Lightmap preparation and quick look-development previews before final lighting.
Texture painting applications typically bake AO alongside curvature, thickness and position maps as mesh maps, then use them in generators. In this role, accuracy matters less than clean, noise-free values that produce believable masks.
Common baking problems and fixes
AO bakes fail in predictable ways, usually because of mesh setup, UV layout or distance settings. Diagnosing them early saves texture rework.
| Artifact | Cause | Fix |
|---|---|---|
| Grainy speckles | Too few samples | Raise samples or apply light denoising |
| Dark blotches on flat areas | Overlapping or intersecting parts | Bake parts separately in an exploded layout |
| Black seams on UV edges | Insufficient padding | Increase dilation to 8 to 16 pixels |
| Everything too dark | Maximum distance too large | Reduce distance to suit the asset scale |
| Wrong occlusion on mirrored UVs | Overlapping islands baked together | Offset mirrored islands by one UV tile |
Exploded baking deserves special attention. Separate parts such as a bolt and a plate should be moved apart before baking if they will move independently, otherwise the bolt leaves a permanent dark imprint on the plate. Parts that always stay together should be baked in place to keep their contact shadows.
Finally, texel density limits AO detail. A map at 1024 pixels on a large prop cannot resolve thin seams, so consistent density across assets keeps occlusion uniformly sharp.
Stripped to the essentials
An ambient occlusion map is a picture of where light has trouble reaching on a 3D object. Corners, folds and gaps come out darker, and open surfaces stay bright.
Think of the soft shadow you see where a wall meets the floor or inside the folds of a curtain. The map captures those soft shadows once, so the computer can add them instantly instead of calculating them again for every frame.
Where it is applied
An environment artist on a mobile game is texturing a sci-fi supply crate with a 2,500-triangle low-poly model and a 4-million-polygon sculpt. She bakes a 2048-pixel AO map with 256 samples and a maximum distance of 2 centimeters, exploding the separate latch and handle parts so they do not stamp shadows onto the body.
The AO goes into the red channel of an ORM texture, saving a texture sample on low-end phones, where screen-space ambient occlusion is disabled. She also uses the same AO map as a mask for grime in panel seams. In the final scene, the crate reads as solid and detailed under the level’s ambient lighting, and the bake adds depth without any runtime cost.