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.
| key | type | default | min | max | options | tooltip |
|---|---|---|---|---|---|---|
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. |
alphaCutout
Alpha cutout · step · returns number · context: materials
Default key: alphaCutout.
Presence derives alphaMode MASK.
| key | type | default | min | max | options | tooltip |
|---|---|---|---|---|---|---|
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. |
ambientOcclusionMap
AO map · step · returns string · context: materials
Default key: ambientOcclusionMap.
Ambient-occlusion map address.
| key | type | default | min | max | options | tooltip |
|---|---|---|---|---|---|---|
value | url | Ambient-occlusion map texture address. |
attributes
Attributes · step · returns object · context: properties, materials, layers, patterns
Default key: attributes.
Free-form domain bag.
| key | type | default | min | max | options | tooltip |
|---|---|---|---|---|---|---|
value | object | 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.
| key | type | default | min | max | options | tooltip |
|---|---|---|---|---|---|---|
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. |
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.
| key | type | default | min | max | options | tooltip |
|---|---|---|---|---|---|---|
value | number | 1 | 0 | 1 | 0..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.
| key | type | default | min | max | options | tooltip |
|---|---|---|---|---|---|---|
value | pattern | Quoted 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.
| key | type | default | min | max | options | tooltip |
|---|---|---|---|---|---|---|
map | url | Height map texture address; only affects tessellated geometry. | ||||
scale | length | 1 | Displacement amplitude in mm. |
doubleSided
Double sided · step · returns boolean · context: materials
Default key: doubleSided.
Render both faces of a surface.
| key | type | default | min | max | options | tooltip |
|---|---|---|---|---|---|---|
value | boolean | false | true 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.
| key | type | default | min | max | options | tooltip |
|---|---|---|---|---|---|---|
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. |
metallic
Metallic · step · returns number · context: materials
Default key: metallic.
Metalness, 0..1.
| key | type | default | min | max | options | tooltip |
|---|---|---|---|---|---|---|
value | number | 0 | 0 | 1 | 0 (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.
| key | type | default | min | max | options | tooltip |
|---|---|---|---|---|---|---|
value | url | Metallic map texture address, multiplied by metallic. |
normalMap
Normal map · step · returns string · context: materials
Default key: normalMap.
Normal map address.
| key | type | default | min | max | options | tooltip |
|---|---|---|---|---|---|---|
value | url | Normal map texture address ('data:' or 'https:'). |
opacity
Opacity · step · returns number · context: materials
Default key: opacity.
Surface opacity, 0..1.
| key | type | default | min | max | options | tooltip |
|---|---|---|---|---|---|---|
value | number | 1 | 0 | 1 | 0..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.
| key | type | default | min | max | options | tooltip |
|---|---|---|---|---|---|---|
value | number | 0.95 | 0 | 1 | 0 (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.
| key | type | default | min | max | options | tooltip |
|---|---|---|---|---|---|---|
value | url | Roughness map texture address, multiplied by roughness. |
sheen
Sheen · step · returns color · context: materials
Default key: sheen.
Fabric/upholstery sheen.
| key | type | default | min | max | options | tooltip |
|---|---|---|---|---|---|---|
color | color | '#rrggbb' sheen tint; absent means none. | ||||
roughness | number | 0 | 1 | 0..1 roughness of the sheen layer. |
transmission
Transmission · step · returns number · context: materials
Default key: transmission.
Glass walls (KHR_materials_transmission).
| key | type | default | min | max | options | tooltip |
|---|---|---|---|---|---|---|
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. |