Nodes
The scene graph, a map of nodes keyed by id, with parents, transforms, visibility and tints.
A node is anything in the scene: a mesh, a text, a particle emitter, or a group. Nodes live in one map keyed by id, and parent links build the hierarchy.

{
"camera": { "position": [0, 2.5, 7], "target": [0, 0.6, 0], "fov": 40 },
"lighting": { "rig": "studio_soft" },
"environment": {
"background": {
"radial_gradient": { "inner": "#1b2233", "outer": "#07090f" }
}
},
"materials": {
"floor": { "preset": "matte_clay", "color": "#2a2f3a" },
"body": { "preset": "glossy_plastic", "color": "#f2c230" },
"glass": { "preset": "glass" }
},
"nodes": {
"floor": {
"mesh": {
"geometry": { "plane": { "size": [30, 30] } },
"material": "floor"
},
"transform": { "rotation": [-90, 0, 0] }
},
"car": {
"transform": { "position": [0, 0.5, 0], "rotation": [0, -30, 0] },
"mesh": {
"geometry": { "rounded_box": { "size": [2, 0.7, 4], "radius": 0.15 } },
"material": "body"
}
},
"cab": {
"parent": "car",
"transform": { "position": [0, 0.6, -0.2] },
"mesh": {
"geometry": { "rounded_box": { "size": [1.7, 0.6, 2], "radius": 0.2 } },
"material": "glass"
}
},
"wheels": {
"parent": "car",
"transform": { "position": [0, -0.25, 0], "rotation": [0, 0, 90] },
"mesh": {
"geometry": { "cylinder": { "radius": 0.35, "height": 2.1 } },
"material": "preset:matte_clay",
"instances": {
"list": [{ "position": [0, 0, 1.3] }, { "position": [0, 0, -1.3] }]
}
},
"color": "#111318"
}
}
}apps/docs/examples/nodes.json · render it with motion-sdk render apps/docs/examples/nodes.json -t 1 -o nodes.pngHierarchy
Set parent to another node's id. A child's transform is relative to its parent, so moving car moves cab and wheels with it. A node with no mesh, text or particles is a group: use one to move several nodes together. A node has at most one of those three.
Transforms
position is in world units, rotation in Euler degrees applied X, then Y, then Z, and scale multiplies the geometry. Rotate twice in a row, like tilt then spin, with two nested nodes.
Tint, Opacity and Visibility
colortints one node without declaring a new material. Copies made from one prefab can each have their own.opacityfades a node and its children. Animate it with anopacitytrack.visible: falsehides a node and its children.interactive: truemakes a node pickable for hover and click triggers.
The other node fields are documented with their features: follow, show_when, use, params, with and repeat, body, shatter, joint, cloth and soft.
HTML layouts
"html": {"src": "<div style='padding:24px;background:#0f172a'>Hello</div>", "width": 4} lays out HTML and CSS with Flexbox, Grid and Block, then turns each visible box into a 3D panel and each run of text into a text node. Elements with an id become child nodes <host>#<id>, so you can keyframe card#cta. Set thickness with data-depth, and a material with data-material.
API Reference
Node
A node in the scene graph.
Nodes live in a flat map keyed by id (/nodes/<id>), which keeps JSON patches short and stable. Hierarchy is expressed with parent. A node with none of mesh, text or particles is a plain group/empty.
| Property | Type | Default | Description |
|---|---|---|---|
| body | Body | — | Make it a rigid body: it falls, tumbles and collides (see physics). |
| clip | Clip | — | 2D mask: only the part of this node and its descendants inside this rectangle (in the node's XY plane, moving with it) is drawn. Slide content in from outside it for reveals. The nearest clip wins. |
| cloth | Cloth | — | Simulated cloth sheet on this node (see Cloth). |
| color | Color | — | Replaces the material's base color for this node only, so one material can serve many differently colored nodes (animated color tracks still win). Per-instance colors multiply it. |
| constrain | Constraint[] | — | Constraints applied in order after the keyed pose and IK: attach, aim, limit (see Constraint). Authoring builds. |
| flood | Flood | — | Simulated water over an area around this node (see Flood). |
| follow | Follow | — | Ride a path from paths (adds to transform.position; turns to face along the path). |
| html | Html | — | An HTML + CSS Flexbox/Grid layout expanded into 3D rounded_box and text nodes <id>#<element id> under this one (see Html). |
| ik | Ik | — | Inverse kinematics: turn the bones above this node so it reaches a goal (see Ik). Authoring builds. |
| interactive | boolean | — | Whether pointer events (hover/click triggers) hit this node. |
| joint | Joint | — | Articulated XPBD joint connecting this node's body to another rigid body (see Joint). |
| layer | integer (-1000 to 1000) | — | 2D stacking order: each layer sits 0.01 world units nearer the viewer (+Z), so with an orthographic camera looking down -Z higher layers draw on top. Inherited by children (a group's layer lifts everything in it). Authoring builds only (the browser loads the authoring bundle for it). |
| mesh | Mesh | — | Makes the node a mesh. |
| opacity | number (0 to 1) | — | Node opacity multiplier, 0..1 (inherited by children). |
| overlay | boolean | — | Keep this node and its children out of post.stylise and post.rays: drawn crisp on top of the stylised frame (captions, titles, UI). Overlays always draw over the scene. |
| params | object | — | Prefab parameter values for this placement (may be = expressions using i, n, ix, iy, iz when repeated). |
| parent | string | — | Id of the parent node. Omit for root nodes. |
| particles | Particles | — | Makes the node a particle emitter. |
| plant | [x, y][] | — | Foot contacts: [start, end] seconds windows in which this goal's keyed position holds still (the value at start), so a foot solved onto it can't slide. Root-level nodes only (their position is their world position). Applied to the main timeline when the scene expands. Authoring builds. |
| repeat | Repeat | — | Stamp out copies of this node (and its prefab) as <id>.<k>. |
| shatter | Shatter | — | Break this box into chunks at a given time (see Shatter). |
| show_when | ShowWhen | — | Visible only while a signal shows one of these states. |
| soft | SoftTissue | — | PhysHand-style layered soft tissue pad on this node (see SoftTissue). |
| splats | Splats | — | A cloud of Gaussian splats: signed-distance shapes sampled into soft discs, and/or a .ply / .splat file (see Splats). Opt-in: native tools and the splat browser bundles draw it. |
| svg | Svg | — | An SVG drawing, expanded into shape nodes <id>#<svg id> under this one (see Svg). In the browser it loads the authoring bundle (or the WebGL2 fallback); motion-sdk expand turns it into plain shapes. |
| text | Text | — | Makes the node 3D text. |
| transform | Transform | {"position":[0,0,0],"rotation":[0,0,0],"scale":[1,1,1]} | Position, rotation (Euler degrees) and scale relative to the parent. |
| use | string | — | Place a prefab here: its nodes become children of this node. |
| visible | boolean | — | Hide the node and its children when false. |
| with | object | — | Per-template overrides, keyed by the prefab's node ids and merged into those templates ({"body": {"visible": false}}). |
Transform
Position, rotation (Euler XYZ, degrees) and scale.
| Property | Type | Default | Description |
|---|---|---|---|
| position | [x, y, z] | [0,0,0] | Position [x, y, z] relative to the parent. |
| rotation | [x, y, z] | [0,0,0] | Euler angles in degrees, applied X then Y then Z. |
| scale | [x, y, z] | [1,1,1] | Scale [x, y, z]. |
Canvas
Logical canvas used for interactive/web playback. Export targets may override the size.
| Property | Type | Default | Description |
|---|---|---|---|
| fps | integer (1 to 120) | 30 | Frames per second for playback and export. |
| height | integer (16 to 8192) | 1080 | Height in pixels. |
| width | integer (16 to 8192) | 1920 | Width in pixels. |
Meta
Human-facing metadata.
| Property | Type | Default | Description |
|---|---|---|---|
| description | string | "" | What the scene shows. |
| title | string | "" | The scene's title. |
Html
An HTML + CSS layout expanded into 3D rounded_box and text nodes.
| Property | Type | Default | Description |
|---|---|---|---|
| anchor | [x, y] | — | Origin point of the laid-out root box as fractions from its top-left corner (default [0.5, 0.5], centred). |
| depth | number | — | Default 3D slab thickness in world units for elements with a visible background or border (default 0.06). Override per element with data-depth. |
| layer_step | number | — | Default Z lift in world units added for each nested container with a visible surface, so child cards/buttons protrude cleanly in front of their parent without z-fighting (default 0.025). |
| material | string | — | Default base material for generated 3D panels (e.g. "preset:matte" or a named material in scene.materials). Default: generated satin PBR material (roughness: 0.38, metalness: 0.05). |
| src* | string | required | HTML markup (with optional <style>...</style>), or a file path relative to the scene (the CLI inlines file paths automatically). |
| viewport | [x, y] | — | CSS layout viewport [width, height] in pixels. Default: [800, 0] where height 0 means auto-size vertically to fit content. |
| width | number | — | Width in world units of the root layout viewport (height follows the laid-out aspect ratio). Default: viewport[0] * 0.005 (4.0 units for an 800 px viewport). |