# Scene

The top-level scene document and an index of every type in the schema.

A scene is one JSON object. Every top-level field is optional. An empty object `{}` is a valid, empty scene. Unknown keys are rejected, including `$schema`.

The full JSON Schema is `schema/scene.schema.json`. It's generated from the Rust types and a test keeps it current. Point your editor at it by file pattern instead of a `$schema` key.

```json title=".vscode/settings.json"
{
  "json.schemas": [
    { "fileMatch": ["*.scene.json"], "url": "./schema/scene.schema.json" }
  ]
}
```

### Scene

Declarative 3D scene + timeline + state machines + export targets for agents (Motion SDK spec v0.1)

| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `audio` | `AudioClip[]` | — | Sound on the timeline: WAV files or generated tones and beat clicks, mixed into MP4 exports. Authoring builds. |
| `camera` | `Camera` | `{"far":200,"fov":40,"near":0.1,"ortho_height":5,"position":[0,0,6],"projection":"perspective","target":[0,0,0]}` | The default camera: where it is, what it looks at, its lens and an optional move preset. Shots override it. |
| `canvas` | `Canvas` | `{"fps":30,"height":1080,"width":1920}` | Output size and frame rate for the live player and for exports that don't set their own. |
| `clips` | `map of Timeline` | `{}` | Named clips played by state machine states. |
| `environment` | `Environment` | `{"background":{"solid":"#0b0f1a"},"reflections":"studio"}` | Background, fog and the reflections environment. |
| `exports` | `map of ExportTarget` | `{}` | Named export targets (`x_square`, `slide`, ...). |
| `ground` | `Ground` | — | The floor for `plant` goals: their position keys never go below it. Authoring builds. |
| `lighting` | `Lighting` | `{"lights":{},"rig":"studio_soft","rig_intensity":1,"shadows":{"softness":1,"strength":1}}` | The light rig, custom lights and shadow settings. |
| `materials` | `map of Material` | `{}` | Named materials referenced by nodes (`"material": "<name>"`). |
| `meta` | `Meta` | — | A title and description for the scene. Ignored by the renderer. |
| `nodes` | `map of Node` | `{}` | Scene nodes keyed by id. Hierarchy via `parent`. |
| `paths` | `map of Path` | `{}` | Paths that nodes `follow` and path instances ride. |
| `physics` | `Physics` | — | Gravity and floor for rigid bodies (nodes with `body`). Physics is authoring-only: the lean player does not parse it. |
| `post` | `PostFx` | `{"bloom":0.4,"chromatic_aberration":0,"color_management":"linear","grain":0,"msaa":4,"tone_mapping":"neutral","vignette":0.2}` | Post effects: bloom, tone mapping, colour grade, depth of field, grain and more. |
| `prefabs` | `map of Prefab` | `{}` | Reusable node templates, placed with `{"use": "<prefab>"}`. |
| `seed` | `integer` | `0` | Seed for every pseudo-random effect (particles, grain, handheld drift). Same seed + same spec = same pixels. |
| `shots` | `Shot[]` | `[]` | The edit: camera setups played back to back with hard cuts. When set, shots drive the camera instead of `camera` (whose values fill anything a shot leaves out). |
| `signals` | `map of Signal` | `{}` | Cycling signals (traffic lights) for stop lines and `show_when`. |
| `state_machines` | `map of StateMachine` | `{}` | Interactive state machines keyed by name (all run in parallel). |
| `textures` | `map of Texture` | `{}` | Named images that materials map (`"map": {"texture": "<name>"}`). |
| `timeline` | `Timeline` | `{"autoplay":true,"duration":5,"loop":"loop","tracks":{}}` | The main timeline (autoplays; loops by default). |
| `version` | `string` | `"0.1"` | Spec version this document targets. |

## Color

### Color

sRGB hex color: #rgb, #rrggbb or #rrggbbaa.

Type: `string`

## All Types

| Type | Description |
| --- | --- |
| [`Aim`](/docs/features/rigging#aim) | Turn in the screen plane so `axis` points at `at` (Blender's Damped Track). |
| [`AimAxis`](/docs/features/rigging#aimaxis) | The local axis an `aim` points. |
| [`AnimValue`](/docs/features/timeline#animvalue) | A keyframe value: number, `[x,y,z]` or hex color. |
| [`Attach`](/docs/features/rigging#attach) | Move with `to` as if parented to it in the rest pose; the node's own keyed motion still plays on top. |
| [`AudioClip`](/docs/features/timeline#audioclip) | One sound placed on the timeline. |
| [`Background`](/docs/features/sky#background) | Scene background. |
| [`Beats`](/docs/features/timeline#beats) | The beat grid music-synced tracks snap to: a steady tempo, or the beat times of a real track (e.g. |
| [`Bend`](/docs/features/rigging#bend) | Bend direction of a 2D chain at its joints. |
| [`Blend`](/docs/features/materials#blend) | Blend mode of a material. |
| [`Body`](/docs/features/physics#body) | Makes a node a rigid body. |
| [`BodyShape`](/docs/features/physics#bodyshape) | An explicit collision shape, in the node's local units (before scale). |
| [`BodyType`](/docs/features/physics#bodytype) | How a body moves. |
| [`Camera`](/docs/features/camera#camera) | The scene camera. |
| [`CameraMove`](/docs/features/camera#cameramove) | A parametric camera move evaluated deterministically over time. |
| [`CameraMovePreset`](/docs/features/camera#cameramovepreset) | Tuned cinematic camera moves. |
| [`Canvas`](/docs/features/nodes#canvas) | Logical canvas used for interactive/web playback. |
| [`Caption`](/docs/features/export#caption) | A timed caption. |
| [`CaptionPosition`](/docs/features/export#captionposition) |  |
| [`CaptionStyle`](/docs/features/export#captionstyle) |  |
| [`Clip`](/docs/features/motion-graphics#clip) | A rectangular (optionally rounded) 2D clip region. |
| [`Cloth`](/docs/features/physics#cloth) | Simulated cloth sheet lying in the node's local XY plane (like `plane`, rotate `[-90, 0, 0]` to lay flat for a drape or tablecloth). |
| [`ClothPin`](/docs/features/physics#clothpin) | Pins vertices of a [`Cloth`] sheet in place, or attaches them to another node so the cloth moves with an animated/kinematic carrier (e.g. |
| [`ClothPinEdge`](/docs/features/physics#clothpinedge) | Edge or corner shorthand for pinning vertices of a [`Cloth`] sheet. |
| [`ClothPreset`](/docs/features/physics#clothpreset) | Material preset for a [`Cloth`] node: tuned defaults for stretch, bending, mass, damping and wind drag. |
| [`ClothWind`](/docs/features/physics#clothwind) | Wind field acting on a [`Cloth`] sheet via aerodynamic drag and lift. |
| [`Clouds`](/docs/features/sky#clouds) | Procedural cloud layers, seeded by the scene seed. |
| [`Color`](/docs/reference/scene#color) | sRGB hex color: #rgb, #rrggbb or #rrggbbaa. |
| [`ColorManagement`](/docs/features/post#colormanagement) |  |
| [`Constraint`](/docs/features/rigging#constraint) | One constraint on a node; a node's `constrain` list applies in order, after its parents' and after any IK that moves it. |
| [`Counter`](/docs/features/motion-graphics#counter) | A number counting from `from` to `to`. |
| [`Curve`](/docs/features/timeline#curve) | Interpolation between keyframes. |
| [`Dof`](/docs/features/post#dof) | Depth of field. |
| [`Easing`](/docs/features/easing#easing) | An easing curve. |
| [`Emitter`](/docs/features/particles#emitter) | Where particles spawn. |
| [`Environment`](/docs/features/sky#environment) | Background, fog and image-based lighting. |
| [`EnvironmentMap`](/docs/features/sky#environmentmap) | Built-in environment maps (no external assets, fully deterministic). |
| [`Exclusion`](/docs/features/scatter#exclusion) | A circle on the ground (`[x, z]` in the terrain's local space). |
| [`ExportFormat`](/docs/features/export#exportformat) |  |
| [`ExportPreset`](/docs/features/export#exportpreset) | Tuned output presets. |
| [`ExportTarget`](/docs/features/export#exporttarget) | One output to render. |
| [`FlatArea`](/docs/features/terrain#flatarea) | A flat region in a [`Terrain`]. |
| [`Flood`](/docs/features/water#flood) | Simulated water over an area centred on the node and aligned with world x and z: it pours in from `sources`, spills from `fill` blocks, flows downhill around static bodies and over terrain, and floats dynamic bodies (see `buoyancy`). |
| [`FloodEdges`](/docs/features/water#floodedges) | The border of a [`Flood`]. |
| [`FloodFill`](/docs/features/water#floodfill) | A box of standing water at the start of a [`Flood`], in the node's local x/z. |
| [`FloodSource`](/docs/features/water#floodsource) | Water pouring into a [`Flood`] over a disc. |
| [`Fog`](/docs/features/fog#fog) | Squared-exponential distance fog that starts at the camera's target distance: the subject stays crisp while the background and horizon fade into `color`. |
| [`Follow`](/docs/features/paths#follow) | Ride a path. |
| [`Font`](/docs/features/text#font) | Bundled, license-clean fonts (deterministic glyph output). |
| [`Framing`](/docs/features/export#framing) | Aspect-ratio adaptation. |
| [`Geometry`](/docs/features/geometry#geometry) | Built-in procedural geometry. |
| [`Grade`](/docs/features/post#grade) | A colour grade, applied after tone mapping. |
| [`Ground`](/docs/features/rigging#ground) | The floor for planted goals: `plant` goals' position keys never go below `y`. |
| [`HorizonGlow`](/docs/features/sky#horizonglow) | Emissive light hugging the horizon, brightest at `azimuth`. |
| [`Html`](/docs/features/nodes#html) | An HTML + CSS layout expanded into 3D `rounded_box` and `text` nodes. |
| [`Ik`](/docs/features/rigging#ik) | Inverse kinematics: turn the bones above this node (the chain's end, e.g. |
| [`Instance`](/docs/features/instancing#instance) | One instance's transform (and optional tint). |
| [`Instances`](/docs/features/instancing#instances) | Copies of a mesh, drawn with a single instanced draw call. |
| [`Joint`](/docs/features/physics#joint) | Articulated rigid-body joint constraint (XPBD) connecting this node's `body` to `parent`'s `body`. |
| [`JointCouple`](/docs/features/physics#jointcouple) | Tendon coupling: drives this joint's target angle proportionally to another joint's current flexion angle (e.g. |
| [`JointKind`](/docs/features/physics#jointkind) | Type of articulated constraint connecting two rigid bodies. |
| [`Keep`](/docs/features/rigging#keep) | What `attach` keeps from the rest pose. |
| [`Keyframe`](/docs/features/timeline#keyframe) | A keyframe: a value at time `t` (seconds). |
| [`Light`](/docs/features/lighting#light) | A single light. |
| [`LightRig`](/docs/features/lighting#lightrig) | Curated light setups tuned to look good with the material presets. |
| [`Lighting`](/docs/features/lighting#lighting) | Scene lighting: start from a `rig` and add or override named `lights`. |
| [`Limit`](/docs/features/rigging#limit) | Keep the node's in-plane rotation relative to its parent within `rotation` (applied after IK, so a solved knee can't bend backwards). |
| [`LoopMode`](/docs/features/timeline#loopmode) |  |
| [`Material`](/docs/features/materials#material) | A physically based material. |
| [`MaterialPreset`](/docs/features/materials#materialpreset) | Curated, tuned material looks. |
| [`Mesh`](/docs/features/geometry#mesh) | A primitive mesh with a material. |
| [`Meta`](/docs/features/nodes#meta) | Human-facing metadata. |
| [`Model`](/docs/features/models#model) | Triangles from a glTF file, with its node transforms applied. |
| [`ModelAnimation`](/docs/features/models#modelanimation) | Which glTF clip a model plays, and how fast. |
| [`MotionBlur`](/docs/features/export#motionblur) | Motion blur by averaging subframes across the shutter interval. |
| [`Node`](/docs/features/nodes#node) | A node in the scene graph. |
| [`Outline`](/docs/features/materials#outline) | A silhouette outline (inverted hull), in world units. |
| [`ParticlePreset`](/docs/features/particles#particlepreset) |  |
| [`Particles`](/docs/features/particles#particles) | A deterministic (seeded) GPU particle system. |
| [`Path`](/docs/features/paths#path) | A path shape. |
| [`PathEnd`](/docs/features/paths#pathend) | What a follower does at the end of an open path. |
| [`PathInstances`](/docs/features/paths#pathinstances) | Copies spread along a path, each riding it (crowds, traffic). |
| [`Physics`](/docs/features/physics#physics) | World settings for every `body`. |
| [`PixelArt`](/docs/features/pixel-art#pixelart) | Pixel-art look: the scene is drawn at a low resolution (`size` screen pixels per art pixel) and every art pixel is drawn as a crisp square. |
| [`PostFx`](/docs/features/post#postfx) | Post-processing. |
| [`Prefab`](/docs/features/prefabs#prefab) | A reusable group of nodes with parameters. |
| [`Projection`](/docs/features/camera#projection) |  |
| [`Property`](/docs/features/timeline#property) | Animatable properties. |
| [`PropertySet`](/docs/features/state-machines#propertyset) | Pin a property of a node (or `$camera`) to a value. |
| [`Pulse`](/docs/features/timeline#pulse) | A value that kicks to `to` on beats and falls back to `from`. |
| [`Quality`](/docs/features/export#quality) |  |
| [`Rays`](/docs/features/stylise#rays) | Light shafts (god rays) streaming from a point on screen through the bright parts of the frame. |
| [`Repeat`](/docs/features/prefabs#repeat) | Copies of a node or prefab placement. |
| [`SafeArea`](/docs/features/export#safearea) | Fractions of the frame (0..0.5) kept clear on each side, e.g. |
| [`Scene`](/docs/reference/scene#scene) | Declarative 3D scene + timeline + state machines + export targets for agents (Motion SDK spec v0.1) |
| [`Scramble`](/docs/features/motion-graphics#scramble) | Random characters resolving into `content`. |
| [`ScrubSource`](/docs/features/state-machines#scrubsource) | Input that scrubs a clip (0..1 maps to the clip's 0..duration). |
| [`Shading`](/docs/features/materials#shading) | How a material responds to light. |
| [`Shadows`](/docs/features/lighting#shadows) | Shadow softness and darkness. |
| [`Shape`](/docs/features/motion-graphics#shape) | A 2D vector shape (see the module docs). |
| [`Shatter`](/docs/features/physics#shatter) | Break a box into a grid of chunks that burst apart at `start` and fall as rigid bodies (a wall smashed, a crate blown open). |
| [`Shot`](/docs/features/shots#shot) | One camera setup in the edit. |
| [`ShotCamera`](/docs/features/shots#shotcamera) | Camera settings for a shot. |
| [`ShotTransition`](/docs/features/motion-graphics#shottransition) | A full-frame transition over a cut. |
| [`ShowWhen`](/docs/features/paths#showwhen) | Show a node only while a signal is in one of `states` (traffic light lamps). |
| [`Signal`](/docs/features/paths#signal) | A cycling signal such as a traffic light. |
| [`SignalPhase`](/docs/features/paths#signalphase) | One step of a signal cycle. |
| [`SignalState`](/docs/features/paths#signalstate) | What a signal currently shows. |
| [`Skin`](/docs/features/models#skin) | A procedural rig. |
| [`Sky`](/docs/features/sky#sky) | Procedural sky. |
| [`SoftPreset`](/docs/features/physics#softpreset) | Material preset for a [`SoftTissue`] pad (PhysHand-style skin-flesh-bone XPBD). |
| [`SoftTissue`](/docs/features/physics#softtissue) | PhysHand-style layered skin–flesh–bone XPBD soft tissue pad attached to a node (typically a phalanx rigid body or kinematic bone). |
| [`SplatLamp`](/docs/features/splats#splatlamp) | A point light baked into splat colours. |
| [`SplatLight`](/docs/features/splats#splatlight) | Light baked into splat colours. |
| [`SplatMesh`](/docs/features/splats#splatmesh) | A glTF/GLB model whose surface is sampled into splats. |
| [`SplatPart`](/docs/features/splats#splatpart) | Look of one part of a [`SplatMesh`]. |
| [`SplatSdf`](/docs/features/splats#splatsdf) | A signed-distance primitive, centred on the shape's position. |
| [`SplatShape`](/docs/features/splats#splatshape) | One signed-distance shape of a splat cloud. |
| [`Splats`](/docs/features/splats#splats) | A node's cloud of Gaussian splats. |
| [`Spring`](/docs/features/easing#spring) | Damped spring parameters. |
| [`State`](/docs/features/state-machines#state) |  |
| [`StateMachine`](/docs/features/state-machines#statemachine) |  |
| [`Stop`](/docs/features/paths#stop) | A stop line on a path, honored while its signal is not `go`. |
| [`Stylise`](/docs/features/stylise#stylise) | Hand-drawn look applied to the whole frame after tone mapping. |
| [`Sun`](/docs/features/sky#sun) | The sun on the sky dome. |
| [`Surface`](/docs/features/materials#surface) | Procedural surface detail on top of a PBR material. |
| [`SurfacePattern`](/docs/features/materials#surfacepattern) | Built-in procedural patterns. |
| [`Svg`](/docs/features/svg#svg) | An SVG drawing expanded into 2D shape nodes (see the module docs). |
| [`SvgBone`](/docs/features/svg#svgbone) | How one SVG part moves (see [`Svg::bones`]). |
| [`Swap`](/docs/features/motion-graphics#swap) | Whole strings shown one after another. |
| [`Terrain`](/docs/features/terrain#terrain) | A noise heightfield on the XZ plane, centred on the node. |
| [`TerrainScatter`](/docs/features/scatter#terrainscatter) | Seeded scatter on a terrain node (see [`Instances::OnTerrain`]). |
| [`Text`](/docs/features/text#text) | Extrudable 3D (or flat) text using bundled fonts. |
| [`TextAlign`](/docs/features/text#textalign) |  |
| [`TextAnimation`](/docs/features/text#textanimation) | Per-glyph entrance animations. |
| [`TextAnimationPreset`](/docs/features/text#textanimationpreset) |  |
| [`TextDynamic`](/docs/features/motion-graphics#textdynamic) | How a text node's content changes over time (overrides `content` while it plays; `content` is still the layout used for sizing). |
| [`TextStroke`](/docs/features/text#textstroke) | A solid stroke around flat text. |
| [`Texture`](/docs/features/textures#texture) | An image the scene loads once and materials map by name. |
| [`TextureMap`](/docs/features/textures#texturemap) | Where a texture lands on a surface: `uv' = rotate(uv * repeat) + offset`. |
| [`Timeline`](/docs/features/timeline#timeline) | A timeline of keyframed property tracks. |
| [`ToneMapping`](/docs/features/post#tonemapping) |  |
| [`Track`](/docs/features/timeline#track) | Animates one property of one target over time. |
| [`Transform`](/docs/features/nodes#transform) | Position, rotation (Euler XYZ, degrees) and scale. |
| [`Transition`](/docs/features/state-machines#transition) |  |
| [`Trigger`](/docs/features/state-machines#trigger) | What fires a transition. |
| [`Water`](/docs/features/water#water) | Waves and reflections for a water (or wet, mirror-like) surface. |
| [`Wiggle`](/docs/features/timeline#wiggle) | Noise added to a track's value. |
