Skip to main content

MaterialParameters

glTF 2.0 metallic-roughness factors and settings (KHR_materials_* names, as three.js MeshStandardMaterial uses them). Factors multiply the textures; without a texture the factor is the value. Unknown keys, wrong types and out-of-range values are rejected (422). On update a key set to null returns to its default.

baseColorFactornumber[]

Linear RGBA, multiplies base_color. Default [1, 1, 1, 1].

Possible values: >= 4, <= 4

metallicFactornumber

Multiplies orm.B. Default 1 with a metalness or orm source, else 0.

Possible values: >= 0 and <= 1

roughnessFactornumber

Multiplies orm.G. Default 1.

Possible values: >= 0 and <= 1

normalScalenumber

Strength of the normal texture. Default 1.

Possible values: >= -10 and <= 10

occlusionStrengthnumber

How much orm.R darkens. Default 1.

Possible values: >= 0 and <= 1

emissiveFactornumber[]

Linear RGB, multiplies emissive. Default [0, 0, 0], or [1, 1, 1] with an emissive map.

Possible values: >= 3, <= 3

emissiveStrengthnumber

KHR_materials_emissive_strength. Default 1.

Possible values: >= 0 and <= 1000

alphaModestring

Default OPAQUE, or MASK with an opacity map.

Possible values: [OPAQUE, MASK, BLEND]

alphaCutoffnumber

Cutoff for MASK. Default 0.5.

Possible values: >= 0 and <= 1

doubleSidedboolean

Default false.

displacementScalenumber

Metres the displacement texture moves vertices (three.js, not glTF core). Default 0.02.

Possible values: >= -100 and <= 100

displacementBiasnumber

Metres added to the displacement. Default 0.

Possible values: >= -100 and <= 100

MaterialParameters
{
"baseColorFactor": [
0
],
"metallicFactor": 0,
"roughnessFactor": 0,
"normalScale": 0,
"occlusionStrength": 0,
"emissiveFactor": [
0
],
"emissiveStrength": 0,
"alphaMode": "OPAQUE",
"alphaCutoff": 0,
"doubleSided": true,
"displacementScale": 0,
"displacementBias": 0
}