{
 "id": "disney-hair-bsdf",
 "title": "Disney / Chiang hair and fur BSDF",
 "aliases": [
  "Chiang hair BSDF",
  "Hair and fur model for production path tracing"
 ],
 "domain": "materials",
 "subdomain": "hair and fur",
 "stage": "material",
 "realtime": "interactive",
 "platforms": [
  "cpu",
  "cuda",
  "blender",
  "houdini",
  "desktop-gpu"
 ],
 "year_introduced": 2016,
 "inputs": [
  "curves",
  "material-params"
 ],
 "outputs": [
  "radiance"
 ],
 "style": "photoreal",
 "dynamic": "both",
 "summary": "An artist-controllable hair BSDF built on the R, TT and TRT lobes but parameterised by melanin, roughness and tint, with a far-field azimuthal approximation that is cheap to evaluate and sample in a path tracer.",
 "how_it_works": "The model keeps the Marschner decomposition into longitudinal and azimuthal terms but redesigns both for production. Longitudinal roughness uses a numerically stable approximation of a Gaussian-like distribution on the sphere, with separate widths per lobe. The azimuthal term is replaced by a closed-form function of the exit angle derived from the geometry of a circular cross-section, avoiding root finding and allowing importance sampling. Colour comes from an absorption coefficient computed from melanin (eumelanin/pheomelanin ratio) and a tint, so artists choose a hair colour like they would for a person rather than tuning RGB absorption. Higher-order internal bounces beyond TRT are folded into one residual lobe to conserve energy. The result is a physically plausible BSDF with a handful of sliders that works inside a path tracer, and is the basis of hair shaders in several renderers.",
 "when_to_use": "Choose it for path-traced or look-dev hair and fur where the artists must dial in colour and roughness without understanding scattering. Prefer `marschner-hair-scattering` when you need the original formulation or are validating against it. Prefer `kajiya-kay-hair-shading` for real-time hair cards. Combine with `path-tracing` plus a dual-scattering or brute-force path depth for blond hair where multiple scattering dominates.",
 "cost": {
  "class": "offline",
  "notes": "Closed-form evaluation and sampling per hit; real cost is hair geometry and path depth."
 },
 "failure_modes": [
  "Light hair needs many bounces between fibres, so low path depth makes it dark and flat",
  "Radial roughness and longitudinal roughness are coupled in the parameterisation, so some looks are hard to reach",
  "Far-field assumption breaks for very thick fibres or extreme close-ups",
  "Fur on animals requires the medulla term that this base model omits, so it can look too translucent or too dark",
  "Tangent direction errors flip the highlights in the same way as for any strand shader"
 ],
 "sources": [
  {
   "role": "primary",
   "key": "doi:10.1111/cgf.12830",
   "type": "paper",
   "title": "A Practical and Controllable Hair and Fur Model for Production Path Tracing",
   "authors": [
    "Matt Jen‐Yuan Chiang",
    "Benedikt Bitterli",
    "Chuck Tappan",
    "Brent Burley"
   ],
   "year": 2016,
   "venue": "Computer Graphics Forum",
   "url": "https://doi.org/10.1111/cgf.12830",
   "ids": {
    "doi": "10.1111/cgf.12830"
   },
   "license": null,
   "extra": {
    "csl_type": "journal-article"
   },
   "provenance": {
    "title": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1111/cgf.12830",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1111/cgf.12830",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1111/cgf.12830",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1111/cgf.12830",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1111/cgf.12830",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": 1,
   "__bib": "chiang2016practical"
  }
 ],
 "presets": [
  {
   "id": "disney-hair-bsdf-live",
   "title": "Disney / Chiang hair BSDF — Marschner R, TT & TRT melanin-absorbed dual-lobe fibers",
   "runtime": "glsl-fragment",
   "params": {
    "P_MELANIN": 0.42,
    "P_ROUGHNESS": 0.26,
    "P_CUTICLE_TILT": 0.08,
    "P_GLINT_BOOST": 1.3
   },
   "basis": "original",
   "license_note": "Original interactive WebGL2 fragment shader written for Texel Atlas (MIT).",
   "code": "const float P_MELANIN = 0.42; // P Melanin [0.05, 1.2, 0.02]\nconst float P_ROUGHNESS = 0.26; // P Longitudinal Rough [0.08, 0.75, 0.02]\nconst float P_CUTICLE_TILT = 0.08; // P Cuticle Tilt [0.0, 0.22, 0.01]\nconst float P_GLINT_BOOST = 1.3; // P TRT Glint [0.0, 2.5, 0.05]\n\nfloat hash11(float p) {\n  p = fract(p * 0.1031);\n  p *= p + 33.33;\n  p *= p + p;\n  return fract(p);\n}\n\n// Gaussian longitudinal scattering lobe M_p\nfloat lobeM(float thetaH, float shift, float beta) {\n  float d = thetaH - shift;\n  return exp(-0.5 * d * d / (beta * beta + 1e-4)) / (2.5066 * beta + 1e-4);\n}\n\n// Fresnel reflectance for hair keratin (IOR ~ 1.55)\nfloat fresnelHair(float cosI) {\n  float f0 = 0.0465;\n  return f0 + (1.0 - f0) * pow(clamp(1.0 - cosI, 0.0, 1.0), 5.0);\n}\n\n// Chiang melanin absorption coefficient sigma_a -> transmittance T\nvec3 hairAbsorption(float melanin, float redness) {\n  vec3 eu = vec3(0.419, 0.697, 1.37);\n  vec3 pheo = vec3(0.187, 0.40, 1.05);\n  float c = melanin * melanin * 3.8;\n  return c * mix(eu, pheo, redness);\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  // Ray-intersect a sculpted 3D hair swatch cylinder + gentle S-wave drape\n  vec3 ro = vec3(0.0, 0.0, 2.55);\n  vec3 rd = normalize(vec3(uv, -1.65));\n\n  // Studio dark velvet backdrop\n  vec3 col = mix(vec3(0.035, 0.03, 0.04), vec3(0.09, 0.08, 0.10), clamp(uv.y + 0.5, 0.0, 1.0));\n  col += vec3(0.18, 0.14, 0.11) * exp(-length(uv - vec2(0.32, 0.35)) * 2.5);\n\n  // Intersect slightly tapered hair bundle sphere/ellipsoid\n  vec3 sc = vec3(0.86, 1.08, 0.86);\n  vec3 roS = ro / sc;\n  vec3 rdS = rd / sc;\n  float a = dot(rdS, rdS);\n  float b = dot(roS, rdS);\n  float c = dot(roS, roS) - 1.0;\n  float disc = b * b - a * c;\n\n  if (disc > 0.0) {\n    float t = (-b - sqrt(disc)) / a;\n    vec3 p = ro + rd * t;\n    vec3 nBase = normalize(p / (sc * sc));\n    vec3 v = -rd;\n\n    // Strand coordinates along curved draped locks\n    float wave = 0.14 * sin(p.y * 4.2 + iTime * 0.8 + p.x * 1.6);\n    float phi = atan(p.x, p.z) + wave;\n    float strandCoord = phi * 58.0;\n    float strandId = floor(strandCoord);\n    float strandFrac = fract(strandCoord) - 0.5;\n    float hRand = hash11(strandId * 13.7);\n    float hRand2 = hash11(strandId * 29.3 + 5.1);\n\n    // Individual cylindrical fiber micro-normal and tangent T along vertical wave\n    float waveDeriv = 0.14 * 4.2 * cos(p.y * 4.2 + iTime * 0.8 + p.x * 1.6);\n    vec3 bitan = normalize(cross(vec3(0.0, 1.0, 0.0), nBase));\n    vec3 T = normalize(cross(nBase, bitan) + bitan * waveDeriv * 0.45);\n    vec3 N = normalize(nBase + bitan * (strandFrac * 1.15));\n\n    // Animated key light + warm rim backlight to showcase R, TT, TRT\n    float lAng = 0.65 * sin(iTime * 0.55) + 0.45;\n    vec3 lKey = normalize(vec3(sin(lAng), 0.55, cos(lAng)));\n    vec3 lRim = normalize(vec3(-0.75, 0.45, -0.62));\n\n    float mel = clamp(P_MELANIN + (hRand - 0.5) * 0.14, 0.04, 1.5);\n    float betaR = clamp(P_ROUGHNESS, 0.07, 0.8);\n    float alpha = clamp(P_CUTICLE_TILT, 0.0, 0.25);\n    vec3 sigmaA = hairAbsorption(mel, 0.42 + 0.25 * hRand2);\n    vec3 trans = exp(-sigmaA * (1.35 + 0.4 * hRand));\n\n    vec3 accum = vec3(0.0);\n    for (int li = 0; li < 2; li++) {\n      vec3 L = (li == 0) ? lKey : lRim;\n      vec3 lCol = (li == 0) ? vec3(2.3, 2.15, 1.95) : vec3(2.8, 1.75, 1.15);\n\n      float sinTi = clamp(dot(T, L), -0.99, 0.99);\n      float sinTo = clamp(dot(T, v), -0.99, 0.99);\n      float ti = asin(sinTi);\n      float to = asin(sinTo);\n      float thetaH = 0.5 * (ti + to);\n      float thetaD = 0.5 * (to - ti);\n      float cosTd = max(cos(thetaD), 0.05);\n\n      // Azimuthal angle difference in normal plane perpendicular to T\n      vec3 lp = normalize(L - T * sinTi + 1e-5);\n      vec3 vp = normalize(v - T * sinTo + 1e-5);\n      float cosPhi = clamp(dot(lp, vp), -1.0, 1.0);\n      float cosHalfPhi = sqrt(max(0.5 + 0.5 * cosPhi, 0.0));\n      float F = fresnelHair(cosTd * cosHalfPhi);\n\n      // R lobe: cuticle primary specular (uncolored, shifted by +alpha)\n      float MR = lobeM(thetaH, -alpha, betaR);\n      float NR = 0.25 * cosHalfPhi;\n      vec3 R = vec3(F * MR * NR) * 0.9;\n\n      // TT lobe: forward transmission through fiber (strong backlit glow, shifted -alpha/2)\n      float MTT = lobeM(thetaH, 0.5 * alpha, betaR * 0.55);\n      float NTT = exp(-3.2 * (1.0 + cosPhi));\n      vec3 TT = (1.0 - F) * (1.0 - F) * trans * MTT * NTT * 2.2;\n\n      // TRT lobe: secondary internal reflection with caustic glint (shifted +1.5*alpha)\n      float MTRT = lobeM(thetaH, 1.5 * alpha, betaR * 1.85);\n      float glint = exp(-18.0 * pow(abs(cosPhi - 0.55), 2.0)) * max(P_GLINT_BOOST, 0.0);\n      vec3 TRT = (1.0 - F) * (1.0 - F) * F * trans * trans * MTRT * (0.65 + 1.8 * glint) * 2.4;\n\n      // Multiple-scattering residual diffuse wrap for natural body volume\n      float wrap = max(dot(N, L) * 0.65 + 0.35, 0.0);\n      vec3 ms = trans * trans * wrap * 0.22;\n\n      float selfOcc = smoothstep(-0.35, 0.65, dot(nBase, L));\n      float shadowTerm = (li == 0) ? (0.25 + 0.75 * selfOcc) : (0.35 + 0.65 * pow(1.0 - max(dot(nBase, v), 0.0), 1.6));\n      accum += lCol * (R + TT + TRT + ms) * shadowTerm;\n    }\n\n    // Fine per-fiber groove micro-occlusion\n    float fiberShade = 0.72 + 0.28 * cos(strandFrac * 6.28318);\n    float microStrand = 0.85 + 0.15 * sin(phi * 180.0 + p.y * 6.0);\n    col = accum * fiberShade * microStrand;\n  }\n\n  fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);\n}",
   "execution_fidelity": "faithful-pass",
   "proof": {
    "kind": "rendered",
    "label": "rendered 2026-11-30",
    "ok": true,
    "proof": {
     "ok": true,
     "technique": "disney-hair-bsdf",
     "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.6661,
      "std": 0.1405,
      "unique_colors": 362
     },
     "image": "/specimens/disney-hair-bsdf-live.webp",
     "reason": null
    }
   }
  }
 ],
 "related": [
  "marschner-hair-scattering",
  "kajiya-kay-hair-shading",
  "strand-based-real-time-hair",
  "disney-principled-brdf",
  "path-tracing"
 ],
 "extends": [
  "marschner-hair-scattering"
 ],
 "supersedes": [],
 "combines_with": [
  {
   "id": "path-tracing",
   "why": "Closed-form sampling of the lobes lets each hair hit be importance sampled inside a standard path tracer."
  }
 ],
 "provenance": {
  "prose": "original text written for this index (research draft, editorially reviewed)",
  "sources_verified_at": "2026-11-29T15:51:27.588Z",
  "draft": "data/drafts/materials/disney-hair-bsdf.json"
 },
 "solves": [
  "artist friendly hair colour from melanin sliders",
  "path traced hair that samples efficiently",
  "fur and hair shader for production renderer",
  "need hair roughness and tint without tuning absorption",
  "blond hair looks too dark in path tracer"
 ],
 "authority": "Chiang et al., 2016",
 "url": "https://texelatlas.vercel.app/t/disney-hair-bsdf/",
 "execution_fidelity": "faithful-pass",
 "fidelity_label": "Faithful Pass",
 "benchmark_eligible": true,
 "gpu_weight": {
  "weight_x": 7.04,
  "tier": "moderate",
  "p50_ms": 0.2315,
  "p95_ms": 0.2526,
  "baseline_p50_ms": 0.0329,
  "gpu": "Tesla T4/PCIe/SSE2",
  "resolution": "1920x1080",
  "method": "opengl-timer-query",
  "frames": 40,
  "preset_id": "disney-hair-bsdf-live",
  "execution_fidelity": "faithful-pass",
  "fidelity_label": "Faithful Pass",
  "benchmark_eligible": true,
  "generated_at": "2026-11-30T21:07:47Z",
  "l4": {
   "weight_x": 5.39,
   "tier": "light",
   "p50_ms": 0.0857,
   "p95_ms": 0.0883,
   "speedup_x": 2.7,
   "gpu": "NVIDIA L4/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0159
  },
  "a100": {
   "weight_x": 4.45,
   "tier": "light",
   "p50_ms": 0.1282,
   "p95_ms": 0.1286,
   "speedup_x": 1.81,
   "gpu": "NVIDIA A100-SXM4-40GB/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0288
  }
 }
}