Materials
Entries of the document's materials lane.
16 methods: addMaterial, roughness, metallic, opacity, colorFactor, cutPattern, alphaCutout, emissive, transmission, clearcoat, sheen, normalMap, roughnessMap, metallicMap, ambientOcclusionMap, displacement.
addMaterial - Material
Surface appearance record, identified by its node key; PBR factors live on properties.
role step, type material, valid on materials, returns material, default key material.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
baseColor | color | '#ffffff' | Surface color, #rrggbb. | |||
texture | url | Base color map address. | ||||
tileWidth | length | 1000 | 0 | Physical mm of one texture tile along U; the renderer repeats the texture at 1/tileWidth. | ||
tileHeight | length | 1000 | 0 | Physical mm of one texture tile along V; the renderer repeats the texture at 1/tileHeight. |
roughness - Roughness
Microfacet roughness, 0..1.
role step, type material, valid on materials, returns number, default key roughness.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
value | number | 0.95 | 0 | 1 | 0 (mirror) to 1 (fully rough); absent on a material means this default. |
metallic - Metallic
Metalness, 0..1.
role step, type material, valid on materials, returns number, default key metallic.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
value | number | 0 | 0 | 1 | 0 (dielectric) to 1 (metal); absent on a material means this default. |
opacity - Opacity
Surface opacity, 0..1.
role step, type material, valid on materials, returns number, default key opacity.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
value | number | 1 | 0 | 1 | 0..1 factor; shared by opacity/colorFactor, each scaling what its own property name says. |
colorFactor - Color factor
With a texture, the texture is tinted by white lerped toward baseColor by this factor (0 = untinted texture, 1 = full baseColor tint); without a texture it has no effect.
role step, type material, valid on materials, returns number, default key colorFactor.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
value | number | 1 | 0 | 1 | 0..1 factor; shared by opacity/colorFactor, each scaling what its own property name says. |
cutPattern - Cut pattern
patterns[] record key drawn where a section cuts this material.
role step, type material, valid on materials, returns string, default key cutPattern.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
value | pattern | Quoted patterns[] key; absent fills the section cut with a solid color instead. |
alphaCutout - Alpha cutout
Presence derives alphaMode MASK.
role step, type material, valid on materials, returns number, default key alphaCutout.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
value | number | 0.5 | 0 | 1 | Alpha threshold 0..1 below which a fragment is discarded; just authoring this property (any value) derives alphaMode MASK. |
emissive - Emissive
Self-lit color + strength + map.
role step, type material, valid on materials, returns color, default key emissive.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
color | color | '#rrggbb' self-lit color; absent means no emission. | ||||
intensity | number | 1 | 0 | Multiplier on color; 1 is unamplified. | ||
map | url | Emissive texture address, multiplied by color and intensity. |
transmission - Transmission
Glass walls (KHR_materials_transmission).
role step, type material, valid on materials, returns number, default key transmission.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
amount | number | 0 | 1 | 0..1 fraction of light transmitted through the surface; absent means opaque. | ||
ior | number | 1.5 | 1 | Index of refraction; 1.5 is typical glass. | ||
thickness | length | Volume thickness in mm, for the attenuation the color/distance below describe. | ||||
attenuationColor | color | '#rrggbb' tint light takes on as it travels through the volume. | ||||
attenuationDistance | length | Distance in mm light travels through the volume before attenuationColor is fully applied. |
clearcoat - Clearcoat
Varnish/gloss paint.
role step, type material, valid on materials, returns number, default key clearcoat.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
amount | number | 0 | 1 | 0..1 strength of the clear-coat layer; absent means none. | ||
roughness | number | 0 | 1 | 0..1 roughness of the clear-coat layer itself, independent of the base surface's roughness. |
sheen - Sheen
Fabric/upholstery sheen.
role step, type material, valid on materials, returns color, default key sheen.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
color | color | '#rrggbb' sheen tint; absent means none. | ||||
roughness | number | 0 | 1 | 0..1 roughness of the sheen layer. |
normalMap - Normal map
Normal map address.
role step, type material, valid on materials, returns string, default key normalMap.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
value | url | Normal map texture address ('data:' or 'https:'). |
roughnessMap - Roughness map
Roughness map address.
role step, type material, valid on materials, returns string, default key roughnessMap.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
value | url | Roughness map texture address, multiplied by roughness. |
metallicMap - Metallic map
Metallic map address.
role step, type material, valid on materials, returns string, default key metallicMap.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
value | url | Metallic map texture address, multiplied by metallic. |
ambientOcclusionMap - AO map
Ambient-occlusion map address.
role step, type material, valid on materials, returns string, default key ambientOcclusionMap.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
value | url | Ambient-occlusion map texture address. |
displacement - Displacement
Height map + amplitude, tessellated geometry only.
role step, type material, valid on materials, returns string, default key displacement.
| Arg | Type | Default | Min | Max | Options | Description |
|---|---|---|---|---|---|---|
map | url | Height map texture address; only affects tessellated geometry. | ||||
scale | length | 1 | Displacement amplitude in mm. |