代码生成视频 / 叙事大片派
镇馆之宝:riso 印刷六幕叙事 brief The Riso Print Narrative Brief
预览为我们用这条提示词自行生成(seek(t) 逐帧渲染),非原作者成片
▶ 在线运行Original Prompt
Build a 30-second procedural animation in a risograph-print style, as ONE self-contained index.html (Canvas 2D, no libraries, no network fonts, no images, no assets of any kind — every pixel is drawn by code). Make the finished animation, not a demo of techniques.
The idea
A lone ink dot calls out into the world with ripples, and everything that resonates answers back — bells, wolves, whales, radios, fireworks. It collects them as memories, but alone they fade to blue. Then a second dot, pink, answers from off-screen. Call and response. Where their ripples meet, a flower blooms, the world is reprinted in their two inks, and we pull back to a universe full of pairs. It ends on a hand-lettered signature.
The spine of the whole piece: a small indigo dot pinned to the exact centre of the frame, and concentric ripple rings coming out of it. Every scene, every transition and every camera move is organised around that dot. It never drifts during Acts I–III.
Format
Square 720×720 canvas (internally render at devicePixelRatio), 28.0 s, time-based (not frame-based).
Warm cream paper background in all "paper" moments.
Music/cuts on a 120 BPM grid: 0.25 s and 0.5 s are the base units.
Timeline
0.0–1.5 | I. The call | Blank cream paper, dot at centre. Two blue ripple rings expand from the dot past the frame edges. Little curved "vibration" tick marks (2–3 short parallel arcs) flick near the rim.
1.5–4.5 | | Each ripple leaves behind a disc (~55 % of frame width) holding a tiny world, with blank paper + one ripple between each: koi pond with lily pads and concentric water rings → a cricket silhouetted on a big yellow moon (the disc flips in like a coin, its rim thickness visible) → jellyfish in a deep green-blue sea (disc slides in from the right, rotating slightly).
4.5–6.0 | | A disc opens on the dot and the camera dives through it to full bleed: owl close-up → temple bell ringing (sound arcs) → lighthouse (beam + wave arcs). Each next scene opens as a disc over the previous one, then fills the frame.
6.0–13.9 | II. Everything resonates | Montage of full-bleed scenes, hard cuts on the beat, accelerating from ~0.5 s to ~0.25 s per scene. At 6.0, 8.0 and 10.0 it "breathes": back to blank paper for one ripple, then the next scene irises open from the dot. Scene order below.
13.9–15.9 | | Rewind: earlier scenes flash back in reverse, each in an alternate colourway (inks swapped), framed by a thin pale double "lens" ring around the dot that tightens a little each time.
15.9–17.8 | III. Archive | Pull back: all scenes are now ~40 circular medallions on 4 concentric orbits around the dot, like grooves on a record or a solar system, on pale yellow paper, orbits slowly counter-rotating. Then they drain to a single blue ink (cyanotype look), shrink, scatter outward and vanish. Lone dot on paper. One beat of stillness.
17.8–22.0 | IV. The answer | A pink halftone glow creeps in from the bottom-left corner; pink ripple arcs roll in from off-screen. The dot answers with a blue ring. The camera eases back and pans to reveal a pink dot bottom-left. Call and response: alternating blue and pink ripples, each a little bolder, the rings drifting closer.
22.0–23.0 | | Their rings touch: tiny yellow sparks at the contact point, the pink dot gets a yellow core, and a pink halftone lotus with an orange-yellow heart blooms between them and slowly spins, framed by one blue and one pink ring.
23.0–24.0 | V. Together | Fast duotone reprise printed in ONLY pink + blue ink: waterfall, whale, rocket launch, ringed planet — with both dots now visible in every frame.
24.0–26.0 | | Deep indigo night with star grain and nebula haze. The two dots, now with yellow halos, orbit each other inside their own rings. Zoom out: hundreds of other blue/pink pairs, each orbiting inside small rings.
26.0–28.0 | VI. Signature | Cream paper. "opus 5" is hand-lettered stroke by stroke in indigo ink with pink misregistration. The two dots sit side by side under it as a "••" mark; the pink dot sends one small ring; "claude" writes itself below. Short hold, then all the lettering dissolves into halftone dots that shrink away.
(Replace "opus 5" / "claude" with your own title.)
Scene library (Act II, in order)
howling wolf on a snowy ridge under aurora · rotary telephone ringing on a pink sunburst · turntable (the dot = the spindle) · frogs croaking under a huge full moon among reeds · bats pouring out of a cave at sunset · breaking ocean wave · cat from behind at a rainy night window, city lights · sunflower with a bumblebee (dot = flower heart) · cathedral valve radio with sound arcs · fireworks over a harbour · hummingbird among morning glories · whistling red kettle against a tiled wall · Ferris wheel at a fairground at dusk · jungle waterfall · bicycle under bougainvillea · whale in shafts of light · grand piano / harp strings with sound arcs · rocket launch from a gantry, billowing clouds · apartment windows at night with a moon · ringed planet · hot-air balloons over hills · volcano with lightning · radio telescope listening to a spiral galaxy · campfire in a dark forest · sunflower field to the horizon · layered mountain ridges at sunrise · lone umbrella pine over furrowed fields at dusk · raindrops on a night pond.
Composition rules for every scene
One bold subject, readable as a silhouette in 0.25 s. Strong value contrast.
The centre dot lands on a meaningful spot (record spindle, bell body, phone dial, sunflower heart, where the howl starts…).
Many scenes contain concentric sound/light/water arcs that rhyme with the ripples.
3–4 inks per scene maximum.
Visual system (risograph)
Paper: warm cream #F2EDE3, subtle fibre grain and faint mottling. Static — never flickers.
Inks (riso standards): Blue #0078BF, Fluorescent Pink #FF48B0, Yellow #FFE800, Green #00A95C, Orange #FF6C2F, Violet #765BA7, Indigo #2E3192 (the dot and the lettering). No pure black: darks come from overprinting inks (multiply).
Halftone: each ink is its own layer. Tones are dot screens with visible dots (~4–6 px pitch), a different screen angle per ink (e.g. 15°, 45°, 75°, 0°). Gradients = dot-size ramps. Solids at 100 %.
Misregistration: each ink layer offset by 1–3 px in a fixed per-scene direction. The centre dot always shows a thin pink fringe on one side.
Print texture: speckle flecks, small ink-starved voids in solids, white hatching for highlights.
Line quality: hand-drawn wobble and stroke-width variation. Ripples are never perfect circles (low-frequency noise on the radius, tapered ends).
The dot: indigo, ~2.2 % of frame width.
Motion vocabulary
Ripple: ring grows from the dot to beyond the frame corner in ~0.6 s (easeOutCubic), thinning and fading; 2–3 tick-mark arcs flick at the rim.
Disc reveal: circular mask grows with a slight overshoot (easeOutBack). Variants: coin flip (scaleX 0→1, ellipse with visible rim thickness in a darker ink), slide-in with a little rotation.
Dive: scale the disc up to full bleed in ~0.35 s (easeInOutCubic); the dot stays centred.
Montage cut: hard cut on the 0.25 / 0.5 s grid. No crossfades between full scenes.
Lens ring: pale double outline around the dot, tightening shot by shot.
Archive pull-back: the current scene shrinks into one medallion, the others appear on their orbits; orbits alternate rotation direction.
Ink drain: each medallion re-rendered as a single blue ink from its luminance, then crossfaded (the only allowed crossfade).
Scatter: medallions move outward (easeInQuad) while shrinking to zero.
Bloom: petals unfold with a stagger (easeOutBack), then slow rotation.
Camera: smooth, critically-damped pans and zooms. No jitter.
Handwriting: single-line glyph paths revealed by stroke progress along their length.
Dissolve: lettering converted to halftone dots that shrink to zero with noise-staggered timing.
Architecture
render(t) is a pure, deterministic function of time: the animation is seekable to any frame.
Seeded PRNG (e.g. mulberry32) per scene and per element. Never call Math.random() inside the render loop. Textures stay attached to their objects.
The timeline is a data array of cues {start, duration, kind, scene, transition, params}, not hard-coded if/else.
Each scene is a module {id, inks, draw(inkCtx, localT, rng)} in a registry.
Riso compositor: draw each ink's coverage into an offscreen greyscale canvas → halftone it with a precomputed threshold tile per screen angle → tint → composite with multiply on the paper, with the registration offset.
Pre-render each scene's static ink layers once (lazily, with a loading bar) into bitmaps. Animate only transforms plus a few small live elements (fire, wings, water arcs, beams). Target 60 fps playback on a laptop.
Hand-lettering: define only the glyphs needed as stroke paths (no font files).
Controls & export
Play/pause (space), replay, scrubber with time readout and act markers, ←/→ to step one frame (1/24 s).
?t=12.5 URL param to open paused on a given time (used for inspection).
"Record" button: canvas.captureStream(24) + MediaRecorder → WebM download.
Optional, muted by default: WebAudio soundtrack at 120 BPM (warm analog pad + soft arpeggio), a soft ping on each ripple, blue and pink pings a minor third apart in Act IV.
Process — do not try to one-shot this
Engine first: paper, riso compositor, dot, ripple, timeline, controls. Stop and show me stills at t = 0.3, 1.8, 3.0 before going further.
Scenes in batches of ~8. After each batch, open each scene with ?t= in a headless browser at 720×720, screenshot it and look at it. Fix muddy, illegible or off-centre compositions before starting the next batch.
Transitions + Acts III–VI.
Full inspection pass: screenshot every 0.25 s around 1.5, 4.5, 6.0, 13.9, 15.9, 17.8, 22.0, 24.0 and 26.0. Fix pops, clipping, flicker, texture swimming, and the dot drifting off centre.
Quality bar: fewer excellent scenes beat many mediocre ones. If you run short on budget, cut Act II scenes — never the transitions or Acts III–VI.
Don't
external assets, libraries, fonts or image generation
photorealism, black outlines everywhere, smooth gradients without halftone
crossfades between full scenes (except the ink drain)
any text other than the final signature
random values that change from frame to frame中文对照
〔要点对照〕制作 30 秒 risograph 孔版印刷风程序化动画,单文件自包含 index.html(Canvas 2D、零库零素材零网络字体,每个像素由代码绘制),"做成片,不做技术演示"。
创意:孤独墨点以涟漪呼喊,万物回应(钟、狼、鲸、电台、烟花),收集为记忆却独自褪蓝;粉色第二个点从画外应答——呼叫与回应;涟漪相遇处花开,世界以双墨重印,拉远是满是成对的宇宙,手写签名收尾。
全片脊柱:靛蓝点钉在画面正中(一至三幕绝不漂移),一切场景/转场/运镜围绕它组织。720×720、28 秒、基于时间、120 BPM 网格(0.25/0.5 秒为基本单位)。
六幕时间轴:呼唤(空纸、蓝涟漪、边缘振动刻痕)→ 涟漪留下圆盘小世界(锦鲤池→黄月蟋蟀→深海水母)→ 潜入圆盘全屏(猫头鹰→寺庙钟→灯塔)→ 万物共鸣蒙太奇(硬切随节拍加速,28 个场景库:雪岭嚎狼与极光、旋转电话、唱机、满月蛙鸣、蝙蝠出洞、碎浪、雨夜窗猫、向日葵与熊蜂、电子管收音机、港口烟花、蜂鸟、红水壶、摩天轮、瀑布、三角梅自行车、光柱中的鲸、钢琴竖琴、火箭升空、夜窗月亮、行星环、热气球、闪电火山、射电望远镜、篝火、向日葵田、层叠山脊、孤伞松、夜塘雨点)→ 倒带换色回闪 → 档案(40 个圆形纪念章上 4 条同心轨道反转旋转,褪为单色蓝"蓝晒感"后散逸)→ 粉色应答(半调光晕渗入、蓝粉涟漪交替呼应、相触处黄火花、粉色半调莲花绽放)→ 双色重演(仅粉+蓝)→ 靛蓝夜空双点绕行、拉远见成百上千蓝粉对 → 签名("opus 5"靛蓝手写逐笔呈现带粉色套印错位,"claude"自写,全部溶解为半调点缩没;换成你自己的标题)。
构图规则:一个醒目主体剪影 0.25 秒可读、强明暗对比;中心点落在有意义位置(唱机主轴、钟身、花心、嚎叫起点);多数场景含与涟漪呼应的同心声/光/水弧;每场景最多 3-4 种墨。
视觉系统(risograph):暖奶油纸 #F2EDE3 带静态纤维颗粒;riso 标准七墨(Blue #0078BF、Fluorescent Pink #FF48B0、Yellow #FFE800、Green #00A95C、Orange #FF6C2F、Violet #765BA7、Indigo #2E3192);无纯黑,暗部靠叠印(multiply);半调:每种墨独立图层、网点可见约 4-6px 间距、每墨不同网角、渐变=网点大小爬坡;套印错位:每墨层按场景固定方向偏移 1-3px,中心点始终一侧带粉色毛边;印刷质感:斑点、实色露白、高光白影线;线条:手绘抖动与粗细变化,涟漪永不是正圆(半径低频噪声、端部渐细);点:靛蓝,约画面宽 2.2%。
运动词汇:涟漪约 0.6s easeOutCubic 长出变细变淡;圆盘揭示 easeOutBack 微过冲(硬币翻转/微旋滑入变体);潜入约 0.35s easeInOutCubic;蒙太奇硬切在 0.25/0.5s 网格上;镜头环收紧;档案拉回轨道交替转向;墨色褪蓝(唯一允许的叠化);散逸 easeInQuad;绽放交错展开慢转;镜头平滑临界阻尼;手写按笔画进度揭示;字溶解为半调点噪声错峰缩没。
架构:render(t) 纯函数可任意 seek;种子化 PRNG(mulberry32)逐场景逐元素,渲染循环内禁 Math.random();时间轴是数据数组 {start, duration, kind, scene, transition, params} 而非硬编码 if/else;场景为注册表模块 {id, inks, draw(inkCtx, localT, rng)};riso 合成器:每墨层画入离屏灰度画布→按网角预计算阈值瓦片半调化→着色→multiply 叠印并加套印偏移;静态墨层懒加载预渲染为位图,仅对变换和少量活动元素逐帧动画,目标笔记本 60fps;手写字形只定义所需笔画路径(无字体文件)。
控制与导出:空格播放/暂停、重播、进度条带幕标记、逐帧步进;?t=12.5 定位检查;Record 按钮 captureStream(24)+MediaRecorder 导出 WebM;可选 WebAudio 120BPM 配乐,涟漪轻 ping,第四幕蓝/粉 ping 相差小三度。
流程铁律——不要试图一次成型:先引擎(纸、合成器、点、涟漪、时间轴、控制),在 t=0.3/1.8/3.0 停下看静帧;场景每批约 8 个,无头浏览器 720×720 截图检查,修正浑浊/不可读/偏心构图再继续;再转场+三至六幕;最后全面巡检(关键时间点附近每 0.25s 截图,修 pop、裁切、闪烁、纹理游移、点漂移)。质量标准:少而精胜过多而平庸;预算不足砍第二幕场景,绝不砍转场和三至六幕。
禁止:外部素材/库/字体/图像生成;照相写实、满屏黑描边、无半调的平滑渐变;全屏场景间叠化(墨色褪蓝除外);签名外任何文字;逐帧变化的随机值。对 Kevin Ngo 爆火 riso 动画的社区复刻(原作者从未公开提示词);作者把原视频丢进 Claude Code 用 /watch 逆向工程出此 brief,耗时 5h40、约 71.6 万输出 tokens,成品单文件 224KB
全库最长、最完整的成片级 brief(约 1 万字符),值得整篇慢读。 它示范了一条提示词能“专业”到什么程度:
① 全片脊柱(spine):一个靛蓝点钉在画面正中,28 个场景、每次转场、每次运镜全部围绕它组织——所有场景库条目都注明“中心点落在哪”(唱机主轴、钟身、花心、嚎叫起点)。给长片找一个不变量,是叙事不散架的关键。
② 运动词汇表(Motion vocabulary):把每种动效(涟漪、圆盘揭示、硬币翻转、潜入、墨色褪蓝……)先定义成可复用词条,再在时间轴里引用。这是动画工业的分镜语言,模型照着“查词典”而非自由发挥。
③ 流程铁律“不要试图一次成型”:引擎→场景(每批 8 个截图检查)→转场→全面巡检,外加质量标准“少而精胜过多而平庸;预算不足砍第二幕场景,绝不砍转场和三至六幕”——教模型怎么砍预算,比给足预算更难也更值钱。