How is a Height-to-Cavity map different from Ambient Occlusion?
Cavity isolates tight local surface crevices and raised ridges around 50% gray, while Ambient Occlusion casts broader soft shadows into deeper pockets.
Local Height Curvature Extractor
Convert any grayscale height, bump, or displacement map into a neutral-gray centered cavity mask locally—darkening recessed mortar lines and cracks while highlighting raised ridges for PBR shading.
Height cavity mask (radius 2 px, strength 2.2x) · Mean Byte 128/255 · Contrast Spread 183
| Kernel Radius | Feature Scale | Ideal Material Use |
|---|---|---|
| 1 px (3×3) | Crisp micro-scratches & fine pores | Brushed metal, skin pores, fine weave |
| 2–3 px | Brick mortar, wood grain, tile grout | Architectural masonry, carved stone |
| 4–5 px | Broad bevels & sculpted folds | Terrain crevices, stylized rock cracks |
By comparing each height pixel against the wrapped mean elevation of its immediate neighborhood, recessed grooves yield negative deltas (dark gray) while protruding ridges yield positive deltas (bright gray) around a clean 0.50 midpoint.
Multiply the dark side over Albedo or Specular to ground small geometric details that standard screen-space ambient occlusion misses.
Because neighborhood sampling wraps modulo width and height, tiling height maps produce 100% seamless cavity maps with zero dark borders along UV edges.
Cavity isolates tight local surface crevices and raised ridges around 50% gray, while Ambient Occlusion casts broader soft shadows into deeper pockets.
Enable Invert if your source height map uses dark pixels for raised peaks instead of bright pixels, or when you want bright cracks as a dust/dirt mask.
Import cavity masks as Linear / Non-Color when driving shader math or roughness masks so the 0.50 neutral midpoint stays exact.
Never. All pixel math runs 100% locally inside HTML5 Canvas memory.
Optional Google Analytics
Accept loads Google Analytics 4 for traffic and conversion measurement. Reject keeps it off. Necessary first-party product events and the cookie-free pageview counter remain active. This choice never enables advertising.