All motions

What makes a home

A paper cut-out shadow theatre in portrait, lit from behind layer by layer

Created with AI
  1. 0–4.45 s a house on the hill at dusk, the room already glimmers through the glass, then the camera flies through the window
  2. 4.45–8.3 s inside, two cups steam and the cat sleeps under the table, the curtain falls
  3. 8.3–12.8 s the curtain opens, the tree in front of the house runs through all four seasons, the flats sink on threads
  4. 12.8–16.6 s two people walk home, the door opens, someone waves in the light, the scene folds flat
  5. 16.6–20 s the village unfolds, window after window lights up, the camera glides back to the first frame
  • Paper cut-out
  • 20 s Loop
  • 1080 × 1920 · 30 fps
  • Canvas 2D
  • 2.8 MB

Prompt

English · for Claude Code, Codex & co. · 1,052 words
Build a 20-second looping paper cut-out shadow theatre in portrait 9:16 — stage 1080×1920 CSS px (not square) — on the question "What makes a place feel like home?". Five small scenes made of layered paper flats lit from behind, one short line of text per scene, and four scene changes that each use a different trick of the paper theatre.

DESIGN
Every flat is a Path2D silhouette cut with a slight hand-cut wobble (subdivide edges, offset points along the normal by ±1 px of smooth noise). One sheet of paper = a soft drop shadow thrown away from the scene's light, a dark cut edge on the far side and a lit cut edge on the near side (paper has thickness), the flat face, its own patch of a generated fibre texture (offset, rotated and scaled per layer, overlay blend), a faint buckle (soft-light gradient) and the backlight shining through (radial gradient in screen space, stronger on the back layers). Back flats light, front flats dark. Openings are real holes (evenodd) with warm light behind them: windows, a round gable window, a door cut as a thin glowing slit, lace holes in curtains and tablecloth. Shadow puppets are jointed and show it: a thin holding rod under each figure and small brass fasteners at the joints. Text in Instrument Serif 86 px, two centred lines at y ≈ 432/528, always over plain sky or wall — cream on dark skies, dark brown on light ones; trailing punctuation hangs so the words sit on the centre line. Keep the top and bottom ~10 % free of anything important (social UI). Banned: clipart shapes, coloured glows on text, particles for their own sake, bouncy easing.

STORYBOARD
0–4.45 Dusk, a house on a hill (far hills, mid hills with tiny lit houses and conifers, near hill with trees, the house, window frames with glazing bars as their own layer just in front of the wall, a picket fence, stepping stones growing towards the viewer, swaying grass), moon, stars that each twinkle on their own clock, a ribbon of chimney smoke in a draught. The room is already faintly visible through the left window. Line 1 (0.15–2.7). From 3.1 the camera flies through the lower pane: zoom on a log scale with ease-in-out, the frame parts from the wall by parallax, everything close to the lens goes soft (depth of field); the room is rendered inside the window's clip with its own camera and takes over the whole frame.
4.45–8.3 Inside: warm wall, shelf, an oval frame with a little house, a pendant lamp that swings a hair (its light cone and the shadows move with it), a teapot and two cups whose steam leaves thin, swells and curls, a table with a scalloped lace cloth, two chair backs, a cat asleep (breathing, ear and tail twitch), the stage curtain with tie-backs breathing slightly. Line 2 (4.75–7.3). 7.66–8.24 the tie-backs let go and the curtain falls shut, top first; behind it the set changes; 8.29–8.9 it draws aside and the valance lifts out.
8.3–12.8 The tree in front of the house through four seasons, every leaf cluster on its own clock and in one of three paper shades: blossoms pop, petals fall, deep green, a wave of rust, leaves tumble down over their long axis, bare branches, snow caps, snow on roof and ground, flakes of different sizes; a swing swings out, damped. Sky, hills and ground change colour with the seasons. Line 3 (8.9–11.45, gone before a flake reaches it). 12.2–13.3 the flats are lowered on visible threads, front first, while the next set is raised on threads, back first; skies crossfade.
12.8–16.6 Sunset, the sun keeps sinking: an adult (hat, coat, scarf) and a child (beanie, backpack) walk hand in hand towards a house. The walk is driven by distance, not time: the stance foot stays planted, the swing foot lifts and rolls, two-bone IK for knees and for the held hands, the child skips a little, one closing step at the stop, head and scarf swing on. 14.3 the door swings open on its hinge, a soft-edged wedge of light grows across the path and rims the figures, someone in the doorway raises an arm and waves from the elbow. Line 4 (13.2–15.75). 15.95–16.6 every flat folds down onto the stage floor like a pop-up page, front first, and the village unfolds, back first.
16.6–20 The village wide; windows light up one by one. Line 5 (16.95–19.5). From 17.6 the camera glides back to the first frame in a shallow arc, so the loop reads as a camera move.

MOTION
One pinhole camera per set (scale D/(D − z) per layer), slow drift everywhere, critically damped springs 1 − (1 + w·t)·e^(−w·t) and cubic ease-in-out; nothing overshoots. Motion blur by averaging 9 whole-frame samples over half a frame during the window flight, the curtain and the set changes. Each text line rises out of a mask at its own baseline (0.4 s, second line 0.12 s later) and sinks back into it; every line stays fully readable for 2 s and is never on screen during a scene change. Everything visible through the window at the loop point runs on multiples of 1/20 Hz. ?lang=de|en switches the lines.

TECHNIQUE
- One self-contained HTML page plus one JS file (no inline script, no libraries, no network requests). Stage exactly 1080×1080 CSS px, or the size named above (1080×1920 for portrait).
- Expose window.MOTION = { duration, fps: 30, width, height, seek(t) } with the stage size in width and height. seek(t) redraws the frame for time t from scratch: no state between frames, no Math.random (seeded PRNG only), no Date, no CSS transitions, no timers.
- Loop: seek(0) and seek(duration) must look identical.
- With ?render=1 the stage sits unscaled at the top left (for frame capture). Without it, scale the stage to fit the window and loop with requestAnimationFrame.
- prefers-reduced-motion: show one representative still, no loop.

CHECK
Render stills at the listed times, look at every one, fix anything that overlaps, is cut off, aliased or unreadable, then render again. Report only when frame 0 equals the last frame.
Stills: every 0.5 s from 0 to 20, plus every 0.1 s across 3.0–4.5, 7.6–9.0, 12.1–13.4 and 15.8–17.2 — in both languages.

How to recreate it

  1. Give the prompt to a coding agent

    Create an empty folder and paste the prompt into Claude Code, Codex or Cursor. The agent writes one HTML page and one script — the animation then runs right in the browser.

  2. Let it check the stills

    The prompt makes the agent render stills and look at them itself. Only refine what you don't like in the picture: “scene 3 is too busy” works better than a new prompt.

  3. Render to MP4

    Because every animation can draw any frame exactly through window.MOTION.seek(t), a small script renders it frame by frame — no stutter, no screen recording. Then ffmpeg joins the frames into a clip.

Render commands Download render.mjs
# 1 · Render every frame (Chrome, Node ≥ 22)
node render.mjs http://localhost:3000/ \
  frames/ frames 30

# 2 · Join the frames into an MP4
ffmpeg -framerate 30 -i frames/%05d.png \
  -c:v libx264 -preset slow -crf 22 \
  -pix_fmt yuv420p -movflags +faststart \
  my-motion.mp4

How a clip is built with Claude Code

Background

A paper shadow theatre in portrait: the camera flies through a lit window, two cups steam on the table, a curtain falls and opens on a tree in four seasons, two people walk home, and finally the whole village unfolds. 20 seconds, 9:16, built as code — with a prompt to recreate it.

What I learned building it

Paper only reads as paper through what happens between the layers: a lit and a dark cut edge, a shadow that moves with the light, light falling through holes. And a walk stops sliding once it is driven by distance instead of time: the stance foot stays where it was put down.

Inspiration

The starting point was a prompt by @x4b47x ((opens in a new tab)) on Skillry. You'll find the original wording there; the prompt above is my own version.

More motions

Contact

Let's discuss
your project
together.

Send me a message or fill out the contact form. I'll get back to you within 24 hours.

Paul Mill

Paul Mill

hallo@paulmill.com