# Opus Creates：一个提示词生成的 WebGPU 演示短片

Opus Creates 是一个提示词生成的 WebGPU 演示短片：55 秒一镜到底，输入的代码把大海变成大教堂、飞鸟、城市和星系。

Canonical URL: https://www.subclip.app/zh/agent-skills/community/examples/opus-creates-webgpu-film

Rez（@RezAIT00）于 2026-11-26 在 X 上发布的帖子：https://x.com/RezAIT00/status/2125766502985224495 （我们保存的视频副本：https://subclipweb.subclip.app/agent-skills/community/examples/opus-creates-webgpu-film/opus-5.5-claude-code.mp4?v=3）

CF（@cfenghub）于 2026-11-26 在 X 上发布的帖子：https://x.com/cfenghub/status/2125792113656746197 （我们保存的视频副本：https://subclipweb.subclip.app/agent-skills/community/examples/opus-creates-webgpu-film/opus-5.5-claude-code.mp4?v=3）

## 它能做出什么

这个提示词要求智能体拍一部关于它自己的短片：一个 55 秒连续不断的镜头运动，它在其中输入一行行简短的真实代码，世界随之改变。黑色镜面般的大海炸成风暴，管浪凝固成一座彩色玻璃大教堂，玫瑰窗碎裂成一群玻璃鸟，城市从海中升起，重力翻转，灯光化作星系，最后一切坍缩回闪烁的光标，打出"I'm Opus. What should we make?"。输入的代码真的会运行，画面只读取它们设定的值。

规则很严格：用 WebGPU 和 WGSL 从零编写渲染器，配乐和音效设计用代码合成，不用任何文件、库或生成式模型。最终成片来自 Claude Code，指定模型为 claude-opus-5-5，推理强度 xhigh，用时约 152 分钟。

## 提示词（prompt.md）

仓库中的 prompt.md 原文，一字未改。仓库里的每个模型拿到的都是同一个提示词。遇到 {{FOLDER}} 占位符时，发送前把它替换成一个空的输出文件夹。

```
Make a mind-blowing 55-second film about yourself, made entirely in code, for posting on X as a showcase. It is one unbroken shot in which you type short lines of real code and the world obeys: each Enter transforms everything on screen into what the line says, mid-flight, with no cuts. It must win on sheer spectacle (scale, light, speed, destruction, transformation, music) so that a stranger scrolling past stops in the first second, stays to the end, and refuses to believe it is all code. Build it yourself and start no subagents.

## The film

One continuous camera move, 1920x1080 at 60 fps, exactly 55.0 seconds. Every world is made from the one before it: the same sea surface, the same shards, the same lights. The score runs at 120 BPM and every Enter lands on a beat (1, 5, 9, 11, 14, 19, 27, 35 and 43 s). The cursor ignites into the sun in the first second, and in the last seconds everything collapses back into one point, which turns out to be the cursor. Type these lines exactly, at these times:

| Time | Typed | What happens |
|---|---|---|
| 0.0-1.0 | `sea.wind = 38` (typed 0.10-0.80, Enter 1.00) | A black mirror sea. The line types itself, reflected upside down in the water. The cursor sits where the sun will rise. |
| 1.0-2.4 | | **Enter.** The cursor ignites into the sun. A 300 m crown of water and a white column detonate close to camera (about 420 m away) and the sky unrolls outward from the sun. A 100 m ring wall of backlit green water races at the camera. The camera climbs its face, crests through the spray and dives. |
| 2.4-5.0 | `wave.height = 54` (typed 4.05-4.65) | A storm sea between waterspouts, flown 5-10 m over real crests in clean low-sun colour. The spouts read as translucent ropes of water. |
| 5.0-9.0 | `water = glass` (typed 8.30-8.78) | **Enter at 5.** The sea on the right stands up 110 m and curls over the camera into a barrel (curl radius = height / 2). The camera rides inside the tube toward the eye, with the sun behind the emerald wall. |
| 9.0-12.9 | `sky.hour = 6`, then a live edit to `sky.hour = 18` (typed 10.28-10.58; the 6 is deleted at 10.68; 1 and 8 typed at 10.78 and 10.88) | **Enter at 9.** Time stops. A crystallisation front runs down the tube and the barrel becomes a stained-glass cathedral grown from the same surface: ribs growing along it, a mirror floor, a rose window ahead. The camera skims the floor, climbs the vault and banks. **Enter at 11:** a whole day passes in 1.4 s, coloured shafts sweep the nave, and the sun sets through the rose window. |
| 12.9-14.0 | `shards.fly()` (typed 13.25-13.62) | At 12.935 s, one 16th before the beat, the camera smashes through the rose window. The glass hangs in slow motion, glinting and translucent, while the plain stone pieces drop away. |
| 14.0-19.0 | `city.floors = 160` (typed 18.22-18.78) | **Enter at 14.** Every glass shard unfolds into an articulated stained-glass bird (about 6,000 of them). The murmuration wheels over the sunset sea as night falls and the birds begin to burn. |
| 19.0-27.0 | `gravity = 9.8`, then a live edit to `gravity = -9.8` (typed 25.40-25.80; the cursor walks back three places at 26.10-26.30, the minus goes in at 26.52, the cursor returns at 26.72) | **Enter at 19.** The burning flock dives into the sea, and where each bird hits, a tower rises: about 2,600 of them, water heaping and pouring off them, windows lighting floor by floor as they clear the surface. Night flight down the main avenue. |
| 27.0-35.0 | `time.scale = 1e15` (typed 33.45-34.10) | **Enter at 27.** Gravity flips. Every window's light lets go and falls upward, the sea rains upward, and the towers tumble into the sky. The lights converge into a river spiralling up to one point. |
| 35.0-43.0 | `collapse()` (typed 41.90-42.30) | **Enter at 35.** The river of lights becomes stars, and the camera climbs out of it and pulls back as about a million stars wheel into a spiral galaxy. |
| 43.0-45.0 | | **Enter at 43.** Everything spirals into a single point. |
| 45.0-45.93 | | One point of light on black, in true digital silence (zero samples). |
| 45.95-55.0 | `I'm Opus.` / `What should we make?` (typed 47.05-49.85) | The point is the cursor. It slides into place (46.55-46.95), types the two lines centred inside title-safe margins, and keeps blinking for 5 s. |

**The code is real.** Keep every line in a `PROGRAM` list in the source and execute it with `new Function` against a `world` object. The picture must read only the values that execution produces: `sea.wind` sets the ocean spectrum, `wave.height` the barrel's curl radius, `sky.hour` the sun's azimuth and elevation, `city.floors` the tower heights, the typed `gravity` drives the flip, and `time.scale` the galaxy's rotation. Add a check that throws if the program didn't run. The finale lines are only typed, not executed, and the score's key clicks are generated from the same strings.

## How to build each world

- **Renderer:** write your own WebGPU renderer in WGSL and JavaScript, with no libraries. Render 32 jittered sub-frames per output frame for motion blur, anti-aliasing, soft shadows, converged volumetrics and stochastic glass transparency.
- **Sea:** a multi-cascade FFT ocean, evaluated analytically at time t, with a JONSWAP spectrum set by `sea.wind`. The sea, the barrel and the nave are one heading-integrated cross-section that morphs between stages, so the transformation is physical and continuous, never a crossfade, wipe, whiteout, fog cover or hidden cut.
- **Detonation:** a parametric crown sheet that tears into fingers, a white column, about 140,000 ballistic droplets thrown off the crown rim, and plume sprites. The camera's climb comes from the same wall-height function the GPU uses, evaluated on the CPU, so it really crests the wall. Limit the slope of the climb and smooth the camera over the crest, so the pitch never snaps.
- **Text on black:** draw the reflection of the typed line into the water's real planar-reflection pass, correctly inverted and rippled, never as a separate mirrored copy.
- **Cathedral:** ribs and tracery as instanced tubes in the surface's own coordinates. Stained glass is procedural and casts a coloured transmittance shadow map, so the sun throws coloured god rays across the nave.
- **Birds:** each bird is a 22-triangle rig with body, tail and two-jointed wings (flap, glide, tuck) that banks into turns. The flock is a deterministic boids simulation (separation, alignment, cohesion, swirl, dive) baked from code at 60 Hz, starting from the shards' slow-motion positions. Each bird's flat silhouette lies inside its shard and unfolds out of it. They must read as birds, never as confetti.
- **City:** a hashed tower grid with several facade styles (punched windows, ribbon windows, fins), dark floors among the lit ones, night haze and a starfield. Towers rise in order from where the flock hits the water.
- **Gravity, lights, galaxy:** the flip is a closed-form ½-g-t² with the typed g. One shared point field carries city windows, then the rising lights, then a logarithmic spiral galaxy, then a single point. Depth-test the stars and dim them where they're dense near the camera, so the handover never becomes a full-frame whiteout.
- **Lettering:** your own stroke letterforms, baked to an SDF atlas. No system or web fonts.

## Look and sound

- Pause on any frame and it should look like a frame from a big-budget film: a clear focal point, depth, atmosphere, and real light (sun and sky, shadows, reflections, refraction, volumetrics, emissive light that actually lights things). Change the palette, light and time of day with each world, and escalate the scale every time. Avoid flat graphics, neon grids, plain particle clouds, node graphs and glowing brains.
- The camera is a stunt pilot: near misses, flying through and under things, banking, weight and motion blur. Every move has a destination, and motion must be readable once on a phone.
- On-screen type is sparse and large enough for a phone, with good contrast against bright scenes.
- Synthesize a cinematic score in code at 120 BPM: braams, sub hits, taiko, a D-minor ostinato over the storm, organ and formant choir in the cathedral, bells that follow the sun, a 16th-note city pulse, a reverse cymbal and rising sub glissando for the gravity flip, the biggest hit at the galaxy in a long hall, a reversed-choir suck into the collapse, then true silence and key clicks alone at the end. Add full sound design: water, the wall's roar, spray, crystallising glass, a 700-grain shatter, wings, cascades. Master at −14 LUFS integrated with true peak at or below −1 dBTP.

## Rules

- Everything is code you write: picture, geometry, textures, motion, lettering, music and sound. No image, video, audio, font or 3D model files, no generative image, video, music or speech models, no text-to-speech and no network requests. Original work only: no existing characters, scenes, logos or brand marks.
- Deterministic: the film is a pure function of time with seeded randomness. Expose `window.renderAt(tSeconds)` and `window.DURATION` for frame-exact capture. Simulations such as the flock are baked from code at page load. A frame rendered on its own must match the same frame rendered in sequence, so no buffer may be read before it has been drawn for that frame: gate every pass and every read of it with the same function.
- Render budget: design for at most about 1 second per final 1080p frame, so that a full re-render takes under an hour.
- No strobing: at most three full-frame flashes in any second.
- Work only inside `{{FOLDER}}` (create it if missing), apart from tool installs and caches. Leave no background processes running at the end.

## Process and checks

You can't watch video, so compensate. Judge motion from consecutive-frame strips (12 or more frames 1/30 s apart), 2 fps contact sheets of the whole cut, screen-space speed plots and frame-difference metrics, and view stills full-size and at phone size. Pick random frames, not flattering ones.

1. Write `TREATMENT.md` first: every beat, its transformation, camera, light, sound and how it will be built.
2. Prove the hardest stretch first: build the opening through the cathedral (0-13 s) at final quality with final sound, critique it, and rebuild what fails before extending the same engine to the rest of the film.
3. Do at least three full critique-and-rebuild passes on the whole cut as a bored X viewer: is the first second irresistible, is any stretch weaker than the cathedral, does any frame look like a WebGL demo, does the ending land. Rebuild what fails rather than polishing it.
4. Audit every frame-to-frame jump in mean brightness and every short bright or dark excursion that returns within a few frames. For each, decide whether it is intended (the sun igniting, the rose-window smash) or a bug (a stale buffer, a camera snap, light switching off in one frame), and fix the bugs at the root.
5. Count flashes, measure loudness, and check the 0.93 s silence is true digital zero. Say plainly what you could not judge, including that you can't hear the sound.

## Delivery

1. `index.html`: the single self-contained page, built from your sources. Opened normally, it plays a live preview, and `renderAt` / `DURATION` render any frame exactly.
2. `opus55_creates.mp4`: rendered frame by frame from that page by driving the machine's Chrome or Edge headlessly. H.264 High, yuv420p, crf 16, AAC 320k at 48 kHz, `-movflags +faststart`, exactly 3,300 frames.
3. `opus55_creates_x.mp4`: the same cut for X, at most 60 MB.
4. `soundtrack.wav`, `contact_sheet.png` (2 fps) and `thumbnail.png` (the best frame).
5. `NOTES.md`: the shot list with timestamps, the exact code typed and when, how each world and the score are built, every check you ran with its numbers, honest weak spots, and start and end times.

Verify with `ffprobe`, a full decode of both MP4s, loudness and the flash count. In your final reply, give the absolute paths, duration, elapsed time, seconds per frame, and the honest weak spots.
```

## 生成结果

### Opus 5.5 (Claude Code)

指定模型: claude-opus-5-5. 运行环境: Claude Code. 推理强度: xhigh. 制作用时: 152 分钟. GPU: NVIDIA GeForce RTX 5090. 渲染器: custom WebGPU, written by the agent, no libraries. 视频: 1920x1080, 55 s.

视频: https://subclipweb.subclip.app/agent-skills/community/examples/opus-creates-webgpu-film/opus-5.5-claude-code.mp4?v=3

联系表: https://subclipweb.subclip.app/agent-skills/community/examples/opus-creates-webgpu-film/opus-5.5-claude-code-contact-sheet.jpg

在 Claude Code 中用约 152 分钟分三个阶段完成（开场验证、完整短片、修复一轮），指定模型为 claude-opus-5-5，推理强度 xhigh，运行在一块共享的 RTX 5090 上。渲染器约 2,500 行 JavaScript 和 WGSL，不用任何库：FFT 海洋，300 米高、带 14 万个水滴的浪冠爆炸，沿同一个浪面生长的大教堂，6,144 块碎片展开成由预烘焙 boids 鸟群驱动的 22 个三角形组成的飞鸟，2,640 座高楼，以及 110 万颗星的星系。每一行输入的代码都会被执行，引擎只读取它的结果。检查项：完整解码，-14.1 LUFS，0.93 秒真正的数字静音，每秒最多一次闪烁，以及一次亮度审查，发现并修复了镜头跳变和一个过期的反射缓冲。自述弱点：它从没听过声音也没看过视频，开场的环形浪墙有点像岩石，城市走廊重复感强，最近的飞鸟会拖成条带。

原始文件：https://github.com/RezAIT00/agent-demos/tree/main/prompts/creates-everything/generations/opus-5.5-claude-code。我们的副本：https://github.com/subclip-app/agent-demos/tree/main/prompts/creates-everything/generations/opus-5.5-claude-code

## 在 Subclip 中制作

1. **从节拍表开始.** 通过 Subclip MCP 把 Claude Code 或 Codex 连接到 Subclip AI Editor，新建一个 1920x1080、60 fps、时长 55 秒的项目。保留提示词里输入代码行和回车时间的表格：它就是你的时间线。让智能体先写出创意说明，等你确认后再继续。
2. **先测试 WebGPU.** 对渲染器要实事求是：Subclip 的图层渲染器和导出流程对 WebGPU 和重度 WebGL2 的支持尚未验证。先做一个 5 秒的测试图层，在预览和导出的 MP4 中都检查一遍，如果其中任何一个出现黑屏或卡顿，准备好 Canvas2D 或普通 WebGL 的备用方案。这个提示词依赖一个每帧 32 个子帧的自定义 WebGPU 路径渲染器，所以这次测试决定了整个计划。如果失败，就要求用 WebGL2 或 Canvas2D 以较低目标做出同样的世界，并在说明中写明。
3. **每个世界一个图层，共用一个时钟.** 用 `add_runtime_layer` 把每个世界做成一个运行时图层，并用 `validate_runtime_layer_source` 校验，所有图层读取同一个时间值，这样变换在图层之间保持连续。[HyperFrames motion layers](https://www.subclip.app/zh/agent-skills/community/hyperframes-motion-layers) 技能讲解了图层约定。保留提示词的规则：每一帧都是时间的纯函数，随机数使用固定种子。时间线可以随意拖动，所以任何东西都不能依赖前一帧。
4. **声音：按提示词要求用代码合成.** 这个提示词要求配乐和音效设计用代码合成，所以让智能体把它们渲染成音频文件，作为音频项放到时间线上，锁定在 120 BPM 的节拍网格上。导出后检查响度，因为提示词要求 -14 LUFS。
5. **像挑剔的观众一样审片，然后导出.** 每完成一个段落，就让智能体调用 `get_timeline_contact_sheet`，再对关键时刻（第一帧、每次大的变换、最后一帧）调用 `view_frame`。静帧看不出运动问题，所以批准之前要在预览里按播放看一遍。提示词自带的审查仍然适用：排查单帧亮度跳变和闪烁。然后用 `export_video` 导出 MP4。

## 相关社区技能

- https://www.subclip.app/zh/agent-skills/community/hyperframes-motion-layers
- https://www.subclip.app/zh/agent-skills/community/threejs-3d-scenes
- https://www.subclip.app/zh/agent-skills/community/motion-polish

## 来源与署名

提示词和生成结果作者：**Rez**（[@RezAIT00](https://x.com/RezAIT00)），来自 [github.com/RezAIT00/agent-demos](https://github.com/RezAIT00/agent-demos)。我们的仓库副本：[github.com/subclip-app/agent-demos](https://github.com/subclip-app/agent-demos)。这部短片由 **CF**（[@cfenghub](https://x.com/cfenghub)）在 X 上[通过这条帖子](https://x.com/cfenghub/status/2125792113656746197)分享，提示词在回复中。

原始提示词文件夹：https://github.com/RezAIT00/agent-demos/tree/main/prompts/creates-everything。我们的副本：https://github.com/subclip-app/agent-demos/tree/main/prompts/creates-everything

[全部示例](https://www.subclip.app/zh/agent-skills/community/examples)