# p6_collapse
COLLAPSE (t = 240-270): a crawler crane swings a forged wrecking ball into
a five-storey brick-and-steel building at dusk.
The building is real construction — I-beam columns, concrete floor slabs,
brick spandrels/piers/panels, steel window frames with pre-split glass
panes — every piece a frozen kinematic rigid body. The score's `impact`
cues unfreeze a region around each ball strike (`Physics.setBodyType` +
a radial impulse), so the structure crumbles where the ball chews through
it; off-beat cues aftershock the column above the last hit, and the final
cue drops everything still standing.
Surfaces run the `col_*` shader stack (`preseed/shaders/`), materials in
`preseed/collapse/`: sky, ground (painted per-frame shadows), brick,
concrete, steel (beams/crane/ball/chain via per-material props), glass and
one GPU dust point cloud whose four `burst*` slots make the impact plumes.
The crane is one merged lattice-boom mesh that slews so its boom tip rides
the kinematic rope anchor; the hoist cable is a stretched cylinder strung
tip-to-ball each frame over a run of torus chain links and a shackle.
# p_tesla — DISCHARGE
Part 11 of the Raising Preseed demo (t = 270–295): a tesla coil discharging
inside an industrial high-voltage test hall. `preseed.teslahall` builds the
environment — steel trusses, gantry crane, transformer bank, capacitor rack,
Marx column, catwalk, cable runs, high-bay lamps, warning beacons, hazard
markings — with procedural `tes_floor` / `tes_wall` shaders whose analytic
lights pulse with every discharge, hemisphere ambient with corner and
contact occlusion, and moonlight pooling in from the high windows. The
toroid and mast electrodes wear the `tes_metal` shader: procedural hall
reflections (floor bounce, window band, roughness-widened lamp glints)
scaled by the analytic EnvBRDF so bare metal reads as metal at night.
Sixteen arcs share one GPU mesh whose vertices the `ptes_arcs` compute pass
rewrites every frame: two standing power arcs into the grounded strike
masts, four strikers that leader-grow to the hall's grounded equipment
(gantry hook, junction box, Marx electrode, railing, capacitor bus) and
hold as re-striking power arcs, two dim violet air streamers, two ground
crawlers, four toroid brush-corona fans and two upward connecting leaders
rising from the target a striker approaches — plus twenty re-rolling
branches. Channel paths are piecewise-linear value noise FROZEN per strike:
a dart clock (50–100 ms) re-rolls fine detail and the branch set while the
coarse trunk persists and drifts buoyantly upward (banjo), and the whole
channel snaps — nothing eases. The `tes_plasma` shader (additive) layers a
white-hot core, present only on attached power arcs, inside a violet
nitrogen-emission sheath that carries all the hue; growing leaders reveal
their frozen path behind a bright ionization head.
The CPU side (`init.luau`) runs the per-arc phase machines (off → grow →
attach → hold), surges random arcs on the score's stab cues, throws a
white-hot spark burst plus slow molten embers at every contact, sprays a
fine violet corona off the toroid rim, chases the lingering impact light,
browns out the high-bay lamps after big strikes, pulses the red beacons and
feeds flash/impact state into the hall and metal shaders. Static topology
comes from the one-shot `ptes_init` pass; per-frame `renderer.mesh.update`
copies the fresh vertices into the drawn slab region (the p_sph scatter
pattern).
# director
A module script.
# p_endcard
The film's closing part (10 s): ORIGOZERO in large world-space type floating
in a dark void, `origozero.ai` in accent blue and the BRING YOUR OWN AGENT
tag beneath it, one slow dolly-in. Runs in silence after the score resolves;
the film fades out on it.
# preseed.captions
Investor title cards for the Raising Preseed film. A single zui screen driven
by the director clock from the scene entrypoint: `tick(t)` picks the card
whose window contains `t`, fades it on a 0.6 s smoothstep envelope, and
unmounts the screen between cards. Lower-third cards sit on a translucent
backing strip for legibility over bright scenes; the opener, the
"Bring Your Own Agent" hero card, the pre-seed ask, and the closing
`origozero.ai` end card render bare and centered — the end card holds through
the film's final fade. Typeset in Berkeley Mono.
`teardown()` hides the screen when the scene unloads.
# p_surf — CLOUDSURF
Dawn breaks over an endless cloud sea and an ink-silhouette rider carves it
to the roller: threading score rings, popping airs on the snare-drag fills,
and outrunning cumulonimbus cells whose bolts hit on the hoover stabs.
The sea is the `surf_cloud` reactive field — a scrolling noise deck displaced
in the vertex stage and mirrored bit-exactly on the CPU, which decides where
the board rides; a 24-slot touch-point ring carves a healing wake behind the
carve, and touchdowns stamp deep splashes into it. The `surf_sky` dome is a
photographic dawn: soft sun with a layered halo over a perspective-projected
strata deck. `surf_puff` clusters fill the world — near cumulus towers, a
hazed horizon bank, translucent wisps streaming past the camera as the speed
cue, and the storm cells themselves, which flicker from inside before each
strike.
Choreography is entirely closed-form in part-local t — speed integral,
organic three-sine carve weave, jump arcs, landing pulses — so director
seeks land exactly and every beat stays on the music grid. The board is a
procedural rockered deck (built once at module scope); the rider is the
Synty character in silhouette, leaning into carves, switching to jump/land
clips around each air, its feet planted by sinking the character origin.
Five shots track the run — low chase, board-level side dolly, front
three-quarter with the first storm, the big-air hero, and a crane rise into
the handoff — with handheld micro-drift layered on top and a smoothed float
over any swell the dolly lerps through.
# remote
Transport controls for watching the demo in play mode: a compact bar in the
bottom letterbox band with previous (restarts the current part first, player
convention) / hold-resume / next / replay buttons, the current part's name
and local time, a scrub slider across the full timeline, and a time readout.
Buttons carry keyboard shortcuts — Left, Space, Right, R.
Seeking across a part boundary rebuilds the target part from scratch;
scrubbing backward within the same part keeps its live state (the sim keeps
whatever already happened — jump one part back and forward again for a
clean replay).
The scene entrypoint drives the lifecycle: `init()` at demo start, `tick()`
per frame, `handle(id, value)` from its `onCallback`, `teardown()` on stop.
# p_sph
FONTAINE demo part: a full water show on a 170x66-meter oval lake, running
real GPU SPH water (32768 particles, grid-binned over a 180x40x79m domain,
4 compute passes per substep) in a vast dusk parterre garden. A monumental
three-tier fountain island rises 14 meters at the lake's center; a
twenty-four-nozzle articulated line array runs the lake's long axis and
sixteen more articulated nozzles ring the island. The choreography sweeps a
jet packet the length of the lake, doubles it into two packets crossing
mid-lake, then opens everything into traveling height waves, a crisscross
lattice of crossing jets, and a rotating spiral — punctuated by
synchronized burst salvos riding the score — before one held breath and a
30-meter crown geyser whose fallback blooms over all three cascading
dishes. The force pass's drain pump recycles all pooled water back out of
the nozzles with fresh tint, so the show runs continuously from a fixed
particle budget while agitation-scaled tint diffusion blends champagne,
rosé, and pale gold where the lake churns. The island's sixteen nozzle urns
physically lean with their jets as the patterns sweep. Rendered through
`preseed.fluid`'s screen-space surface with its per-particle color path
(`psph_rpos` / `psph_rcol`); the garden around the lake is
`preseed.fountaincourt`.
# p_coldstart
The demo's opener — "COLD START" as a full-frame title sequence.
Runs first in the film. It owns no entities and its camera never shows, because
the sequence covers the frame; what it owns is the sequence clock. `enter`
starts it, `update` feeds it dt, `exit` takes it off the glass. The picture
itself lives in `preseed/coldstart`.
## Wiring it in
Put it at the head of the part list in `scenes/main.scene/entrypoint.luau`:
```lua
Director.setParts({
require("preseed.parts.p_coldstart"),
require("preseed.parts.p1_lumen"),
...
})
```
## Length
`duration` is derived, not typed in: the sequence is `Intro.DURATION` sequence
seconds long and runs at `Intro.SPEED` against wall time, so the part lasts
`DURATION / SPEED` — 29 seconds at the current settings. Changing `SPEED` in
`preseed/coldstart` changes this part's length with it.
## The frame it needs
The sequence is composed to the full frame and is opaque. `enter` therefore
clears the film's letterbox (`Fx.setBars(0)`) and flattens the grade — the bars
crop the type, and the vignette darkens its corners. Both are restored by
whichever part follows, since every part sets its own.
# p_tendril — CRAWLER
A ferrofluid tentacle monster hauling itself through the crystal-lit cave
(cavern geometry from `preseed.tendril.cave`). The whole creature is ONE
GPU-scattered runtime mesh driven by `preseed.parts.ten_scatter`:
- a heaving black body blob with animated magnetic spikes and blinking
eye-spots (ferrofluid-on-magnet look)
- ten continuous tapered tentacle tubes, each a cubic bezier whose control
points the part's Luau state machine writes into a params buffer every
frame — tentacles snap out and grip walls, floor and ceiling; two
"feelers" probe toward the camera
- goo droplets that cling to tentacle undersides, stretch and fall
Shading is the `ten_goo` ferrofluid surface (`ten_goo_mat`), with glossy
black floor puddles (`ten_goo_puddle`) round-robined along the trail and at
floor-grip points. A red underglow point light throws moving tentacle
shadows up the cave walls, and crystal clusters ring with the music.
The camera runs a cut-based cinematic shot list (stalk / track / static
pass-by / top-down / final confrontation) with handheld jitter. In the last
chamber the creature stops, rears up, fans its tentacles and opens every
eye while the camera pushes in.
# p_snow
<!-- zero:scaffolded-readme -->
<!-- Replace the line below with what this module provides and who
consumes it, then delete both comment lines. -->
TODO: describe this module.
# p7_ascension — ASCENSION (part 12 of 13, 35 s)
The finale. A real-time sunset over a ridged mountain valley; motes of light
rise from the dark as the camera climbs through a self-shadowed cumulus deck,
breaks out over a glowing cloud sea, and tilts up into a star-filled night for
the credits.
**This file is only the orchestrator.** Every piece of the finale lives in its
own module under `preseed/asc/`, one owner each. Edit an aspect in its own
file; this one changes only when the wiring between aspects changes.
## The aspects
| Module | Controls |
|---|---|
| [`preseed.asc.asc_sky`](../../asc/asc_sky.module) | Sky dome, sun + ambient lights, the ELEV sunset curve |
| [`preseed.asc.asc_stars`](../../asc/asc_stars.module) | The star field's reveal as night falls |
| [`preseed.asc.asc_terrain`](../../asc/asc_terrain.module) | Valley floor, the four parallax ridge bands, aerial haze |
| [`preseed.asc.asc_clouds`](../../asc/asc_clouds.module) | The volumetric cumulus deck: fill shader, palette, raymarch |
| [`preseed.asc.asc_shots`](../../asc/asc_shots.module) | The six-shot camera choreography, sway and buffet |
| [`preseed.asc.asc_particles`](../../asc/asc_particles.module) | Rising motes and valley mist |
| [`preseed.asc.asc_credits`](../../asc/asc_credits.module) | Dot-matrix title and the three credit cards |
| [`preseed.asc.asc_grade`](../../asc/asc_grade.module) | Bloom, tonemap, vignette, letterbox bars |
## How aspects are kept apart
No aspect requires another. Where two are coupled, the value crosses
**through this file** as an explicit argument, so two agents editing two files
cannot reach each other. There are exactly two published signals:
```
sun = asc_sky.update(...) -- { elev, nightMix, dir, skyGuid }
cam = asc_shots.update(...) -- { pos, rot, fov }
```
`sun` goes to asc_stars, asc_terrain and asc_clouds. `cam` goes to asc_clouds.
`P.duration` goes to asc_credits. That is the entire coupling surface.
Those two `update` hooks are therefore **mandatory** and run first. Every
other hook is optional: an owner can add `build` / `enter` / `update` / `exit`
to their module and the orchestrator will start calling it without being
edited.
Each aspect gets a private state table (`ctx.data.st.<key>`) and never sees
another's. Small pure helpers (`seq`, `clamp01`) are **deliberately duplicated**
into the modules that need them rather than shared: if `seq` were shared,
retuning the motes would silently change the sunset.
## Ordering that is load-bearing
- **Build:** asc_sky first — `Lighting.applySetup` creates the `sun` and
`ambient` entities it then looks up. `Geo.material` mints keys from a
monotonic counter, so the rest keep their authored order.
- **Update:** asc_sky → (stars, terrain) → asc_shots → asc_clouds. The deck
builds its inverse view-projection from this frame's camera, so the camera
must be settled first.
- **Exit:** the volume is released before the particle systems.
## The part contract
`name`, `duration = 35`, `fadeIn = 1.5`, `fadeOut = 3.0`, `shots`, and
`build` / `enter` / `update` / `exit`, consumed by `preseed.director`.
`P.shots` is re-exported from asc_shots because the director evaluates that
list itself and writes the camera *before* calling `P.update`; asc_shots then
overwrites with the swayed pose.
`ctx.center` is `{6000, 0, 0}`. The fades mean `t = 0` is black by design and
`t > 32` is mostly black — read the picture in `t ∈ [1.5, 32]`.
## Previewing
```lua
local Preview = require("preseed.preview")
return Preview.at("ASCENSION", 12) -- freeze at part-local t
```
then `capture { source = "screen" }`. Check `renderedFrom.role == "active"`:
this demo's post stack is a content render feature that runs only for the live
viewport, so an offscreen capture silently reuses a stale frame.
## Known leaks past `exit`
`exit` releases the cloud volume and the two particle systems. Deliberately
left as-is by the aspect split: `ProceduralSky.syncSunToLight = false`, the
letterbox bars, `asc_sky_mat`'s night-state, the runtime materials and meshes,
and the `Lighting.applySetup` sun/ambient/clear colour all survive into
`p_endcard`.
# p_vapor
A module script.
# p4_simulation
A module script.