{
 "id": "delta-tracking",
 "title": "Delta (Woodcock) Tracking",
 "aliases": [
  "Woodcock tracking",
  "null-collision tracking",
  "ratio tracking"
 ],
 "domain": "volumes",
 "subdomain": "path-traced volumes",
 "stage": "volume",
 "realtime": "offline",
 "platforms": [
  "cpu",
  "cuda",
  "desktop-gpu",
  "blender",
  "houdini"
 ],
 "year_introduced": 1965,
 "inputs": [
  "volume-density"
 ],
 "outputs": [
  "radiance",
  "hdr-image"
 ],
 "style": "photoreal",
 "dynamic": "both",
 "summary": "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.",
 "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_use": "Choose it in a path tracer for clouds, smoke or explosions where you need unbiased heterogeneous transmittance and scattering without a step-size parameter.\n\nPrefer `volume-ray-marching` for real-time, deterministic cost, and biased but cheap results. Prefer `multiple-scattering-octaves` when you only want a plausible interactive multi-scatter look. Use `openvdb` or `nanovdb` as the density store with a majorant grid.",
 "cost": {
  "class": "offline",
  "notes": "Number of null collisions depends on how tight the majorant is; a loose majorant over a sparse medium makes it very slow."
 },
 "failure_modes": [
  "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"
 ],
 "sources": [
  {
   "role": "primary",
   "key": "doi:10.1145/3072959.3073665",
   "type": "paper",
   "title": "Spectral and decomposition tracking for rendering heterogeneous volumes",
   "authors": [
    "Peter Kutz",
    "Ralf Habel",
    "Yining Karl Li",
    "Jan Novák"
   ],
   "year": 2017,
   "venue": "ACM Transactions on Graphics",
   "url": "https://doi.org/10.1145/3072959.3073665",
   "ids": {
    "doi": "10.1145/3072959.3073665"
   },
   "license": null,
   "extra": {
    "csl_type": "journal-article"
   },
   "provenance": {
    "title": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/3072959.3073665",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/3072959.3073665",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/3072959.3073665",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/3072959.3073665",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/3072959.3073665",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": 1,
   "__bib": "kutz2017spectral"
  },
  {
   "role": "primary",
   "key": "doi:10.1111/cgf.13383",
   "type": "paper",
   "title": "Monte Carlo Methods for Volumetric Light Transport Simulation",
   "authors": [
    "Jan Novák",
    "Iliyan Georgiev",
    "Johannes Hanika",
    "Wojciech Jarosz"
   ],
   "year": 2018,
   "venue": "Computer Graphics Forum",
   "url": "https://doi.org/10.1111/cgf.13383",
   "ids": {
    "doi": "10.1111/cgf.13383"
   },
   "license": null,
   "extra": {
    "csl_type": "journal-article"
   },
   "provenance": {
    "title": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1111/cgf.13383",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1111/cgf.13383",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1111/cgf.13383",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1111/cgf.13383",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1111/cgf.13383",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": 1,
   "__bib": "novk2018monte"
  },
  {
   "role": "implementation",
   "key": "gh:mitsuba-renderer/mitsuba3",
   "type": "code",
   "title": "mitsuba-renderer/mitsuba3",
   "description": "Mitsuba 3: A Retargetable Forward and Inverse Renderer",
   "authors": [
    "mitsuba-renderer"
   ],
   "year": 2021,
   "venue": "GitHub",
   "url": "https://github.com/mitsuba-renderer/mitsuba3",
   "ids": {
    "repo": "mitsuba-renderer/mitsuba3"
   },
   "license": "NOASSERTION",
   "extra": {
    "stars": 3003,
    "stars_checked": "2026-11-29",
    "archived": false,
    "fork": false,
    "pushed_at": "2026-11-28T12:37:12Z",
    "language": "C++",
    "homepage": "https://www.mitsuba-renderer.org/",
    "license_name": "Other"
   },
   "provenance": {
    "title": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/mitsuba-renderer/mitsuba3",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/mitsuba-renderer/mitsuba3",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/mitsuba-renderer/mitsuba3",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/mitsuba-renderer/mitsuba3",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/mitsuba-renderer/mitsuba3",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "license": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/mitsuba-renderer/mitsuba3",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": null,
   "__bib": "mitsubarenderer2021mitsuba"
  }
 ],
 "presets": [
  {
   "id": "delta-tracking-live",
   "title": "Delta (Woodcock) tracking — heterogeneous volume free-flight & null-collision scatter",
   "runtime": "glsl-fragment",
   "params": {
    "P_MAJORANT": 2.8,
    "P_DENSITY": 1.5,
    "P_ANISOTROPY": 0.62,
    "P_SCATTER_STEPS": 28
   },
   "basis": "original",
   "license_note": "Original interactive WebGL2 fragment shader written for Texel Atlas (MIT).",
   "code": "const float P_MAJORANT = 2.8; // P Majorant SigmaMax [0.8, 5.0, 0.1]\nconst float P_DENSITY = 1.5; // P Cloud Density [0.2, 3.2, 0.05]\nconst float P_ANISOTROPY = 0.62; // P Phase g [0.0, 0.9, 0.02]\nconst float P_SCATTER_STEPS = 28.0; // P Tracking Steps [8.0, 44.0, 1.0]\n\nfloat hash31(vec3 p) {\n  p = fract(p * 0.1031);\n  p += dot(p, p.yzx + 33.33);\n  return fract((p.x + p.y) * p.z);\n}\n\nfloat noise3(vec3 p) {\n  vec3 i = floor(p);\n  vec3 f = fract(p);\n  f = f * f * (3.0 - 2.0 * f);\n  float n000 = hash31(i + vec3(0.0, 0.0, 0.0));\n  float n100 = hash31(i + vec3(1.0, 0.0, 0.0));\n  float n010 = hash31(i + vec3(0.0, 1.0, 0.0));\n  float n110 = hash31(i + vec3(1.0, 1.0, 0.0));\n  float n001 = hash31(i + vec3(0.0, 0.0, 1.0));\n  float n101 = hash31(i + vec3(1.0, 0.0, 1.0));\n  float n011 = hash31(i + vec3(0.0, 1.0, 1.0));\n  float n111 = hash31(i + vec3(1.0, 1.0, 1.0));\n  return mix(\n    mix(mix(n000, n100, f.x), mix(n010, n110, f.x), f.y),\n    mix(mix(n001, n101, f.x), mix(n011, n111, f.x), f.y),\n    f.z\n  );\n}\n\nfloat fbm(vec3 p) {\n  float v = 0.0, a = 0.52;\n  for (int i = 0; i < 4; i++) {\n    v += a * noise3(p);\n    p = p * 2.04 + vec3(13.1, 7.7, 5.3);\n    a *= 0.5;\n  }\n  return v;\n}\n\n// Heterogeneous extinction sigma_t(p) bounded inside sphere of radius 1.15\nfloat evalSigmaT(vec3 p) {\n  float r = length(p);\n  if (r > 1.15) return 0.0;\n  float fall = smoothstep(1.15, 0.28, r);\n  vec3 q = p * 1.9 + vec3(iTime * 0.22, -iTime * 0.14, iTime * 0.18);\n  float d = fbm(q) - 0.34;\n  // Swirling filament structure\n  float swirl = fbm(q * 1.6 + vec3(d * 1.5, -d, d * 0.8));\n  float dens = max(0.0, d * 1.45 + (swirl - 0.42) * 0.85) * fall;\n  return dens * max(P_DENSITY, 0.05) * 2.2;\n}\n\nfloat hgPhase(float cosTheta, float g) {\n  float g2 = g * g;\n  return (1.0 - g2) / (12.56637 * pow(max(1.0 + g2 - 2.0 * g * cosTheta, 0.05), 1.5));\n}\n\nvec2 intersectSphere(vec3 ro, vec3 rd, float rad) {\n  float b = dot(ro, rd);\n  float c = dot(ro, ro) - rad * rad;\n  float h = b * b - c;\n  if (h < 0.0) return vec2(-1.0);\n  h = sqrt(h);\n  return vec2(-b - h, -b + h);\n}\n\nvec3 aces(vec3 x) {\n  x = max(x, 0.0);\n  return (x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14);\n}\n\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n  vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;\n\n  float camAng = iTime * 0.25;\n  vec3 ro = vec3(sin(camAng) * 2.85, 0.35, cos(camAng) * 2.85);\n  vec3 ww = normalize(-ro);\n  vec3 uu = normalize(cross(ww, vec3(0.0, 1.0, 0.0)));\n  vec3 vv = cross(uu, ww);\n  vec3 rd = normalize(uv.x * uu + uv.y * vv + 1.45 * ww);\n\n  vec3 sunDir = normalize(vec3(cos(iTime * 0.45 + 0.6), 0.52, sin(iTime * 0.45 + 0.6)));\n  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));\n  bg += vec3(1.0, 0.78, 0.48) * pow(max(dot(rd, sunDir), 0.0), 48.0) * 1.4;\n\n  vec2 hit = intersectSphere(ro, rd, 1.15);\n  vec3 col = bg;\n\n  if (hit.y > 0.0) {\n    float t = max(hit.x, 0.0);\n    float tEnd = hit.y;\n    float sigmaMax = max(P_MAJORANT, 0.5);\n    int maxSteps = int(clamp(P_SCATTER_STEPS, 6.0, 44.0));\n    float g = clamp(P_ANISOTROPY, 0.0, 0.92);\n\n    // Ratio/Delta tracking estimator with null-collision free-flight sampling\n    float seed = fract(sin(dot(fragCoord, vec2(12.9898, 78.233))) * 43758.5453);\n    float T = 1.0;\n    vec3 L = vec3(0.0);\n    float phase = hgPhase(dot(rd, sunDir), g);\n\n    for (int i = 0; i < 44; i++) {\n      if (i >= maxSteps || t >= tEnd || T < 0.015) break;\n      float xi = fract(seed + float(i) * 0.61803398875);\n      // Exponential free-flight step drawn from majorant sigmaMax\n      float dt = -log(max(1.0 - xi * 0.96, 0.04)) / sigmaMax;\n      dt = min(dt, (tEnd - t) + 0.01);\n      t += dt;\n      if (t >= tEnd) break;\n\n      vec3 p = ro + rd * t;\n      float sigmaT = evalSigmaT(p);\n      // Ratio-tracking null-collision probability: 1 - sigmaT / sigmaMax\n      float realProb = clamp(sigmaT / sigmaMax, 0.0, 1.0);\n\n      if (realProb > 0.001) {\n        // Short shadow transmittance ray toward sun via ratio tracking\n        float Tsun = 1.0;\n        for (int s = 1; s <= 5; s++) {\n          vec3 sp = p + sunDir * (float(s) * 0.24);\n          Tsun *= exp(-evalSigmaT(sp) * 0.24);\n        }\n        vec3 sunCol = vec3(2.8, 2.05, 1.35) * Tsun * (0.28 + 3.8 * phase);\n        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;\n        vec3 albedo = mix(vec3(0.95, 0.72, 0.52), vec3(0.92, 0.96, 1.0), clamp(Tsun, 0.0, 1.0));\n        L += T * realProb * albedo * (sunCol + ambCol);\n        T *= (1.0 - realProb);\n      }\n    }\n\n    // Subtle wireframe majorant bounding sphere rim to highlight the tracking domain\n    float rim = pow(clamp(1.0 - abs(dot(normalize(ro + rd * max(hit.x, 0.0)), rd)), 0.0, 1.0), 4.0);\n    col = L + bg * T + vec3(0.28, 0.62, 0.95) * rim * 0.22;\n  }\n\n  fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);\n}",
   "execution_fidelity": "conceptual-diagram",
   "proof": {
    "kind": "rendered",
    "label": "rendered 2026-11-30",
    "ok": true,
    "proof": {
     "ok": true,
     "technique": "delta-tracking",
     "runtime": "glsl-fragment",
     "checked_at": "2026-11-30T16:50:13.852Z",
     "renderer": "Chromium 145.0.7632.6 headless, WebGL2 via ANGLE/SwiftShader, 512×512, iTime=1.5",
     "stats": {
      "mean": 0.6338,
      "std": 0.1653,
      "unique_colors": 159
     },
     "image": "/specimens/delta-tracking-live.webp",
     "reason": null
    }
   }
  }
 ],
 "related": [
  "volume-ray-marching",
  "multiple-scattering-octaves",
  "openvdb"
 ],
 "extends": [],
 "supersedes": [],
 "combines_with": [
  {
   "id": "openvdb",
   "why": "Supplies density and a hierarchical max-grid that bounds the majorant along each ray."
  }
 ],
 "provenance": {
  "prose": "original text written for this index (research draft, editorially reviewed)",
  "sources_verified_at": "2026-11-29T15:51:27.588Z",
  "draft": "data/drafts/volumes/delta-tracking.json"
 },
 "solves": [
  "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"
 ],
 "authority": "Kutz et al., 2017",
 "url": "https://texelatlas.vercel.app/t/delta-tracking/",
 "execution_fidelity": "conceptual-diagram",
 "fidelity_label": "Visual Diagram",
 "benchmark_eligible": false,
 "gpu_weight": {
  "weight_x": 406.27,
  "tier": "extreme",
  "p50_ms": 13.3662,
  "p95_ms": 13.527,
  "baseline_p50_ms": 0.0329,
  "gpu": "Tesla T4/PCIe/SSE2",
  "resolution": "1920x1080",
  "method": "opengl-timer-query",
  "frames": 20,
  "preset_id": "delta-tracking-live",
  "execution_fidelity": "conceptual-diagram",
  "fidelity_label": "Visual Diagram",
  "benchmark_eligible": false,
  "generated_at": "2026-11-30T21:07:47Z",
  "l4": {
   "weight_x": 341.69,
   "tier": "extreme",
   "p50_ms": 5.4328,
   "p95_ms": 5.5273,
   "speedup_x": 2.46,
   "gpu": "NVIDIA L4/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0159
  },
  "a100": {
   "weight_x": 302.49,
   "tier": "extreme",
   "p50_ms": 8.7117,
   "p95_ms": 8.7925,
   "speedup_x": 1.53,
   "gpu": "NVIDIA A100-SXM4-40GB/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0288
  }
 }
}