Ambient occlusion map

Also known as: AO map

On this page 7

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.

ParameterTypical rangeWhat it changes
Sample count64 to 1024 rays per texelNoise level versus bake time
Maximum distanceA few millimeters to the object sizeHow broad the darkening spreads
Spread angle90° to 180° hemisphereDirectional focus of the occlusion
Ignore backfacesOn or offAvoids dark artifacts from inner faces
Ground planeOn or offAdds contact shadow under the object
Key baking parameters

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.

MethodWhen it is calculatedTypical use
Baked AO mapOffline, stored in a textureGame assets, real-time materials
Screen-space AO (SSAO)Every frame from the depth bufferDynamic contact shadows between objects
Ray-traced AOEvery frame with hardware ray tracingHigh-end real-time and previews
Path-traced global illuminationAt render timeFilm and offline rendering, no AO map needed
Cavity mapOffline, very short distanceFine crevice accents and edge wear masks
Ways AO information reaches the final image

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.

MapWhat it encodesAffects silhouetteAffects direct light
Ambient occlusion mapExposure to ambient lightNoNo, in correct PBR use
Cavity mapVery local concavity and convexityNoSometimes, as a stylistic accent
Albedo mapBase color without lightingNoYes, as surface color
Roughness mapMicrosurface scatteringNoYes, through reflections
Displacement mapActual surface heightYesYes, through real geometry
AO map versus related texture maps

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.

ArtifactCauseFix
Grainy specklesToo few samplesRaise samples or apply light denoising
Dark blotches on flat areasOverlapping or intersecting partsBake parts separately in an exploded layout
Black seams on UV edgesInsufficient paddingIncrease dilation to 8 to 16 pixels
Everything too darkMaximum distance too largeReduce distance to suit the asset scale
Wrong occlusion on mirrored UVsOverlapping islands baked togetherOffset mirrored islands by one UV tile
Typical AO artifacts

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.