thickness
The `thickness` node is a key input for `MeshPhysicalMaterial` used to simulate how light transmits and scatters within translucent materials (like jade, skin, or wax), enabling Subsurface Scattering for a soft, luminous quality.
Core Advantages
Greatly enhances the realism of translucent materials. Through an easy-to-set JS property (usually a thickness map), it allows developers to precisely control how light passes through different parts of an object, which is core to achieving advanced Subsurface Scattering effects.
Common Uses
Jade & Wax
Organic Skin
Frosted Glass & Liquids
How to adjust
Adjusting the `thickness` effect is a multi-parameter process. It's primarily controlled in JS by modifying `material.thickness` (often a texture) to define local translucency, in tandem with `material.attenuationDistance` (to control global muddiness) and `material.attenuationColor` (to set the transmitted light's hue).
Code Examples
1// Enable transmission to activate the thickness effect
2material.transmission = 1.0;
3
4// Connect a pre-baked thickness map to the material property
5// The `thickness` node in TSL will read this texture's value
6material.thickness = texture(thicknessMap);
7
8// (Optional) Define the transmitted light color and its falloff distance
9material.attenuationColor = color(0x99ff99); // A light green
10material.attenuationDistance = 0.5;