Ambient Occlusion
A rendering technique that simulates how ambient light is blocked in crevices, corners, and contact areas between objects, adding subtle shadows that enhance depth perception and spatial realism.
Ambient Occlusion (AO) calculates how much ambient light each surface point receives. Areas where objects meet and narrow crevices appear darker, while open surfaces stay bright. This subtle darkening dramatically improves depth perception and spatial realism.
- Ray-casting: Rays cast from each point into a hemisphere; the proportion hitting nearby geometry determines occlusion. Offline renderers use 256-1024 rays per sample
- SSAO: Introduced by Crytek in Crysis (2007), approximates occlusion from the depth buffer in real-time. Cannot account for off-screen geometry
- HBAO+ / GTAO: Improved screen-space methods. HBAO+ uses horizon-based calculations; GTAO achieves physically plausible results at lower cost
- AO maps: Pre-computed AO baked as a texture multiplier. Zero runtime cost for static objects. Generated in Substance Painter, Blender Cycles, or xNormal
Games typically combine real-time SSAO with baked AO maps - baked for static geometry, screen-space for dynamic interactions. Unreal Engine 5's Lumen computes AO as part of global illumination. Best practice: keep AO intensity at 0.5-0.8 to avoid unnaturally dark crevices.