{
 "id": "light-stage-reflectance-capture",
 "title": "Light Stage Reflectance Capture",
 "aliases": [
  "light stage",
  "reflectance field capture"
 ],
 "domain": "capture",
 "subdomain": "appearance capture",
 "stage": "capture",
 "realtime": "offline",
 "platforms": [
  "cpu"
 ],
 "year_introduced": 2000,
 "inputs": [
  "photos"
 ],
 "outputs": [
  "texture",
  "material-params",
  "normals"
 ],
 "style": "photoreal",
 "dynamic": "static",
 "summary": "Photographs a subject lit from many directions, one at a time, to record its reflectance field, enabling relighting and recovery of albedo, normals and specular layers.",
 "how_it_works": "A rig of many point-like light sources on a sphere around the subject is flashed in sequence while a calibrated camera captures an image per light. Because light transport is linear, the stack of images is the subject's reflectance field sampled at the light directions. Any lighting environment is reproduced by weighting each basis image by the environment's radiance in that direction and summing, which gives physically correct relighting with all inter-reflection and subsurface effects included. Later systems add polarised lighting to separate specular from diffuse components, and gradient illumination patterns to estimate normals and albedo with few frames. These measurements feed photoreal digital humans and give training data for appearance models.",
 "when_to_use": "Choose it for the highest-fidelity skin or object appearance capture and relighting when you can build or access a rig. Prefer `photometric-stereo` for a cheaper, small-scale rig that only needs normals and albedo, `nerf` or `gaussian-splatting-3dgs` for casual capture with baked-in lighting, and `universal-photometric-stereo` for handheld varying light.",
 "cost": {
  "class": "offline",
  "notes": "Capture takes a fraction of a second to seconds per pose; relighting from the basis images is cheap."
 },
 "failure_modes": [
  "Subject motion between flashes causes ghosting unless frames are aligned",
  "Finite light count restricts relighting to low-to-mid frequency environments, with sharp highlights stepping",
  "Needs large, calibrated hardware, so cost and access are limiting",
  "Polarisation separation fails for strongly depolarising materials"
 ],
 "sources": [
  {
   "role": "primary",
   "key": "doi:10.1145/344779.344855",
   "type": "paper",
   "title": "Acquiring the reflectance field of a human face",
   "authors": [
    "Paul Debevec",
    "Tim Hawkins",
    "Chris Tchou",
    "Haarm-Pieter Duiker",
    "Westley Sarokin",
    "Mark Sagar"
   ],
   "year": 2000,
   "venue": "Proceedings of the 27th annual conference on Computer graphics and interactive techniques  - SIGGRAPH '00",
   "url": "https://doi.org/10.1145/344779.344855",
   "ids": {
    "doi": "10.1145/344779.344855"
   },
   "license": null,
   "extra": {
    "csl_type": "proceedings-article"
   },
   "provenance": {
    "title": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/344779.344855",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/344779.344855",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/344779.344855",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/344779.344855",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/344779.344855",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": 1,
   "__bib": "debevec2000acquiring"
  }
 ],
 "presets": [
  {
   "id": "light-stage-reflectance-capture-live",
   "title": "Light Stage Reflectance Capture — cross-polarized diffuse (left) vs full polarized SH relighting (right)",
   "runtime": "glsl-fragment",
   "params": {
    "P_ENV_ROT": 0.75,
    "P_SPEC_SEP": 1,
    "P_LED_DOME": 0.85,
    "P_SPLIT": 0.48
   },
   "basis": "original",
   "license_note": "MIT — written for this index.",
   "code": "const float P_ENV_ROT = 0.75; // P Relight Orbit [0.0, 2.2, 0.05]\nconst float P_SPEC_SEP = 1.0; // P Specular Lobe [0.0, 2.0, 0.05]\nconst float P_LED_DOME = 0.85; // P LED Dome Nodes [0.0, 1.5, 0.05]\nconst float P_SPLIT = 0.48; // P Diffuse / Relit Split [0.0, 1.0, 0.02]\n\nmat2 rot2(float a) { float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }\n\nfloat smin(float a, float b, float k) {\n  float h = clamp(0.5 + 0.5 * (b - a) / max(k, 1e-4), 0.0, 1.0);\n  return mix(b, a, h) - k * h * (1.0 - h);\n}\n\n// Sculpted classical portrait bust inside the geodesic Light Stage capture sphere\nfloat mapBust(vec3 p) {\n  // Cranium + jaw + nose bridge + brow ridge + neck/shoulders\n  float dHead = length(vec3(p.x * 1.15, (p.y - 0.14) * 0.90, p.z * 1.05)) - 0.42;\n  float dJaw = length(vec3(p.x * 1.25, (p.y + 0.10) * 1.1, (p.z - 0.08) * 1.15)) - 0.30;\n  float dNose = length(vec3(p.x * 2.4, (p.y - 0.08) * 1.2, (p.z - 0.38) * 1.6)) - 0.10;\n  float dBrow = length(vec3(p.x * 0.9, (p.y - 0.22) * 3.0, (p.z - 0.30) * 2.2)) - 0.14;\n  float dNeck = max(length(p.xz - vec2(0.0, -0.04)) - 0.16, abs(p.y + 0.42) - 0.24);\n  float dShoulders = length(vec3(p.x * 0.55, (p.y + 0.68) * 1.4, p.z * 1.25)) - 0.36;\n\n  float face = smin(dHead, dJaw, 0.14);\n  face = smin(face, dNose, 0.05);\n  face = smin(face, dBrow, 0.06);\n  // Subtle eye-socket indentations for rich grazing specular + diffuse subsurface cues\n  float dEyes = length(vec3(abs(p.x) - 0.13, p.y - 0.15, p.z - 0.33)) - 0.075;\n  face = max(face, -dEyes * 0.45);\n  float bust = smin(face, dNeck, 0.08);\n  bust = smin(bust, dShoulders, 0.10);\n  return bust * 0.85;\n}\n\nvec3 calcNormal(vec3 p) {\n  vec2 e = vec2(0.0022, 0.0);\n  return normalize(vec3(\n    mapBust(p + e.xyy) - mapBust(p - e.xyy),\n    mapBust(p + e.yxy) - mapBust(p - e.yxy),\n    mapBust(p + e.yyx) - mapBust(p - e.yyx)\n  ));\n}\n\n// Spherical-Harmonic relighting basis reconstructed from OLAT Light Stage dome captures\nvec3 evalLightStageEnv(vec3 dir, float rotAng) {\n  vec3 d = dir;\n  d.xz = rot2(rotAng) * d.xz;\n  // Studio key (warm sunset), rim (electric cyan), overhead softbox\n  vec3 keyDir = normalize(vec3(0.68, 0.48, 0.55));\n  vec3 rimDir = normalize(vec3(-0.75, 0.25, -0.52));\n  vec3 fillDir = normalize(vec3(0.0, 0.92, -0.25));\n  vec3 env = vec3(0.08, 0.10, 0.15);\n  env += vec3(2.4, 1.55, 0.88) * pow(max(dot(d, keyDir), 0.0), 3.0);\n  env += vec3(0.35, 1.35, 1.95) * pow(max(dot(d, rimDir), 0.0), 4.0);\n  env += vec3(0.75, 0.82, 0.95) * max(dot(d, fillDir), 0.0) * 0.65;\n  return env;\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  float screenX = fragCoord.x / max(iResolution.x, 1.0);\n  float split = clamp(P_SPLIT, 0.0, 1.0);\n  bool isFullRelit = screenX >= split;\n  float envRot = iTime * max(P_ENV_ROT, 0.0);\n  float specGain = clamp(P_SPEC_SEP, 0.0, 2.2);\n  float domeVis = clamp(P_LED_DOME, 0.0, 1.5);\n\n  vec3 ro = vec3(0.0, 0.04, 2.25);\n  vec3 rd = normalize(vec3(uv, -1.55));\n\n  // Background: geodesic Light Stage spherical LED dome with active OLAT/gradient LEDs!\n  vec3 domeDir = normalize(vec3(uv * 1.45, -1.0));\n  float theta = atan(domeDir.x, -domeDir.z);\n  float phi = asin(clamp(domeDir.y, -1.0, 1.0));\n  vec2 ledGrid = vec2(theta * 5.0, phi * 5.0);\n  vec2 ledCell = floor(ledGrid);\n  vec2 ledF = fract(ledGrid) - 0.5;\n  float ledDot = smoothstep(0.16, 0.05, length(ledF));\n  float strut = smoothstep(0.05, 0.012, min(abs(ledF.x), abs(ledF.y)));\n  vec3 ledCol = evalLightStageEnv(domeDir, envRot);\n\n  vec3 col = vec3(0.022, 0.028, 0.042) + vec3(0.05, 0.07, 0.11) * strut * min(domeVis, 1.0);\n  col += ledCol * ledDot * 0.85 * min(domeVis, 1.2);\n\n  float t = 0.0;\n  bool hit = false;\n  for (int i = 0; i < 68; i++) {\n    float d = mapBust(ro + rd * t);\n    if (d < 0.002) { hit = true; break; }\n    t += d;\n    if (t > 7.0) break;\n  }\n\n  if (hit) {\n    vec3 p = ro + rd * t;\n    vec3 n = calcNormal(p);\n    vec3 v = -rd;\n\n    // Fine skin/stone pore micro-normal perturbation (captured by Light Stage specular normal map!)\n    float pore = sin(p.x * 85.0) * sin(p.y * 85.0) * cos(p.z * 85.0);\n    vec3 nSpec = normalize(n + vec3(pore, -pore, 0.0) * 0.045);\n\n    // Subsurface warm diffuse albedo (captured via cross-polarized spherical gradient illumination)\n    vec3 diffAlb = mix(vec3(0.76, 0.54, 0.44), vec3(0.84, 0.66, 0.56), clamp(p.y + 0.35, 0.0, 1.0));\n\n    // Diffuse irradiance from SH Light Stage integration (softened normal for subsurface wrap)\n    vec3 diffIrr = evalLightStageEnv(n, envRot) * 0.55 + evalLightStageEnv(normalize(n + vec3(0.0, 0.3, 0.2)), envRot) * 0.25;\n    vec3 diffusePart = diffAlb * diffIrr * 0.72;\n\n    if (!isFullRelit) {\n      // Left: Cross-polarized capture isolates pure diffuse subsurface albedo (zero specular shine!)\n      col = diffusePart;\n    } else {\n      // Right: Full separated reflectance field = diffuse + polarized dual-lobe specular + Fresnel rim\n      vec3 rDir = reflect(-v, nSpec);\n      float fres = 0.035 + 0.965 * pow(1.0 - max(dot(nSpec, v), 0.0), 5.0);\n      vec3 specEnv = evalLightStageEnv(rDir, envRot);\n      // Primary crisp oil-sheen specular + broader micro-roughness specular\n      vec3 kDir = normalize(vec3(0.68, 0.48, 0.55));\n      kDir.xz = rot2(-envRot) * kDir.xz;\n      float sLobe1 = pow(max(dot(nSpec, normalize(kDir + v)), 0.0), 68.0);\n      float sLobe2 = pow(max(dot(nSpec, normalize(kDir + v)), 0.0), 16.0);\n      vec3 specPart = (specEnv * fres * 0.85 + vec3(1.0, 0.92, 0.84) * (sLobe1 * 0.95 + sLobe2 * 0.28)) * specGain;\n      col = diffusePart + specPart;\n    }\n  }\n\n  float sep = smoothstep(0.0035, 0.0008, abs(screenX - split));\n  col = mix(col, vec3(0.95, 0.97, 1.0), sep);\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": "light-stage-reflectance-capture",
     "runtime": "glsl-fragment",
     "checked_at": "2026-11-30T19:53:28.000Z",
     "renderer": "Headless EGL Tesla T4/PCIe/SSE2, OpenGL 3.30 Core, 512×512, iTime=1.5",
     "stats": {
      "mean": 0.4158,
      "std": 0.2886,
      "min": 0.1589,
      "max": 0.9549
     },
     "image": "/specimens/light-stage-reflectance-capture-live.webp",
     "reason": null
    }
   }
  }
 ],
 "related": [
  "photometric-stereo",
  "universal-photometric-stereo"
 ],
 "extends": [],
 "supersedes": [],
 "combines_with": [
  {
   "id": "photometric-stereo",
   "why": "Light stage frames provide the multi-light images from which normals and albedo are solved."
  }
 ],
 "provenance": {
  "prose": "original text written for this index (research draft, editorially reviewed)",
  "sources_verified_at": "2026-11-29T15:51:27.588Z",
  "draft": "data/drafts/capture/light-stage-reflectance-capture.json"
 },
 "solves": [
  "need to relight a captured face or object",
  "want highest quality skin appearance capture",
  "need albedo, normals and specular from real subject",
  "baked lighting in captures prevents relighting"
 ],
 "authority": "Debevec et al., 2000",
 "url": "https://texelatlas.vercel.app/t/light-stage-reflectance-capture/",
 "execution_fidelity": "conceptual-diagram",
 "fidelity_label": "Visual Diagram",
 "benchmark_eligible": false,
 "gpu_weight": {
  "weight_x": 26.85,
  "tier": "heavy",
  "p50_ms": 0.8322,
  "p95_ms": 0.842,
  "baseline_p50_ms": 0.0329,
  "gpu": "Tesla T4/PCIe/SSE2",
  "resolution": "1920x1080",
  "method": "opengl-timer-query",
  "frames": 36,
  "preset_id": "light-stage-reflectance-capture-live",
  "execution_fidelity": "conceptual-diagram",
  "fidelity_label": "Visual Diagram",
  "benchmark_eligible": false,
  "generated_at": "2026-11-30T21:07:47Z",
  "l4": {
   "weight_x": 20.19,
   "tier": "heavy",
   "p50_ms": 0.321,
   "p95_ms": 0.3226,
   "speedup_x": 2.59,
   "gpu": "NVIDIA L4/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0159
  },
  "a100": {
   "weight_x": 18.65,
   "tier": "moderate",
   "p50_ms": 0.5371,
   "p95_ms": 0.5415,
   "speedup_x": 1.55,
   "gpu": "NVIDIA A100-SXM4-40GB/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0288
  }
 }
}