Skip to content
Shapemetry

Model - materials[]

Every method of the materials[] lane. Each step of a materials[] entry returns a material, and the lane's entries are addressed by the identity schema/lanes.ts declares for it.

MethodDescriptionArgTypeDefaultMeaning
materialMaterial — Surface appearance record (color / PBR factors / texture slots) — materials[] lane only. Referenced by name via applyMaterial.namestring'Material'Material name (string expression; quote literals). Unique among resolved names.
baseColorcolorSurface color, hex (e.g. '#ffffff'). Omit for default.
texturestringBase color map — an image URI (https:// or data:) or a textures[] chain key. A plain URI keeps default REPEAT+LINEAR sampling; non-default wrap/filter needs a one-node image chain declaring those builtins.
normalTexturestringNormal map — URI or textures[] chain key. Shares tileWidth/tileHeight.
roughnessTexturestringRoughness map (glTF green channel) — URI or textures[] chain key.
metallicTexturestringMetallic map (glTF blue channel) — URI or textures[] chain key.
displacementTexturestringHeight map — URI or textures[] chain key. Visible only on tessellated geometry.
displacementScalelengthDisplacement amplitude in mm. Default 1.
aoTexturestringAmbient-occlusion map — URI or textures[] chain key. Prefer a chain with uvSet for lightmaps.
tileWidthlengthPhysical mm of one seamless texture tile (URI textures only — a textures[] chain's own lengthX wins). Default 1000.
tileHeightlengthPhysical mm of one seamless texture tile (URI textures only — a textures[] chain's own lengthY wins). Default 1000.
colorFactornumber0 = texture only, 1 = solid baseColor. Default 1.
opacitynumber0..1. Default 1.
roughnessnumber0..1. Default 1.
metallicnumber0..1. Default 0.
transmissionnumberKHR_materials_transmission 0..1 — glass walls (opacity alone is frosted plastic).
thicknesslengthKHR_materials_volume thickness mm (optical path).
attenuationColorcolorKHR_materials_volume attenuation color, hex.
attenuationDistancelengthKHR_materials_volume attenuation distance mm.
iornumberIndex of refraction — glass ≈ 1.5 (KHR_materials_ior).
clearcoatnumberVarnish / gloss paint (KHR_materials_clearcoat).
clearcoatRoughnessnumberClearcoat roughness 0..1.
sheenColorcolorFabric/upholstery sheen color (KHR_materials_sheen).
sheenRoughnessnumberSheen roughness 0..1.
kFactornumberSheet-metal bend K-factor (ANSI convention, typical 0.3-0.5) — placePart's default source; a per-bend .bend.kFactor wins. Default 0.4.
alphaTestnumberAlpha-cutout threshold (glTF MASK). Unset = no cutout.
alphaModestring'OPAQUE'|'MASK'|'BLEND' — wins over alphaTest/opacity when present.
emissivecolorSelf-lit color, hex.
emissiveTexturestringEmissive map — URI or textures[] chain key.
emissiveIntensitynumberEmissive strength multiplier. Default 1.
doubleSidedbinary0Render both faces of a surface (thin imported geometry).
densitynumberkg/mm³ (e.g. steel 7.85e-6) — ALWAYS kg/mm³, never rescaled by the display unit.
Last updated: 📖 2 min readEdit on GitHub