Skip to main content

MaterialJsonInput

Material fields for a JSON body. Map files need multipart/form-data.

namestring

Required on create.

visibilitystring

private - creator only; organization - members of its organization (organization_id required); unlisted - anyone with the id, never listed; public - listed, readable without signing in. Texture files stay loadable by URL whatever this says.

Possible values: [private, organization, unlisted, public]

Default value: private
organization_idstring

Organization to file the material under (prefix id org_... or numeric id); you must be a member. Empty string removes it.

Example: org_abc123
y_flipboolean

Store textures bottom-up (for textures uploaded with flipY); every encode inherits it.

Default value: false
normal_conventionstring

How the uploaded normal map was made; directx maps get their green channel flipped when encoded.

Possible values: [opengl, directx]

Default value: opengl
parameters object

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

metadata object

Free-form JSON (how the maps were made, physical scale, per-map layout, ...), at most 256 KB.

property name*any

Free-form JSON (how the maps were made, physical scale, per-map layout, ...), at most 256 KB.

MaterialJsonInput
{
"name": "string",
"visibility": "private",
"organization_id": "org_abc123",
"y_flip": false,
"normal_convention": "opengl",
"parameters": {
"baseColorFactor": [
0
],
"metallicFactor": 0,
"roughnessFactor": 0,
"normalScale": 0,
"occlusionStrength": 0,
"emissiveFactor": [
0
],
"emissiveStrength": 0,
"alphaMode": "OPAQUE",
"alphaCutoff": 0,
"doubleSided": true,
"displacementScale": 0,
"displacementBias": 0
},
"metadata": {}
}