Delta (Woodcock) Tracking
An unbiased way to sample free-flight distance in heterogeneous media by adding fictitious null collisions until the medium looks homogeneous with a constant majorant.
Also known as Woodcock tracking, null-collision tracking, ratio tracking
In the family Atmosphere, water & volumes, path-traced volumes
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | |
| Babylon.js 9.38.0 | None found | |
| Godot 4.7 | None found | |
| Unity | None found | |
| Unreal 5.7 | None found | |
| Blender 5.2 | Built in | Properties > Render > Volumes > Biased (leave disabled, the default) in Cycles docs The default (non-Biased) mode is based on null scattering, the generalisation of delta tracking. |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
Sampling a distance proportional to transmittance is easy only when density is constant. Delta tracking picks a majorant sigma_max that bounds the true extinction everywhere along the ray, draws tentative step lengths from an exponential with rate sigma_max, and at each tentative point accepts a real collision with probability sigma_t(x) over sigma_max; otherwise it treats it as a null collision and continues in the same direction. Because only the density value, not an integral, is needed, it works with any procedural or voxel density. Variants include ratio tracking for estimating transmittance along shadow rays (multiplying by one minus the acceptance probability), residual tracking with a control medium, and spectral and decomposition tracking for chromatic media. A coarse majorant grid (often a DDA over a low-resolution max grid) keeps the null-collision count small.
When to choose it
Reach for it when
- path-traced smoke or clouds need unbiased results
- heterogeneous volume sampling without a step size setting
- ray-march banding in offline volume renders
- sample scattering distances in a varying density medium
Choose it in a path tracer for clouds, smoke or explosions where you need unbiased heterogeneous transmittance and scattering without a step-size parameter.
Prefer Ray-marched Participating Media for real-time, deterministic cost, and biased but cheap results. Prefer Multiple-Scattering Approximation by Octaves when you only want a plausible interactive multi-scatter look. Use OpenVDB or NanoVDB as the density store with a majorant grid.
Field marks
- Loose majorants produce huge numbers of null collisions and long render times
- High variance in thin media with an unlucky single sample, producing fireflies in direct lighting through ratio tracking
- Chromatic media (different sigma per channel) bias or noise unless handled by spectral tracking
- Lighting from small light sources in dense media needs next-event estimation or noise explodes
- Majorant grid cells that do not cover the density interpolation kernel cause energy loss
Presets
Delta (Woodcock) tracking — heterogeneous volume free-flight & null-collision scatter
{
"P_MAJORANT": 2.8,
"P_DENSITY": 1.5,
"P_ANISOTROPY": 0.62,
"P_SCATTER_STEPS": 28
}Show GLSL (138 lines)
const float P_MAJORANT = 2.8; // P Majorant SigmaMax [0.8, 5.0, 0.1]
const float P_DENSITY = 1.5; // P Cloud Density [0.2, 3.2, 0.05]
const float P_ANISOTROPY = 0.62; // P Phase g [0.0, 0.9, 0.02]
const float P_SCATTER_STEPS = 28.0; // P Tracking Steps [8.0, 44.0, 1.0]
float hash31(vec3 p) {
p = fract(p * 0.1031);
p += dot(p, p.yzx + 33.33);
return fract((p.x + p.y) * p.z);
}
float noise3(vec3 p) {
vec3 i = floor(p);
vec3 f = fract(p);
f = f * f * (3.0 - 2.0 * f);
float n000 = hash31(i + vec3(0.0, 0.0, 0.0));
float n100 = hash31(i + vec3(1.0, 0.0, 0.0));
float n010 = hash31(i + vec3(0.0, 1.0, 0.0));
float n110 = hash31(i + vec3(1.0, 1.0, 0.0));
float n001 = hash31(i + vec3(0.0, 0.0, 1.0));
float n101 = hash31(i + vec3(1.0, 0.0, 1.0));
float n011 = hash31(i + vec3(0.0, 1.0, 1.0));
float n111 = hash31(i + vec3(1.0, 1.0, 1.0));
return mix(
mix(mix(n000, n100, f.x), mix(n010, n110, f.x), f.y),
mix(mix(n001, n101, f.x), mix(n011, n111, f.x), f.y),
f.z
);
}
float fbm(vec3 p) {
float v = 0.0, a = 0.52;
for (int i = 0; i < 4; i++) {
v += a * noise3(p);
p = p * 2.04 + vec3(13.1, 7.7, 5.3);
a *= 0.5;
}
return v;
}
// Heterogeneous extinction sigma_t(p) bounded inside sphere of radius 1.15
float evalSigmaT(vec3 p) {
float r = length(p);
if (r > 1.15) return 0.0;
float fall = smoothstep(1.15, 0.28, r);
vec3 q = p * 1.9 + vec3(iTime * 0.22, -iTime * 0.14, iTime * 0.18);
float d = fbm(q) - 0.34;
// Swirling filament structure
float swirl = fbm(q * 1.6 + vec3(d * 1.5, -d, d * 0.8));
float dens = max(0.0, d * 1.45 + (swirl - 0.42) * 0.85) * fall;
return dens * max(P_DENSITY, 0.05) * 2.2;
}
float hgPhase(float cosTheta, float g) {
float g2 = g * g;
return (1.0 - g2) / (12.56637 * pow(max(1.0 + g2 - 2.0 * g * cosTheta, 0.05), 1.5));
}
vec2 intersectSphere(vec3 ro, vec3 rd, float rad) {
float b = dot(ro, rd);
float c = dot(ro, ro) - rad * rad;
float h = b * b - c;
if (h < 0.0) return vec2(-1.0);
h = sqrt(h);
return vec2(-b - h, -b + h);
}
vec3 aces(vec3 x) {
x = max(x, 0.0);
return (x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14);
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
float camAng = iTime * 0.25;
vec3 ro = vec3(sin(camAng) * 2.85, 0.35, cos(camAng) * 2.85);
vec3 ww = normalize(-ro);
vec3 uu = normalize(cross(ww, vec3(0.0, 1.0, 0.0)));
vec3 vv = cross(uu, ww);
vec3 rd = normalize(uv.x * uu + uv.y * vv + 1.45 * ww);
vec3 sunDir = normalize(vec3(cos(iTime * 0.45 + 0.6), 0.52, sin(iTime * 0.45 + 0.6)));
vec3 bg = mix(vec3(0.025, 0.04, 0.075), vec3(0.09, 0.14, 0.24), clamp(rd.y * 0.5 + 0.5, 0.0, 1.0));
bg += vec3(1.0, 0.78, 0.48) * pow(max(dot(rd, sunDir), 0.0), 48.0) * 1.4;
vec2 hit = intersectSphere(ro, rd, 1.15);
vec3 col = bg;
if (hit.y > 0.0) {
float t = max(hit.x, 0.0);
float tEnd = hit.y;
float sigmaMax = max(P_MAJORANT, 0.5);
int maxSteps = int(clamp(P_SCATTER_STEPS, 6.0, 44.0));
float g = clamp(P_ANISOTROPY, 0.0, 0.92);
// Ratio/Delta tracking estimator with null-collision free-flight sampling
float seed = fract(sin(dot(fragCoord, vec2(12.9898, 78.233))) * 43758.5453);
float T = 1.0;
vec3 L = vec3(0.0);
float phase = hgPhase(dot(rd, sunDir), g);
for (int i = 0; i < 44; i++) {
if (i >= maxSteps || t >= tEnd || T < 0.015) break;
float xi = fract(seed + float(i) * 0.61803398875);
// Exponential free-flight step drawn from majorant sigmaMax
float dt = -log(max(1.0 - xi * 0.96, 0.04)) / sigmaMax;
dt = min(dt, (tEnd - t) + 0.01);
t += dt;
if (t >= tEnd) break;
vec3 p = ro + rd * t;
float sigmaT = evalSigmaT(p);
// Ratio-tracking null-collision probability: 1 - sigmaT / sigmaMax
float realProb = clamp(sigmaT / sigmaMax, 0.0, 1.0);
if (realProb > 0.001) {
// Short shadow transmittance ray toward sun via ratio tracking
float Tsun = 1.0;
for (int s = 1; s <= 5; s++) {
vec3 sp = p + sunDir * (float(s) * 0.24);
Tsun *= exp(-evalSigmaT(sp) * 0.24);
}
vec3 sunCol = vec3(2.8, 2.05, 1.35) * Tsun * (0.28 + 3.8 * phase);
vec3 ambCol = mix(vec3(0.14, 0.24, 0.45), vec3(0.55, 0.68, 0.88), clamp(p.y * 0.5 + 0.5, 0.0, 1.0)) * 0.55;
vec3 albedo = mix(vec3(0.95, 0.72, 0.52), vec3(0.92, 0.96, 1.0), clamp(Tsun, 0.0, 1.0));
L += T * realProb * albedo * (sunCol + ambCol);
T *= (1.0 - realProb);
}
}
// Subtle wireframe majorant bounding sphere rim to highlight the tracking domain
float rim = pow(clamp(1.0 - abs(dot(normalize(ro + rd * max(hit.x, 0.0)), rd)), 0.0, 1.0), 4.0);
col = L + bg * T + vec3(0.28, 0.62, 0.95) * rim * 0.22;
}
fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}Attribution: Original interactive WebGL2 fragment shader written for Texel Atlas (MIT).
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| delta-tracking-live | Tesla T4 1920x1080 | 406× baseline (extreme) · 13.4 ms / 13.5 ms | opengl-timer-query · 20 frames · GPU Weight Atlas · Colab T4 sweep |
| delta-tracking-live | NVIDIA L4 1920x1080 | 342× baseline (extreme) · 5.43 ms / 5.53 ms · 2.5× faster on L4 | opengl-timer-query · Cross-architecture validation |
| delta-tracking-live | NVIDIA A100-SXM4-40GB 1920x1080 | 302× baseline (extreme) · 8.71 ms / 8.79 ms · 1.5× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
From the citation graph (Crossref reference lists): its primary source cites Henyey-Greenstein Phase Function, OpenVDB, Continuous-Wavelength Hero and Single-Wavelength Spectral Dispersion, Instant Radiosity (Virtual Point Lights), Multi-Scale 3D Diffusive Volumetric Irradiance, Deep shadow maps, Practical Path Guiding, Lightcuts; cited by Multiple-Scattering Approximation by Octaves, Ray-marched Participating Media.
Crosses
- Strange attractors as lit clouds: Strange attractors rendered as physically lit participating media, with self-shadowing and multiple scattering, instead of glowing additive trails. Attractor density is extremely sparse, which suits null-collision tracking over a sparse grid.
- OpenVDB: Supplies density and a hierarchical max-grid that bounds the majorant along each ray.
Sources
- primaryPeter Kutz, Ralf Habel, Yining Karl Li, Jan Novák (2017). Spectral and decomposition tracking for rendering heterogeneous volumes. ACM Transactions on Graphics.Verified via crossref · 2026-11-29doi:10.1145/3072959.3073665
- primaryJan Novák, Iliyan Georgiev, Johannes Hanika, Wojciech Jarosz (2018). Monte Carlo Methods for Volumetric Light Transport Simulation. Computer Graphics Forum.Verified via crossref · 2026-11-29doi:10.1111/cgf.13383
- implementationmitsuba-renderer (2021). mitsuba-renderer/mitsuba3. Mitsuba 3: A Retargetable Forward and Inverse RendererGitHub API · license NOASSERTION · 2026-11-29