Animated story shorts (three.js + Remotion)
Setup
- Project: unzip
project-starter/from this kit somewhere with plenty of disk space, then runnpm installandpython3 -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt. Run every command from the project folder. - Run
source env.shfirst in every shell. It activates the Python venv and points Remotion's temp folder at../remotion-tmp(setREMOTION_TMPto use another big drive). Where this skill says<big drive>, use that folder. templates/andreferences/live beside this file.- Smoke test:
npx remotion render src/index.ts StarterTest out/_startertest.mp4 --scale 0.5(about 12 s). - Kenney CC0 models (optional, for the classic bridge look) go in
public/bridge/kenney/(bash scripts/import-kenney.sh <folder>). Missing models are skipped without failing the render. - Poly Haven CC0 textures, models and HDRIs (the lit-world look) are fetched with
python scripts/polyhaven.py. - Caption font: put a heavy rounded font at
public/captions/caption.ttf(for example a free OFL font such as Nunito Black or Baloo). No font is bundled. - Flow starter:
src/videos/_starter/holds the tested flow-camera code (camera keys and carriers, dissolve layering, motion blur, per-flight lighting) and a README on starting a short from it.
Worked examples in templates/:
templates/lit/: Hacker Gold, the lit-world look (the current default).templates/bridge/: The Bridge That Fell for a Song, the classic two-tone ink look (67 s, the 1831 Broughton bridge and 74 soldiers marching in step), cut in the hard-cuts grammar.
Originality rules:
- Story, characters and voice are always your own. Never copy another channel's scripts, characters or shots.
- Reference frames you collect to match a look are private study material. Never upload, publish or send them.
Default rules (edit these to taste):
- Burned-in captions on every short with
templates/captions/CaptionLayer.tsx(bold rounded white, the cast's plum ink as a thick outline, the spoken word in yellow #ffe330, 1-3 words with a pop-in, at y = 1180/1920 clear of the platform UI). No other on-screen labels. - Pacing: a new picture every 1-2 s, delivered as a move.
- Camera: flow by default (see "Camera grammar"). Hard cuts only when asked for.
- Voice: one steady tone. Jokes are researched real facts.
- Final export 2K vertical: 1440x2560,
--scale 1.3333333333333333. The final is the captioned film; render a clean copy only on request. - Use a fresh verifier agent for every look and QA check. Save after every step. Once the script is approved, build without stopping for questions.
The 2026-11 standard (read first; it overrides older values below where they differ)
These values come from measuring successful shorts in this style (Nov 2026).
Script (use these in step 2)
- 225-240 words, 60-67 s, 3.5-3.8 words/s. Voice starts on frame 1. The film ends on the last word.
- Hook: "He [did one odd physical thing]." No year, place or reason. The reason is the mystery of the film.
- One unnamed "he", present tense after the hook, one main place.
- A doubter or rival asks the viewer's question out loud. 2-4 spoken lines per script.
- Every sentence is an action a camera can film. Words of 9+ letters stay under 3 % of the script.
- The answer comes in the last 1-3 sentences. "You see," may tease early but never starts a lecture.
- No maps, chalkboards or number text. Explain an idea with a prop inside the scene.
Camera
- Rests are part of flow: 20-35 % of frames drift slowly (0.3-2 px/f at 720p). p90 speed ≤ 40 px/f.
- While a character speaks, the camera only creeps in on the face. Fast moves are bursts between rests.
- Hard cuts are allowed again where they are clearer than a move (the reference uses 0-13 per film).
- 4-6 places per film, each used more than once. Characters fill 40-70 % of the frame height in most pictures.
Characters
- Lip sync on every spoken line: 4-5 mouth shapes, changing every 2-3 frames, timed from words.json.
- Eyes and brows change inside a line. Cloth detail and a soft inner shade on bodies. Hand props are 3D models.
World quality bar (built and proven on "Hacker Gold", 2026-11-15; see "Lit-world pipeline" below)
- No ink lines on the world. Ink stays on the characters only.
- Real texture sets with relief (colour + normal + roughness), image-based sky light, soft shadows from everything including the character cards, ambient occlusion, light shafts with dust, lamps that light their surroundings.
- Dense scatter (grass blades, pebbles, labelled crates, small props) and detailed CC0 models in place of boxes.
- Targets: mean brightness 0.38-0.45, flat pixels under 55 %, soft-gradient pixels over 30 % (measured as in the gap report).
Mix: -14 LUFS integrated.
Script approval: the hook decides the short. Dramatise freely around a true core; say in one line what is not accurate and let the user choose. Any script change after approval goes back to the user BEFORE the voice is generated.
Lit-world pipeline (the default since Hacker Gold; replaces steps 5-7 and the two-tone / ink look below)
Worked example: templates/lit/ ("Hacker Gold").
- Assets: CC0 from Poly Haven into
public/pbrwithpython scripts/polyhaven.py tex|model|hdri <ids>(1k sets; ask the user before downloading). List what exists withhttps://api.polyhaven.com/assets?t=models|textures. Models are in metres;prop(kit, id, { h })scales to a height and puts the base centre on the origin. - Small bundles: keep a
public-<name>/folder holding a link topublic/pbrplus the caption font, and passPUBLIC_DIR=public-<name>toscripts/bridge-stills.mjs(stills, ~1 s each) andscripts/render-sandbox.mjs(video;FRAMES=a-b,CONC,INPUT_PROPS). A 67 s half-size preview takes about 2 minutes. - Look kit (
pbr/kit.ts):loadKit,pbr()texture-set materials,flat(),slab()walls and floors tiled in metres,rbox()bevelled boxes,tube()cables,lightCone(),lightShaft(),dust(). Build what the kit lacks (monitors, keyboards, cash) fromrbox+ canvas textures rather than leaving a gap. - Light:
scene.environment= an HDRI at 0.4-0.55; spot lights of 8-15 cd at 1.5-2 m for lamps (34 blew out a desk), point lights for screen glow, one directional light through a real window opening with blind slats, a hemisphere fill near 1.0 at night. Every lamp gets an emissive bulb above 1.0 (bloom) and alightCone. - Post: depth copy → N8AO (radius 0.55, intensity 2.6) → lens blur → camera motion blur → bloom → ACES tone map → vignette.
- Depth copy is required. With N8AO in the chain the composer's own depth texture reads 1.0 (far) for every pass
after the first one that draws into its buffer, so the lens blur blurs the WHOLE frame by
cInf(characters too) and the motion blur ignores distance. Put a postprocessingDepthCopyPassfirst inbefore, setlens.depthCopy = dcopy.textureand returndepth: dcopy.texturein the post chain (FlowShot hands it to the camera blur). Hacker Gold shipped soft because of this and was re-rendered. - Check it on one close-up at full size: the face ink must be as crisp as with the lens off. A blur that does not change when the focus distance changes means the depth is missing.
- With true depth a wall 1.5 m behind a close-up only gets about half of
cInf, so the composition multipliescInfby 1.6. maxLen: (id) => ...in the post chain limits the motion smear per flight (0.003 on a sideways pan along readable screens).- Card canvas resolution is 4 (2400x4000) so a head filling a 2K frame stays sharp.
- Depth copy is required. With N8AO in the chain the composer's own depth texture reads 1.0 (far) for every pass
after the first one that draws into its buffer, so the lens blur blurs the WHOLE frame by
- Characters (
pbr/card.ts):Card= a lit MeshStandardMaterial drawing with a rounded fake normal, a 0.12 self-lit floor and an invisible body-shaped shadow caster. Draw withbodyFront;backwhen the camera is behind. Lip sync: setLIP.mouth(toon.ts) fromlip(who, f)in story.ts, word starts copied from words.json. - Story as state by frame (
story.ts): each shot is a flight (DEFSrows: start, name, place, lens blur, focus, camera keys); hard cuts between shots,XFADEonly for place or time changes;rest()= a slow creep plus one punch-in half-way through any shot over 50 f. Screens, props and cast are pure functions of the frame. - Framing in 9:16 with captions at 61 %: aim close-ups about 0.15 m BELOW the head centre so faces sit near 38 % of the height. For a screen insert put the screen in the top half and a related prop (the keyboard) under it so the captions land between them. A two-shot needs the second character within 0.6 m and behind. Looking toward +z, +x is screen left. Keep lamps and hanging props off the camera-to-face line.
- Stages: look test stills on one set → script approval → voice → storyboard stills (one per shot,
scripts/sb_sheets.py) → half-size preview with sound, checked on frames pulled from the mp4 → notes → 2K final. - Measured on Hacker Gold preview v1: drift 52 % of frames, 4.3 moves per 10 s, mean brightness 0.34. Next short: more bursts (target 7 moves per 10 s) and brighter night scenes (0.38+); give characters visible hands on props.
Pipeline
- Topic and facts. Pick one surprising true story with a physical cause and effect (it should be visual), plus a simple everyday analogy that explains it.
- Write the facts with their source at the top of
SCRIPT.md.
- Write the facts with their source at the top of
- Script (~3.7 words/s, 55-70 s). Beat formula from the bridge short:
- Hook: the absurd fact in one line ("Seventy-four soldiers knocked down an iron bridge just by walking across it.").
- Setting: year, place, pride.
- Action: escalation over three or four beats, each a little bigger.
- Snap: the moment it breaks.
- Deadpan double line: "Luckily ... / Unluckily ...".
- Explanation: one physics idea through an everyday analogy (the kid on a swing).
- Consequence: the rule it created.
- Callback twist: the ending.
- Never describe on screen what the viewer already sees.
- Voice. Record or generate
voice.wav, then make its word timingswords.json(any speech-to-text with word times).- Put them in the project folder, e.g.
voice/<name>/. - Hand-fix the word timings. Everything is timed to words.json.
- Put them in the project folder, e.g.
- Shot plan in
story.ts, planned as flights (see "Camera grammar"). Start fromsrc/videos/_starter/and follow its README. It copies the flow code, then the look files from the latest delivered short (ortemplates/bridge/, the final bridge source) intosrc/videos/<name>/. Register the new composition insrc/Root.tsx.FLIGHTS: id, a/b frames (back to back), light, place, crowd mode,taustory time. One flight per place, 3-8 s.XFADE: a dissolve in motion into every flight that changes place (8 f), unless it uses another transition fromreferences/CAMERA_FLOW.md§1.FLASH_AT: a white flash after the hook (the one visible hard cut).CAMS: per-flight keys,key(f, KC(...), dur), one per voice beat, on the word.KICKS: impact flip-shakes.DOF/dofAt: lens blur per beat.FOREGROUND: near framing props, and foreground wipes.- Every visual reaction lands 0-3 frames before its word.
- Write SHOTPLAN.md with each flight, its keys on the words, and the transition to the next flight
(e.g.
F3→F4: T4 push-through the carriage window). Go through the shot-plan checklist below before building. - Read
references/CAMERA_FLOW.mdfor the transition toolkit and the camera recipe.
- World.
lights.ts: LIGHTS plus the LOOK sky/river/cloud palette per light.shade.ts: two-tone shading anduntone().build.ts: town, houses and Kenney CC0 kit props, recoloured, with sight-line culling of anything blocking a camera.paint.ts: HD Canvas2D painted textures with seams painted in as dark tints.world.ts: sky shader, fog = horizon colour, river, per-frame posing, sun camera-relative and frozen per flight (FlightLightingfrom the starter).
- Characters.
toon.ts: the Canvas2DPendrawing API, 600x1000 design canvas, soles at y = 975, bean heads, stick limbs, plum variable-width outline, face library.cast.ts: camera-facing billboards, crowds, effect cards, blinks, walk cycles. All billboards go on theNOINKlayer.cardshade.ts: cards lit by the scene light, no emissive.
- Post (the composition .tsx +
ink.ts+lensblur.ts+grade.ts+ the starter'sflow/motionblur.ts).- Composer order: ink → lens pre → lens main → camera motion blur → bloom → NEUTRAL tone map → grade (MSAA 4).
FlowShotputs the blur between yourbeforeandafterpasses. - Every pixel parameter scales with output height / 1920.
- Composer order: ink → lens pre → lens main → camera motion blur → bloom → NEUTRAL tone map → grade (MSAA 4).
- Sound (copy
templates/audio/toaudio/<name>/: timeline.py, sfx_gen.py, sfx.py, music.py, instruments.py, dsp.py, mix.py).- Event table → synthesized SFX plus an original score ducked under the voice.
- Output: mix.wav (48 kHz, exact length), stems and cues.md.
- Lock the picture's time constants before the sound is made. Any later timing change means re-running the sound.
- Look checks. Run
node scripts/bridge-stills.mjs out/<name>/x_ 100,400 0.5.- Set
BRIDGE_ENTRY=src/sandboxes/<n>/index.tsxto render a sandbox copy. - Make side-by-sides against your own private reference frames with
python scripts/sbs_sheet.py out.jpg --ours ... --ref .... - Send them to a fresh verifier agent: 1-3 images, a ≤200-word verdict.
- Motion (stills can't show it): render a low-res mp4 of each flight, run
python scripts/camspeed.py clip.mp4and look atpython scripts/vsheet.py clip.mp4 out.jpg --first <film frame> --frames 0:<n>:3.
- Set
- Captions (before the final render):
python scripts/make_captions.py <words.json> src/videos/<name>/captionData.ts <voice end s>, copytemplates/captions/CaptionLayer.tsxbeside it (+ your caption font aspublic/captions/caption.ttf) and render<Captions />last in the composition (after the flash). Show the user one sample still sheet first. inputProps{ captions: false }renders a clean copy (only when the user asks for one). - Final render.
npx remotion render src/index.ts <Comp> out/<name>/video.mp4 --codec h264 --crf 16 --scale 1.3333333333333333- Mux with
-map 0:v:0 -map 1:a:0(Remotion writes a silent audio track). - QA:
python scripts/short_qa.py final.mp4 out/<name>/qa shots.jsonchecks every frame for black, white, frozen and pop frames, plus loudness and sheets. In flow, the frozen check must find nothing. The pop check may flag dissolve frames as soft, which is expected. - Fix anything it finds, then run a deep verifier audit.
- Deliver. SendUserFile the final mp4, update memory, write notes.
Camera grammar
Flow (the default)
Every picture arrives as a move. The camera never stops, and place changes dissolve while both cameras move.
Code: src/videos/_starter/ (README). Recipe and transitions: references/CAMERA_FLOW.md.
- Flights, not shots. One flight per place, 3-8 s, about 8-14 per minute. A flight is one
FLIGHTSentry and one continuous camera. - Pacing: a new picture every 1-2 s, delivered as a move. One camera key per voice beat (every 20-45 f), landing on the word. Glides take 6-14 f for snaps and 18-30 f for reveals. A big move inside a room takes at least 24 f.
- Carriers between keys, never a hold. Every key is a
KCcarrier: it keeps dollying in (rate 0.004-0.008/f, ~0.012 on a punch word) and orbiting sideways at 4-12 px/f at 720p outdoors, at most 4 indoors. - Place changes use a dissolve in motion (
XFADE8 f, 6-10) with both cameras moving. The alternatives are the other transitions in CAMERA_FLOW.md §1: sky bridge, push-through, foreground wipe, pan-off, rail cam. - Visible hard cuts: at most 2-3 in the film: the
FLASH_ATflash cut, and maybe one wipe hidden behind an object that fills the lens. - Motion blur is always on (
CamBlur, after the lens blur, before bloom). It makes fast moves look smooth. With it, peaks of ~45 px/f at 720p are fine. Without it, keep peaks ≤ 25 px/f. - Rolls of 4-5° on comic beats. KICKS on impacts (flip sign every frame, decay over 7 f, never blurred). No hand-held float.
- Targets per minute of film: still frames < 3 %, median speed 8-15 px/f at 720p, about 7 moves per 10 s, no gap over ~2 s without a move.
Hard cuts (only when the user asks for "hard cuts")
The older fast grammar (Ice Ship, Pudding Miles, the bridge): a new shot every 1-2 s, a hard cut on the word.
- It uses the same starter files: each shot is its own flight. Inside a flight,
cutKey(f, K(...))cuts on the word. - Big jumps are cuts. Everything else is a smootherstep glide of 18-40 f, peak ≤ 25 px/f at 720p.
- Every hold pushes in 0.15-0.5 %/f, 0.6-1.2 %/f on punch words. No static hold of 4 f or more.
XFADEonly at changes of place or time. The blur stays on and turns off across every cut (blurOn).templates/bridge/story.tsis a worked example of this grammar.
Shot-plan checklist (go through it before building, and again on the preview)
Flights and pacing
- Flights are 3-8 s, back to back, one per place.
- One key per voice beat, on the word: a new picture every 1-2 s, delivered as a move.
- No
cut: trueinside a flight. At most 2-3 visible hard cuts in the whole film. - Every key is a
KCcarrier. NoKholds, no frame where the camera stops.
Camera speed
- Carrier drift is 4-12 px/f outdoors and at most 4 indoors.
- Indoors there is at most one big move per ~40 f, and each big move takes at least 24 f. Interiors ran 2-3× too fast in the test (median 38 px/f against the reference's 14).
- A close-up ↔ wide reframe goes through a dissolve in motion, not a fly across the room.
- On the preview,
camspeed.pyshows still frames < 3 %, a median of 8-15 px/f, p75 ≤ ~30 px/f, and no gap over ~2 s.
Routes
- Every glide's straight line stays ≥ 0.3 m from every prop box. Add a mid key to go over or around (the first test flew through a sofa).
- Nothing passes within ~0.5 m of the lens unless it is a recognisable foreground wipe.
Motion blur
-
CamBluris in the chain after the lens blur and before bloom, withmaxLen0.12. - The smear is measured in frame heights,
length(vel * vec2(9/16, 1)). The first draft used (9, 16), and the clamp cut every smear to almost nothing. The starter has it right, so leave it. - The previous camera is
camBase(id, f - 0.5), without kicks, placed withplaceCamera(same near/far as the render camera). - The blur is off across a hard-cut key and on the first frame of a flight entered by a cut (
blurOn). - The blur is checked on mp4 frames from ffmpeg, never on renderStill stills.
- One close-up during a fast move is checked: cards that don't write depth smear with the background behind them.
If that looks wrong, give them
depthWrite: truewithalphaTest: 0.5.
Dissolves
-
XFADEis 6-10 f (8 by default, 10-12 for a sky bridge). - Both sides move. The incoming flight's first carrier starts at
a - n/2or earlier, and the outgoing carrier keeps moving tob + n/2. - The incoming move keeps the outgoing direction (or keeps pushing in) for at least 10 f.
- Layering: the outgoing canvas is opaque underneath and the incoming one fades in on top (
layersAt). Canvas keys are "base"/"over", never the flight id.
Lighting and state between flights
- The sun is frozen per flight (
FlightLighting.sunFor), not per old shot, or the light jumps mid-move. - Every light, tone and fog value is set every frame from the flight's preset. The base canvas reuses its world after a dissolve, so anything set only once leaks into the next flight.
- Cast positions and expressions are one state by time across the whole flight, with no per-shot jumps.
- Every world prop keyed by
id ===is checked: it must be right for the whole flight. - The grade follows each canvas's own flight light, so a dissolve also cross-fades the grade.
QA
-
short_qa.pyfinds no frozen frames. Soft frames flagged inside dissolves are expected.
Final look values (bridge after 4 verifier rounds; all in templates/bridge/)
The look lives in these values (copied with the look files into every new short, see the starter README); the story lives in story.ts / build.ts layout / cast.ts roles. Verifier scores at the end: colour day 7, golden 5-6, lighting 5-6, ink 6, textures 5-6, characters 7, depth 6-7, composition 6-7 (from 5/3/4/5/4/7/4/6 at the start).
- Light presets (
lights.ts, sun camera-relative and frozen per flight):- day: az 75 / el 48, lit [1.58,1.5,1.33], shade [.30,.29,.36], lift [.05,.06,.11] (cool tint ONLY in shade), sky top #3e7fd2 → horizon #b8d0ec, fog = horizon, 25→300 m, uSat 1.08, ~15 % blue haze past 60 m.
- golden: az 6 / el 7 (backlit low sun), key toward #FFB36B ×1.5, violet-blue shade (facade ≈ #444380), sky #ffc47c → #8a6f8a, peach fog only past 50 m, sun disc #ffcf9e + bloom, contact blobs + real card shadows.
- Albedos (
paint.ts/build.ts): muted brick / cream / ochre / terracotta houses with plinth, cornice, sills, hoods, door step, chimney + pot, heights 7 / 8.4 / 9.8 m; warm grey/beige stone (saturation −35 % from "storybook"); ochre wood deck C* ~51-58 with near-black seams; iron dark and desaturated. Never lemon, never lavender lit faces. - Ink (
ink.ts): #030303, 5.1 px near (6 m) → 3.3 px far (90 m) at 1080x1920, creases ×0.8 from 35°, depth jumps from 1 %, fog tint 0.3 only far; character cards on layerNOINK(they carry their own plum ink). - Lens (
lensblur.ts+dofAtin story.ts): cInf px at 1080: hook/river CU 15-16, close-ups 12-14, MS 10-12, park 7, golden sway 5, wides/aerials 0. Focus on the eyes of the front row. - Post (
Bridge.tsx): ink → lens pre → lens main → bloom (thr 1.0, int .5, 6 levels, radius .6) → NEUTRAL tone map → grade; MSAA 4. Film grain exists but is OFF (reference measures no grain; it quadruples the file size). - Characters (
toon.ts/cast.ts/cardshade.ts): bean heads h/w .94, plum ink #241726, eyes .26 W apart, no blush, 14 expressions; adults 3.5 head-heights; walk bob 5 %, lean 1-7°, planted 0.8 m stride; blinks 0.5-2.3 s; tight contact shadow ~.5 under the feet + sun-direction tail by day; golden rim inner only (never an offset outer copy). - Camera (
story.ts): flow by default, see "Camera grammar" (the bridge itself was cut in the hard-cuts grammar). Flip kicks decaying over 7 f on impacts, 4-4.6° rolls, foreground props (FOREGROUND) in ~1/3 of the film.
Look targets (measured from the reference; see references/reports/)
- Ink:
- World lines: about 3 px at 1080 wide, near-black #0b0a0c, nearly constant with distance. Silhouettes, depth jumps and normal creases only. No line on wall/floor joins or the horizon. Character cards are never outlined by the world ink.
- Character ink: dark plum #201628-#2f1d28, thicker on the bottom/shadow side.
- Colour:
- Day median luma ~.57. Non-ink p5 ~.23 (no crushed blacks). Lit chroma C* p90 ~55. Day sky top ~#5e93d9, horizon 1.28x brighter.
- Golden: peach horizon #ffd08a, violet-blue shadows (never brown), backlit sun.
- Depth:
- DOF on about 1/3 of screen time (CU, MS, inserts), cInf 10-16 px at 1080, focus on the eyes. Establishing and wide shots stay sharp.
- Fog = horizon colour, 25→420 m day, 20→360 m golden.
- Bloom only on HDR emissives: threshold 1.0.
- Camera: the targets are in "Camera grammar": flow first, hard cuts only on request.
- Flow: about 1 % still frames, median 13.7 px/f, 7.5 moves per 10 s, blurred peaks around 45 px/f, 6-10 f dissolves in motion.
- Rolls of 4-5°.
- No hand-held float. Impact shakes flip sign every frame and decay over 7 f.
- Characters:
- About 3.5 head-heights tall, legs 1.4 HH.
- Stick limbs about 0.055 of head width, ink-dot hands.
- Bean head (h/w ~0.93, narrower chin, pointier crown).
- No blush or eye highlights. Faces at brightness ~.93.
- Walk bob 3-7 %, lean 1-7°, planted feet.
- Blinks every 0.5-2.3 s, lasting 4 f.
Look-match loop (how the bridge look was reached; reuse for any "make it look like X" pass)
- Measure the reference first. One analysis agent per topic (motion, depth, textures, characters, lighting, outlines, grade), each writing numbers, not adjectives, to
references/reports/<topic>.md. Shared brief:compare/CONTEXT.md. Reports are the source of truth for every agent after. - Sandboxes, one owner per file. Copy the project folder to
src/videos/<name>_{cam,world,mat,char,post}with entriessrc/sandboxes/<n>/index.tsx(sameindex.tsxas main, only the import path changed). Ownership used for the bridge:- cam: story.ts (flights, camera keys, transitions, kicks, DOF table, foreground props)
- world: world.ts, lights.ts, shade.ts, grade.ts (sun, sky, fog, river, colour, grade)
- mat: paint.ts, build.ts (painted textures, buildings, props)
- char: toon.ts, cast.ts, cardshade.ts (character drawing, posing, card lighting, fx cards)
- post: ink.ts, Bridge.tsx, lensblur.ts (outline pass, composer, lens blur, bloom)
Agents only edit their own files in their own sandbox and render stills with
BRIDGE_ENTRY=src/sandboxes/<n>/index.tsx node scripts/bridge-stills.mjs out/<name>/<n>/x_ <frames> 0.5.
- Merge with
python scripts/bridge_merge.py [cam,world,mat,char,post](backs main up tobackup/bridge_<time>/, copies owned files only). Thennpx tsc --noEmit(filter to the project folder), then re-sync every sandbox from main (cp -f src/videos/<name>/* src/videos/<name>_<n>/) before the next round. - Verify with a fresh verifier agent: side-by-side sheets (
python scripts/sbs_sheet.py out.jpg --ours a b --ref r1 r2), score each area out of 10 (colour day / golden, lighting, ink, textures, characters, depth, composition) plus a numbered fix list with frame numbers. Map each fix to the file owner and resume that owner's agent with SendMessage (keeps its context). Bridge scores: round 1 5/3/4/5/4/7/4/6 → round 2 5/4/5/6/4/7/6/6 → round 3 see notes. - Contracts between owners live in exported constants (e.g.
NOINKlayer from ink.ts,dofAt/FOREGROUNDfrom story.ts,LIGHTS/LOOKfrom lights.ts). Changing a contract means telling every owner that reads it.
Gotchas
- Kenney nature-kit materials are teal: recolour them by material name in build.ts.
- Cameras end up inside houses: the sight-line culler in build.ts/world.ts removes anything blocking any camera ray.
- Ink in the same merged effect pass as DOF gets overwritten. Ink must be its own pass before the blur.
- Pixel-sized post parameters must scale with resolution: stills are at 0.5, the final at 1.333. R3F clamps dpr to ≥ 1, so
--scale 0.5stills still render a 1080x1920 buffer. - Disk: every Remotion bundle copies
public/(~1.3 GB) intothe temp folder\remotion-webpack-bundle-*and never deletes it. 60+ GB filled the system drive during the bridge passes and a render died with ENOSPC. Always render withexport TEMP='<big drive>/remotion-tmp' TMP='<big drive>/remotion-tmp'(bridge-stills.mjs sets it itself) and ask the user before deleting old bundle folders in the shared the temp folder (auto mode blocks the sweep). /remotion-tmp fills too (~500 folders / 110 GB after the 4 bridge rounds): when a project is finished and nothing is rendering, delete itsremotion-webpack-bundle-*andpuppeteer_dev_chrome_profile-*folders there. - In JS strings write
"<big drive>/remotion-tmp", never"<big drive>\remotion-tmp"(\rbecomes a carriage return). - Remotion writes a silent audio track: mux with
-map 0:v:0 -map 1:a:0. - Sub-agents can't write report files in this harness: ask them for a ≤150-word final message and save it yourself to
out/<name>/<n>/REPORT.md. - Scratch
.tsfiles insideout/breaktsc: name them.txt. - 2K renders run ~4 fps (≈10 min for 67 s). Stills at 0.5 take 3-8 s each after a ~40 s bundle.
--scale 1.3333fails ("height must be an integer": 1920 x 1.3333 = 2559.94). Use the full1.3333333333333333for an exact 1440x2560.- Film grain at 2.5 % made the 2K file 910 MB instead of ~250 MB and will turn to mush on YouTube; the reference has none. Keep it off.
Readability traps the verifier caught (check every new prop/shot for these)
- A swing drawn as one rope that disappears behind the kid reads as a HANGING. Always two ropes to a wide plank
with the kid between them (
swingKidin toon.ts), and a frame whose legs clear the arc (A-frame at each end). - Props or flotsam closer than ~2 m to a lens become huge cut-off blobs at the frame edge. When a camera moves, re-check every prop near its new position (the river cameras moved into the floating hats).
- A foreground bush cut by the frame edge reads as a "green ball"; a foreground prop must be recognisable or gone.
- Flags: red + yellow star/diamond reads as Vietnam's. Use a period-correct flag (St George's cross for England 1831).
- Painted signs lit by a side sun go grey-blue and unreadable: give the sign face an unlit material.
- Golden rim light done as an offset outer copy turns every hat into a picture frame: inner rim only, head/torso only.
- Balcony/railing rails at chest height through characters: put the lens ~2.5 m up so rails cross legs, not torsos.
- Flat holds read as freezes in QA (frozen span ≥12 f). In flow every key is a moving carrier, and in hard-cuts mode every hold needs a creeping push-in.