home/ atoms/ procedural-occlusion-painting

Procedurally painted occlusion using model-aware distance signals fills gaps left by sampled AO

Sampled AO has limited precision for very small or high-frequency features. Artists can supplement it with procedural signals computed during the SDF evaluation itself — e.g. the distance to the mouth ellipsoid drives darkness inside the mouth; the distance from the ground plane darkens candy bases; the SDF of the eye socket darkens the eyeball’s edge. These signals are stored in extra channels of the map() return value (vec4) and applied at shading time. The technique is essentially analytical baking of intuitive occlusion knowledge — faster and art-directable vs screen-space methods.

Examples

Return res.w = smoothstep(0.1, -0.1, mouthDist) from map(); multiply all light contributions by 1.0-res.w in the shading pass.

Assessment

A shader uses procedural occlusion for a mouth interior but the darkening is too strong everywhere. What parameter controls the falloff range and how would you adjust it?

“oftentimes the short distance occlusion is very easy to compute procedurally by the same signal that you are using to model”
corpus · inigo-quilez-live-coding-happy-jumping-video · chunk 25