materialThickness
Provides the material's final thickness, with built-in logic to multiply the `.thickness` property by the `.thicknessMap` texture's green channel, primarily for transmission and subsurface scattering effects.
Core Advantages
Its core advantage is automatic combination: it fully encapsulates the specific logic of 'multiplying a base thickness by a map's green channel,' greatly simplifying the workflow for creating realistic materials with volume, like jade or skin.
Common Uses
Controlling light attenuation in transmission effects for materials like jade or jelly.
Defining the light scattering distance within skin or marble for subsurface scattering (SSS) effects.
Simulating leaves or paper, where veins are thicker and less translucent than the flesh.
Directly outputting its value as grayscale to debug the `thicknessMap` texture.
How to adjust
Configure by modifying `MeshPhysicalMaterial` properties in JavaScript. `.thickness` (a number) acts as a global thickness multiplier. If `thicknessMap` is provided, the final thickness is `base_value * map_green_channel_value`, enabling localized thickness variations.
Code Examples
1// In a physical material, connect materialThickness to the thickness input
2// (This is usually handled automatically inside the materialPhysical node)
3material.thicknessNode = materialThickness;