# Advanced Scenes, 3D & Effects

Beyond charts and generative art, ChainRender has a deep **scene system** for 3D, animated, interactive, and
post-processed visuals — all with an on-chain floor. This page surveys the advanced capabilities. They're powerful
but specialized; most apps won't need them, but they're there when you do.

## SceneIR: the scene format

ChainRender scenes are described in a versioned **SceneIR** (scene intermediate representation) — a declarative,
on-chain format that has evolved through several capability layers, all in the built `SceneFormat`:

- **Motion** — parameters driven by TIME (animation) declaratively, not by a script loop.
- **Interaction** — bounded affordances that map INPUT → a parameter (a slider that rotates a model, a hover that
  highlights) — interactive scenes without arbitrary code.
- **State / generativity** — scenes that carry state and generate content deterministically.
- **Material IR** — procedural surface materials (how a surface looks: color, roughness, pattern) as data.
- **Skeleton IR** — skeletal posing/skinning for SDF forms (the "rig a character" answer, on-chain).
- **Spatial 3D** — components situated in 3D space (composition-v2 spatial placement).
- **Anisotropic primitives** — direction-dependent shapes for richer geometry.

Every scene has a **poster floor**: a complete, bit-exact, fully on-chain render (Grade A). The richer, animated,
or GPU-accelerated version is an *enhancement* over that floor and fails closed to it — see **[The Floor](../concepts/the-floor.md)**.

## SDF scenes & point clouds

- **SDF (signed-distance-field) scenes** render 2D/3D geometry from mathematical distance fields — an on-chain
  poster floor plus an optional GPU ray-march enhancement.
- **Point clouds** render point-based scenes with the same floor + enhancement model.

Both are declarative (math and data, not a program), so they're analyzable and Grade A at the floor.

## The effects library (post-processing)

The **`EffectPresetRegistry`** provides a library of post-processing effects — CRT, glass, vignette, scanlines,
grain, and more — applied as an effect *stack* over a rendered scene. Effects are:
- **Content-addressed presets** — reusable, referenced by hash.
- **Floored** — each effect has an SVG-filter floor, so the effect applies on-chain (not only as a GPU shader).
- **Composable** — stack multiple effects; the stack is data.

## Fullscreen presentation mode

Scenes support a **fullscreen presentation mode** with adaptive resolution — a scene can render at a higher
resolution when shown fullscreen, scaling its detail to the viewport, while keeping the same on-chain floor.

## The on-chain compositor

The **`CompositionRouter`** is an on-chain compositor: it composes multiple components/scenes into one output via
**sockets** — named slots a child component plugs into. This is how spatial compositions and layered scenes are
assembled on-chain, generically.

## When to use these

Most apps use the simpler primitives (charts, tables, generative art, identicons). Reach for the advanced scene
system when you're building genuinely 3D, animated, interactive, or cinematically-styled on-chain experiences — an
animated identity sigil, a 3D data visualization, a generative art piece with materials and motion. The floor
guarantee means even these stay trustless: the rich version enhances a complete on-chain floor.

## Related
- **[Visual & Media Capabilities](../concepts/visual-media.md)** — the full visual surface.
- **[Rich Media: p5.js & three.js](../concepts/rich-media-p5-three.md)** — client-side scene libraries over the floor.
- **[The Floor](../concepts/the-floor.md)** — why enhancements never compromise trustlessness.
