How KHR_materials_sheen Simulates Fabric in glTF
The KHR_materials_sheen extension in glTF simulates the
soft backscattering and edge-glow characteristic of woven fabrics by
adding an extra microfacet layer designed specifically for grazing-angle
reflections. Standard physically based rendering (PBR) workflows
struggle with textiles because their microscopic, protruding fibers
scatter light differently than hard, flat surfaces. This article
explains the underlying physical principles, the mathematical
distribution model used, and how key parameters combine to replicate
realistic cloth contours in real-time graphics.
The Physics of Fabric Scattering
Conventional PBR materials rely on the Cook-Torrance microfacet model paired with a GGX (Trowbridge-Reitz) normal distribution. While GGX excels at simulating hard surfaces like metal, plastic, or polished wood, it fails on fabrics like velvet, satin, and microfiber.
Textiles consist of countless tiny, perpendicular thread fibers protruding from the weave. When light hits these fibers directly from above, it penetrates into the weave and scatters internally. However, when light strikes the edge of a curved fabric surface at glancing or grazing angles, the microscopic fibers catch and scatter the light forward and backward. This creates a signature soft, fuzzy highlight—known as a sheen or rim effect—along the object's contours.
The Charlie Sheen Distribution
To replicate this optical behavior, KHR_materials_sheen
departs from standard specular models and implements the Charlie sheen
distribution, originally introduced by Alejandro Conty Estevez and
Christopher Kulla at Sony Pictures Imageworks.
The Charlie distribution replaces the traditional GGX Normal Distribution Function (NDF) with an inverted sinusoidal formulation:
\[D(\theta) = \frac{1 + (2 / \alpha) \sin^{(2 / \alpha)}(\theta)}{2\pi}\]
Where \(\alpha\) represents the roughness parameter. Unlike the GGX distribution, which produces a distinct specular highlight that fades at glancing angles, the Charlie formulation produces an inverted response:
- Low reflection at perpendicular angles: Looking directly at the fabric reveals minimal specular reflection, keeping the underlying diffuse color clear and dominant.
- Broad reflection at grazing angles: As the viewing angle approaches the silhouette, the probability of microfacets facing the viewer increases, causing a soft, diffuse-like halo along the contours.
Shadowing, Masking, and Energy Conservation
A realistic sheen model requires proper visibility (geometric attenuation) to prevent surfaces from glowing artificially. The extension pairs the Charlie distribution with the Neubelt and Pettineo visibility term (or Ashikhmin-Premože approximation). This term accounts for micro-fibers shadowing each other at shallow angles, ensuring the rim light softens naturally rather than producing an unnaturally sharp, metallic specular flash.
Additionally, KHR_materials_sheen handles energy
conservation between layers. Because the sheen layer resides above the
base substrate (the base color and specular layer), light reflected by
the sheen layer cannot reach the layers below. The glTF implementation
scales down the transmission to the base diffuse and specular components
proportional to the sheen layer's reflectance, maintaining physical
plausibility across varying lighting environments.
Core Parameters of KHR_materials_sheen
The glTF extension provides direct control over this optical effect through several standardized properties:
sheenColorFactorandsheenColorTexture: Defines the tint of the scattered light at grazing angles. Fabrics often exhibit sheen colors distinct from their base weave (for instance, a two-tone velvet with a dark base and a vibrant edge sheen). Setting this color controls the luminance and hue of the silhouette highlights.sheenRoughnessFactorandsheenRoughnessTexture: Dictates the spread of the sheen across the surface. A low roughness confines the sheen tightly to the extreme silhouettes, resembling smooth fabrics like silk or satin. A high roughness broadens the highlight, pulling the fuzzy scattering further across the face of the geometry to emulate rough wool or heavy velvet.
Through the Charlie distribution and dedicated grazing-angle
roughness controls, KHR_materials_sheen allows real-time
engines to accurately represent the complex optical behaviors of cloth
without relying on costly subsurface scattering simulations.