The 3D Handbook
Key term

Ambient occlusion

How much surrounding ambient light can reach each point of a surface; baked AO maps versus screen-space AO versus Lumen and other real-time GI, and the long-running debate about multiplying AO into the base colour.

materialstexturingbakinglighting

Ambient occlusion (AO) is the darkening of corners, cracks and contact areas where surrounding light cannot easily reach. Epic describes the effect as one that "approximates the attenuation of light due to occlusion" (Unreal Engine documentation: Ambient Occlusion). An AO map stores it per pixel: white where a point sees all of its surroundings, black where it sees none (Unity Manual: Occlusion Map).

#What AO does and does not affect

AO only darkens ambient (indirect) light, the soft light that comes from the sky and from bouncing off other surfaces. glTF's definition: it "indicates areas that would receive less indirect lighting from ambient sources. Direct lighting is not affected" (Khronos Group: glTF 2.0 Specification). Unity and Godot describe their AO inputs the same way (Unity Manual: Occlusion Map; Godot documentation: Standard Material 3D and ORM Material 3D). Direct sunlight and lamps are handled by shadows instead.

Adobe adds that AO "only affects the diffuse contribution and should not occlude the specular contribution" (Adobe Substance 3D: The PBR Guide – Part 2), though engines differ in how they apply it.

A side view of the ground with a narrow slot cut into it. On the open ground, a point sends out 13 orange rays in a half-circle, all reaching the sky. At the bottom of the slot, a point sends the same 13 rays, but only the 3 pointing almost straight up escape; the other 10 are dashed grey and stop at the slot walls.
AO measures how much of its surroundings a point can see. The point in the slot sees only 3 of 13 directions, so its AO value is low and it receives little ambient light.Diagram by the handbook author

#Three sources of AO

Baked AO maps. A baker casts rays from the low poly (or the high poly) and records how much of each point is blocked; Blender's AO bake "ignores all lights in the scene" because it only measures geometry (Blender Manual: Render Baking). Baked AO is detailed and costs nothing at runtime. Godot: "nothing beats the quality of a well-baked AO map. It is recommended to bake ambient occlusion whenever possible" (Godot documentation: Standard Material 3D and ORM Material 3D). Its limitation is that it only knows about the asset itself, not the world around it. Marmoset's floor occlusion option adds downward darkening as if the object stood on a floor, "typically most useful for static objects" (Marmoset: The Toolbag Baking Tutorial).

Screen-space AO (SSAO). Calculated every frame from the depth buffer and normals, "in a deferred pass in screen space" (Unreal Engine documentation: Ambient Occlusion). It handles contact between objects and moving things, but it only sees what the camera sees and "cannot know about the thickness of objects", which can produce dark halos (Unreal Engine documentation: Ambient Occlusion). Material AO and SSAO combine, so the result can get darker than intended (Unreal Engine documentation: Ambient Occlusion).

Real-time global illumination. Systems such as Lumen calculate indirect light properly, which includes occlusion at larger scales. Epic: "Lumen Global Illumination replaces Distance Field Ambient Occlusion (DFAO)" (Unreal Engine documentation: Lumen Global Illumination and Reflections). Lumen still supports Material Ambient Occlusion for small-scale self-occlusion, when "Allow Static Lighting" is disabled in the project settings (Unreal Engine documentation: Lumen Global Illumination and Reflections). See global illumination.

Baked AO map SSAO Lumen / real-time GI
Scale Small, within one asset Medium, what is on screen Large, whole scene
Cost Texture memory only Per frame, per pixel Per frame, higher
Moves with objects Yes (self-occlusion only) Yes Yes
Typical problem Ignores the environment Halos, only on-screen data Misses fine detail, which material AO adds

In practice, current engines use more than one: a baked AO channel for fine detail, plus screen-space or GI-based occlusion for the scene.

Three identical clusters of blue cubes on a grid. The left one, labelled Ambient Light, is evenly lit with no darkening in the corners. The middle one, labelled Screen Space AO, has soft dark areas where cubes meet. The right one, labelled Baked AO (in material), has darker, more defined occlusion in the creases.
The same blocks with ambient light only, with screen-space AO, and with AO baked into the material. Compare how much contact shadow each adds where the cubes meet. Screenshot from Godot.Godot Engine documentation (Juan Linietsky, Ariel Manzur and the Godot community), CC BY 3.0
A grey, untextured view of an arched courtyard with columns. Corners, the bases of columns and the undersides of arches are darkened by screen-space ambient occlusion.
Screen-space AO in Godot. Its purpose, in the documentation's words, is "to make sure concave areas are darker, simulating a narrower path for the light to enter". Look at the column bases and the inside corners of the arches.Godot Engine documentation (Juan Linietsky, Ariel Manzur and the Godot community), CC BY 3.0
Epic's SSAO half of a comparison. Screen-space AO can only use what is on screen, so check the edges of objects and the areas behind them.Epic Games, Unreal Engine documentation
The same scene with ray-traced AO, from the comparison on Epic's hardware ray tracing page (Epic Developer Community documentation: Hardware Ray Tracing in Unreal Engine). Compare the contact areas and object edges with the SSAO image above.Epic Games, Unreal Engine documentation

#AO in the base colour?

Before PBR, artists routinely multiplied AO into the diffuse texture. Whether you still should is one of the longest-running texturing debates.

#Example

#Common mistakes

#In different tools

baking · texture maps explained · channel packing · global illumination · real-time lighting · base colour (albedo) map

#Further reading and watching

References

  1. Epic Games · Ambient Occlusion (Unreal Engine 4.27) · Unreal Engine documentation, 2021 · docs · accessed 2026-10-21
  2. Unity Technologies · Occlusion Map (Standard Shader) · Unity Manual · docs · accessed 2026-10-21
  3. Khronos Group · glTF 2.0 Specification · Khronos Group (GitHub) · docs · accessed 2026-10-21
  4. Godot Engine contributors · Standard Material 3D and ORM Material 3D (documentation source) · Godot documentation (GitHub) · docs · accessed 2026-10-21
  5. Allegorithmic · The PBR Guide – Part 2 · Adobe Substance 3D (Adobe Learn) · article · accessed 2026-10-21
  6. Blender Foundation · Render Baking (Cycles) · Blender Manual (2.93), 2021 · docs · accessed 2026-10-21
  7. Joe Wilson · The Toolbag Baking Tutorial · Marmoset, 2017 · article · accessed 2026-10-21
  8. Epic Games · Lumen Global Illumination and Reflections · Unreal Engine documentation · docs · accessed 2026-10-21
  9. Epic Games · Hardware Ray Tracing in Unreal Engine · Epic Developer Community documentation · docs · accessed 2026-10-22
  10. Epic Games · Material Inputs (Unreal Engine 4.27) · Unreal Engine documentation, 2021 · docs · accessed 2026-10-21
  11. Polycount forum (Maximum-Dev, EarthQuake, s6, Joopson, gnoop, teaandcigarettes and others) · PBR - AO - Question · Polycount, 2015 · forum · accessed 2026-10-21
  12. Epic Games · Physically Based Materials in Unreal Engine · Unreal Engine documentation · docs · accessed 2026-10-21
  13. Unity Technologies · Mask map and detail map (HDRP) · High Definition Render Pipeline manual 17.0 · docs · accessed 2026-10-21

Also consulted

Last updated 2026-10-22