metalness
Provides the material's metalness, a 0-1 float value that determines in the PBR workflow whether a surface behaves like a dielectric (e.g., plastic) or a conductor (e.g., chrome).
Core Advantages
Completely abstracts underlying Uniform management and seamlessly integrates with the `material.metalness` property, providing a standardized core parameter for the PBR workflow and greatly simplifying material creation.
Common Uses
Creating standard PBR materials, distinguishing plastics/wood (metalness=0) from metals (metalness=1).
Acting as a global intensity controller for a metalness map.
Driving artistic transitions, like a 'petrification' effect from metal to stone.
Debugging the metalness distribution on a model by outputting its value directly.
How to adjust
Modify the `material.metalness` property (0-1) in JavaScript. At 0, the material is a non-metal with colored diffuse and white specular highlights. At 1, it's a metal with almost no diffuse, and its specular highlights and reflections are tinted by the base color.
Code Examples
1// Multiply the value sampled from a map with the global metalness property
2const finalMetalness = metalness.mul( texture( metalnessMap, uv() ).r );