Skip to content
ParaShape

Materials

ModelJson.materials.

// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { AddMaterialMethod } from "./AddMaterialMethod.js";
import type { Argument } from "./Argument.js";
import type { PropertyNode } from "./PropertyNode.js";

/**
 * A `materials[]` entry: the `addMaterial` head plus a `properties` list
 * for everything else. Identity is `key`, unique within `materials[]`.
 */
export type MaterialNode = { 
/**
 * identity — unique in the document's one key namespace, every lane.
 */
key: string, 
/**
 * intent — editor-chrome display name, printed verbatim; absent falls
 * back to `key` (`RecordView.ts`: "header = label (or key)").
 */
label?: string, 
/**
 * intent — the one closed-literal materials-lane head.
 */
method: AddMaterialMethod, 
/**
 * intent — `baseColor`/`texture`/`tileWidth`/`tileHeight`.
 */
args?: Array<Argument>, 
/**
 * intent — every other `ResolvedMaterial` field.
 */
properties?: Array<PropertyNode>, };
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
 * The one materials-lane head method.
 */
export type AddMaterialMethod = "addMaterial";
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Argument } from "./Argument.js";

/**
 * One entry of a `properties` list — `{ method, args? }`, OPEN at the shape
 * tier: which methods are legal in which home is a registry check
 * (`crate::validate::registry` for an object's placement properties,
 * `crate::validate::lanes` for a material/layer/pattern's own), never a
 * schema enum.
 */
export type PropertyNode = { 
/**
 * intent — the registry-checked property method.
 */
method: string, 
/**
 * intent — the method's arguments.
 */
args?: Array<Argument>, };
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
 * One value + its domain — the shape of every arg (a parameter's value, a
 * step arg, a properties arg). `min`/`max` are numeric-only; `options`, when
 * present, is the arg's whole domain.
 */
export type Argument = { 
/**
 * identity — the arg's name; meant unique among its owning node's
 * `args`, but nothing rejects a duplicate — `node_args::node_arg_input`/
 * `set_node_arg` read and write only the FIRST match, silently ignoring
 * any later one.
 */
key: string, 
/**
 * intent — an expression string, authored and underivable; may be
 * empty (an unselected file parameter authors nothing, so this arg's
 * min/max/options do not apply).
 */
input: string, 
/**
 * intent — expression → number, inclusive lower bound.
 */
min?: string, 
/**
 * intent — expression → number, inclusive upper bound.
 */
max?: string, 
/**
 * intent — expression → non-empty array, the arg's whole domain.
 */
options?: string, 
/**
 * intent — expression → `[{ time, value }]`, explicit key pairs on the
 * document's one timeline (USD `timeSamples`, Blender `keyframe_points`).
 * Legal ONLY on the `value` arg of a `length`/`number`/`angle`/`integer`
 * PARAMETER — the parameter is the clip; any other arg fails loud. The
 * host plays it (`engine_animation_set`); the engine never samples it.
 */
keyframes?: string, 
/**
 * intent — expression → boolean: whether the configurator shows this
 * parameter to the buyer (true = shown, absent = shown; a parameter
 * hidden this way still evaluates and still feeds every expression that
 * reads it). Legal ONLY on the `value` arg of a PARAMETER — any other
 * arg fails loud. It may read any parameter of the scope, so a
 * parameter can be conditional on another.
 */
visible?: string, };

Catalog methods

Every engine_catalog node whose context names "materials" — the addMaterial head plus every materials[].properties method.

18 catalog method(s) whose context names "materials".

addMaterial

Material · step · returns material · context: materials

Default key: material.

Surface appearance record, identified by its node key; PBR factors live on properties.

keytypedefaultminmaxoptionstooltip
baseColorcolor'#ffffff'Surface color, #rrggbb.
textureurlBase color map address.
tileWidthlength10000Physical mm of one texture tile along U; the renderer repeats the texture at 1/tileWidth.
tileHeightlength10000Physical mm of one texture tile along V; the renderer repeats the texture at 1/tileHeight.

alphaCutout

Alpha cutout · step · returns number · context: materials

Default key: alphaCutout.

Presence derives alphaMode MASK.

keytypedefaultminmaxoptionstooltip
valuenumber0.501Alpha threshold 0..1 below which a fragment is discarded; just authoring this property (any value) derives alphaMode MASK.

ambientOcclusionMap

AO map · step · returns string · context: materials

Default key: ambientOcclusionMap.

Ambient-occlusion map address.

keytypedefaultminmaxoptionstooltip
valueurlAmbient-occlusion map texture address.

attributes

Attributes · step · returns object · context: properties, materials, layers, patterns

Default key: attributes.

Free-form domain bag.

keytypedefaultminmaxoptionstooltip
valueobject | function{}Free-form JSON object merged onto this placement's attributes; the engine reads nothing out of it.

clearcoat

Clearcoat · step · returns number · context: materials

Default key: clearcoat.

Varnish/gloss paint.

keytypedefaultminmaxoptionstooltip
amountnumber010..1 strength of the clear-coat layer; absent means none.
roughnessnumber010..1 roughness of the clear-coat layer itself, independent of the base surface's roughness.

colorFactor

Color factor · step · returns number · context: materials

Default key: colorFactor.

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.

keytypedefaultminmaxoptionstooltip
valuenumber1010..1 factor; shared by opacity/colorFactor, each scaling what its own property name says.

cutPattern

Cut pattern · step · returns string · context: materials

Default key: cutPattern.

patterns[] record key drawn where a section cuts this material.

keytypedefaultminmaxoptionstooltip
valuepatternQuoted patterns[] key; absent fills the section cut with a solid color instead.

displacement

Displacement · step · returns string · context: materials

Default key: displacement.

Height map + amplitude, tessellated geometry only.

keytypedefaultminmaxoptionstooltip
mapurlHeight map texture address; only affects tessellated geometry.
scalelength1Displacement amplitude in mm.

doubleSided

Double sided · step · returns boolean · context: materials

Default key: doubleSided.

Render both faces of a surface.

keytypedefaultminmaxoptionstooltip
valuebooleanfalsetrue renders both faces of a surface; false (default) culls the back face.

emissive

Emissive · step · returns color · context: materials

Default key: emissive.

Self-lit color + strength + map.

keytypedefaultminmaxoptionstooltip
colorcolor'#rrggbb' self-lit color; absent means no emission.
intensitynumber10Multiplier on color; 1 is unamplified.
mapurlEmissive texture address, multiplied by color and intensity.

metallic

Metallic · step · returns number · context: materials

Default key: metallic.

Metalness, 0..1.

keytypedefaultminmaxoptionstooltip
valuenumber0010 (dielectric) to 1 (metal); absent on a material means this default.

metallicMap

Metallic map · step · returns string · context: materials

Default key: metallicMap.

Metallic map address.

keytypedefaultminmaxoptionstooltip
valueurlMetallic map texture address, multiplied by metallic.

normalMap

Normal map · step · returns string · context: materials

Default key: normalMap.

Normal map address.

keytypedefaultminmaxoptionstooltip
valueurlNormal map texture address ('data:' or 'https:').

opacity

Opacity · step · returns number · context: materials

Default key: opacity.

Surface opacity, 0..1.

keytypedefaultminmaxoptionstooltip
valuenumber1010..1 factor; shared by opacity/colorFactor, each scaling what its own property name says.

roughness

Roughness · step · returns number · context: materials

Default key: roughness.

Microfacet roughness, 0..1.

keytypedefaultminmaxoptionstooltip
valuenumber0.95010 (mirror) to 1 (fully rough); absent on a material means this default.

roughnessMap

Roughness map · step · returns string · context: materials

Default key: roughnessMap.

Roughness map address.

keytypedefaultminmaxoptionstooltip
valueurlRoughness map texture address, multiplied by roughness.

sheen

Sheen · step · returns color · context: materials

Default key: sheen.

Fabric/upholstery sheen.

keytypedefaultminmaxoptionstooltip
colorcolor'#rrggbb' sheen tint; absent means none.
roughnessnumber010..1 roughness of the sheen layer.

transmission

Transmission · step · returns number · context: materials

Default key: transmission.

Glass walls (KHR_materials_transmission).

keytypedefaultminmaxoptionstooltip
amountnumber010..1 fraction of light transmitted through the surface; absent means opaque.
iornumber1.51Index of refraction; 1.5 is typical glass.
thicknesslengthVolume thickness in mm, for the attenuation the color/distance below describe.
attenuationColorcolor'#rrggbb' tint light takes on as it travels through the volume.
attenuationDistancelengthDistance in mm light travels through the volume before attenuationColor is fully applied.
📖 5 min read