视频 · Claude
火柴人励志砸墙短视频
用代码绘制的扁平火柴人短视频提示词,主角用锤子连续砸碎三面墙,冲破最后一面后抵达旗帜,夜色转为黎明。
Prompt
<inputs>
请向我索取:按从弱到强排列的四面墙(默认:REJECTION, FAILURE, HEARTBREAK, SELF-DOUBT)、旗帜上的目标词(默认:SUCCESS)、三行字幕(默认:"Life will put / walls in your way."、"Some will / knock you down."、"Get up. Hit harder. / Break through."),以及我是否有自己的音效包(如果没有,就使用下载的免版税音效)。时长固定为16秒。
</inputs>
<direction>
一部扁平2D矢量励志短片,720x1280,30fps,完全用代码在一块2D画布上绘制。一个连续的固定机位镜头,无切换。跑者保持在画面左侧三分之一附近,世界以400px/秒的速度从他身边滚动而过。
天空:三段式竖向渐变(顶部、60%处、地平线),随故事变化。0s时接近纯黑 #020305 / #04050a / #0a0c15。5.5s时为深海军蓝,带紫色地平线 #06071a / #0b0c22 / #241c34。8.6-10.3s时,在他蓄力时逐渐变亮为钢蓝色 #16223d / #1d2c4b / #26375a。11.2s时回到深海军蓝 #0b1028 / #10162f / #1b1a32。12.6-14s时为黎明色 #1a1f46 / #3d3760 / #8a5c50。约140颗细小星星,以25-60%的不透明度缓慢闪烁,并在黎明时淡出。
山脉:两层宽阔柔和的圆峰,用二次曲线绘制,无轮廓线。远景层高330-410px,比天空更亮(夜晚 #0c0f19,蓝色峰值时 #1a2440,黎明 #121d24)。近景层高150-230px,颜色更深(#06070c、#0e1424、#0a1214)。视差:星空 .05,远景 .12,近景 .28,地面 1.0。
地面:地面线位于 y=880。泥土色 #1a150f,到底部5%处渐变为纯黑,地面线上有细小的深色草丛剪影,线下排列着一行小灰石子。黎明时泥土转暖为 #3d2d1e,并带有零星的深色斑点。
跑者:白色火柴人,由圆头线条构成(肢体长度18-20px,躯干22px)。头部半径28,带一个小小的深色圆点眼睛,深色耳罩式耳机(头顶一条带子,后脑勺一个耳罩)。远侧四肢颜色稍暗,为 #d3d9e2。髋部位于 x=215, y=772;躯干114px,大腿和小腿各58px。他原地跑动,呈弹跳式、屈膝小跑(每滚动170px为一步,髋部起伏10px,身体略微前倾)。
携带姿势:锤子横搭在他肩上。双手位于下巴高度,就在脸前方。锤柄向后并略微向上指(约-168°),锤头位于头部后方、与脸同高。
锤子:长度74px的棕色锤柄 #8a5a32,带深色缠绕条纹。锤头为40x58的银色 #cdd3db 圆角方块,上有深色 #262b33 嵌板,嵌板上带一个浅色锯齿符文和一条竖线。他扛着锤子时,每半秒锤头周围都会闪现一小段蓝色电弧。绝不能看起来像任何电影里的锤子。
墙体,标签使用白色 Inter 700 字体直接印在材质上(无标签或方框):
- 墙1:木质路障 140x190,两根 #8a5530 立柱和四块带钉点的 #a46a3b 木板,标签位于第三块木板上,颜色为奶油色 #fbe9d6
- 墙2:红砖墙 140x222,#a63d2c 砖块采用错缝砌法,灰缝为浅色 #d9a99a
- 墙3:玻璃板 150x242,深海军蓝 #1c2838,带浅灰色 #c8d0da 边框,并有两道斜向的浅色条纹
- 墙4:混凝土板 186x416,灰色从 #a2a4a8 渐变到 #8e9094,带两条淡淡的水平接缝,标签为浅灰色
旗帜:一根细白旗杆,高438px,顶端有一个球,旗面为 170x112 的亮绿色 #2fd47a,沿行进的正弦波飘动,目标词以白色 Inter 700 20px 居中显示。
闪电:锯齿状中点位移闪电,带白色核心、#9ccaff 中层笔画和柔和的 #7fb8ff 光晕,另加2-3条细分支。每道闪电每一帧重新随机生成,并且亮度闪烁。
字体:仅使用 Inter 700。字幕为白色,37px,居中,两行分别位于 y=134 和 y=180,带句号,无底框,无阴影。字幕淡入淡出时长为0.25s。
后期:柔和暗角,颜色为 rgba(0,0,0,.3),并加入5%的胶片颗粒,每秒重新随机24次。
禁止项:切换镜头、背景描边、火柴人使用渐变、字幕逐词弹出、深色标签上的文字、永远残留的碎屑、AI 图像或 AI 视频、受版权保护的角色或电影道具、旁白配音、标志或水印。
</direction>
<structure>
16 秒。墙1-3 在2秒的节拍上被砸碎;墙4 先获胜;随后是逆转反击。
墙1-3 的击打动作,按以下顺序:
1. 蓄力(击打-0.24s):他跃起42px,收起膝盖,将锤子向上并向后甩过头顶。
2. 打击(击打-0.07s):他在肩膀高度将锤子水平向前猛推,使锤头落在墙的顶边。
3. 闪电:一道来自天空的闪电击中锤头0.17s,天空闪过蓝光。
4. 破碎:墙体在0.02s后破裂,墙基处升起一团白色尘雾。
5. 恢复:在击打+0.48s时,他回到携带姿势。
时间线:奔跑中,字幕1从第0帧(0s)起可见 → 墙1已在画面中,他将其砸碎,木板和立柱向前飞出并平躺落地(0.5s)→ 墙2进入(约1.5s),他将其砸碎,砖块先腾起成一团再堆叠(2.5s)→ 墙3进入,他将其击碎,透明碎片原地落下(4.5s)→ 所有碎屑在其被击后2-2.8s淡出 → 墙4以全速滑入,滚动在6.55s处猛然停止,其左边缘位于 x=376 → 他将锤子直直举起,锤子伴着噼啪声蓄力(6.3-6.58s)→ 橙色 #ff7a4a / #ffc070 火花从石板左上角迸发,并在那里出现黑色放射状裂纹,石板不破碎(6.6s)→ 字幕1淡出(6.85-7.1s),他向后仰面摔倒,头朝左,仍紧握锤子,锤子竖直立在他脚边(6.82-7.35s)→ 字幕2进入,他静静躺着(7.35-7.9s)→ 他坐起来,身前握着锤子(7.9-8.25s),然后站起(8.25-8.55s)→ 他向前走到髋部 x=300 处,将锤子向前上方抵住开裂的角落(8.55-9.05s)→ 一道持续闪烁的闪电击中锤子,小电弧从锤子跳向石板,接触点处有暖色光晕,天空转为钢蓝色,裂纹扩散(9.0-9.9s)→ 在9.9s时出现一道大闪电、强烈的蓝色天空闪光以及12px的震动,石板变成一个3x7的灰色方块堆(每块带X形阴影),保持形状并颤抖0.25s,然后从上到下坍塌,并在10.6s前淡出,字幕2淡出(9.95-10.15s)→ 他摆动锤子回到携带姿势,滚动以460px/秒重新开始,他漂回到 x=215(10.45-11.4s)→ 字幕3进入(10.95s)→ 旗杆滑入,滚动在旗杆位于 x=374 时停止(11.9-12.5s)→ 天空过渡为黎明,淡色太阳 #f8dc9c(半径44)从山后升起,至 (466, 346),带有暖色330px光晕,旗帜后方逐渐形成绿色光芒(12.6-14s)→ 他双手将锤子笔直举过头顶,锤子持续噼啪作响,小电弧约在13.9s和15.0s击中它,并伴有轻柔的3px待机起伏,直到16s。
对于其他主题,保持相同结构:三道难度逐级递增的障碍,在2秒的节拍上伴随闪电被砸碎;第四道障碍获胜并将他击倒;在地面上停留一拍;随后对同一障碍发起逆转蓄力,它碎成方块;他跑向终点,夜色转为黎明。
</structure>
<build>
1. 一个 HTML 文件。每一帧都是时间的纯函数:seek(t) 绘制第 t 帧。不使用计时器,不使用 CSS 动画,所有随机值都来自带种子的随机数生成器,因此任何一帧都能被完全相同地重绘。
2. 滚动位置是速度曲线的积分(400px/秒;在6.2-6.55s期间减速至0;保持0直到10.45s;在0.4s内加速至460px/秒;在11.9-12.5s期间减速至0)。以1ms为步长预先计算。将每面墙放置在世界坐标中,使其左边缘恰好位于击打时锤头落下的位置。
3. 人物采用骨骼结构:先确定髋部位置和身体旋转,然后为每条腿设定大腿和小腿角度,手臂通过双骨 IK 求解,手放置在锤柄上。锤子姿态仅由一个角度加上从肩到手的伸展距离构成。所有姿态变化均使用 easeOutCubic 或 easeInOutCubic,击打和落地时通过阻尼弹簧产生挤压与拉伸效果(阻尼 .45,频率14)。
4. 碎屑在加载时根据种子模拟一次(重力 2200px/秒²,两次带阻尼的弹跳,然后平躺静止),并按时间查找。屏幕震动呈指数衰减:每次砸碎时为6px,石板落地时为5px,他摔倒时为6px,最后一击时为12px。
5. 将天空、山脉和地面颜色设为故事时钟上的关键帧,并使用 easeInOutCubic 在它们之间过渡。
6. 使用 Playwright 在无头 Chrome 中以 720x1280 渲染:以30fps对每一帧进行 seek,并混合2个子帧(帧的±0.25)以产生运动模糊。将 JPEG 通过管道输入 ffmpeg,使用 libx264 编码,CRF 16,yuv420p,并加上 +faststart。
7. 声音:如果我上传自己的音效包,就使用它;否则下载免版税音效。将每个音效的峰值与其对应帧对齐:
- 0.5s、2.5s、4.5s:蓄力时的呼啸声加上雷声炸裂,随后是木裂声、砖块碎裂声和玻璃破碎声
- 6.55s:石板落地时的沉重闷响
- 6.6s:伴随火花的金属撞击声
- 7.35s:身体倒地声
- 9.0-9.9s:电流噼啪声逐渐增强
- 9.9s:伴随岩石崩塌的巨大雷击声
- 10.45s:他再次奔跑时的呼啸声
- 12.6s:通往日出的柔和渐强音
- 13.9s和15.0s:小型电击声
添加一段节奏感强的电影感配乐底层,在夜晚段落保持紧张,在日出时提升,并比击打音效低 6dB。使用限制器进行母带处理,目标为 -14 LUFS,真峰值 -1.5dB。
</build>
<gotchas>
墙体必须与地面速度完全一致地滚动,否则它们会像在冰面上滑行。击打帧上,锤头必须接触墙体的顶边:根据肩部位置求解击打角度,不要凭目测。碎屑必须先向前飞出再淡出,否则随着地面滚动,它们会堆积在跑者身后。破碎的立柱和木板在落定后要平放;绝不能让高大的碎片直立。墙4的弱击会产生火花和裂纹,但没有闪电,也不会使墙体破碎,从而让最后一击显得更加强大。方块堆在坍塌前必须保持形状一拍,否则破碎看起来像故障。碎屑和闪电必须避开字幕区域。在最终渲染之前,给我看一张以2帧/秒生成的联系表。
</gotchas>
<start>
先向我询问输入项,给我看包含我的墙体、字幕和目标词的节拍表,然后构建、展示联系表并渲染视频。
</start><inputs>
Ask me for: the four walls in order from weakest to strongest (default: REJECTION, FAILURE, HEARTBREAK, SELF-DOUBT), the goal word on the flag (default: SUCCESS), the three caption lines (default: "Life will put / walls in your way.", "Some will / knock you down.", "Get up. Hit harder. / Break through."), and whether I have my own sound effects pack (if not, use downloaded royalty-free sound effects). The length is fixed at 16 seconds.
</inputs>
<direction>
A flat 2D vector motivational short at 720x1280, 30fps, drawn entirely in code on one 2D canvas. One continuous locked-off shot, no cuts. The runner stays near the left third and the world scrolls past him at 400px/s.
Sky: a three-stop vertical gradient (top, 60%, horizon) that changes with the story. 0s near black #020305 / #04050a / #0a0c15. 5.5s dark navy with a purple horizon #06071a / #0b0c22 / #241c34. 8.6-10.3s it brightens to steel blue #16223d / #1d2c4b / #26375a while he charges. 11.2s back to dark navy #0b1028 / #10162f / #1b1a32. 12.6-14s dawn #1a1f46 / #3d3760 / #8a5c50. About 140 tiny stars at 25-60% opacity twinkle slowly and fade out at dawn.
Mountains: two layers of broad, soft rounded peaks drawn with quadratic curves, no outlines. The far layer is 330-410px tall and lighter than the sky (#0c0f19 at night, #1a2440 at the blue peak, #121d24 at dawn). The near layer is 150-230px tall and darker (#06070c, #0e1424, #0a1214). Parallax: stars .05, far .12, near .28, ground 1.0.
Ground: the ground line is at y=880. Dirt #1a150f fading to pure black by the bottom 5%, with tiny dark grass-tuft silhouettes on the line and a row of small grey pebbles just under it. At dawn the dirt warms to #3d2d1e with scattered dark spots.
The runner: a white stickman made of round-capped strokes (limbs 18-20px, torso 22px). Head radius 28 with one small dark dot eye, dark over-ear headphones (a band over the top and an ear cup on the back of the head). Far-side limbs are a slightly dimmer #d3d9e2. Hip at x=215, y=772; torso 114px, thigh and shin 58px each. He runs in place with a bouncy, knees-bent jog (one stride per 170px of scroll, 10px hip bounce, slight forward lean).
The carry pose: the hammer rests across his shoulder. Both hands are at chin level just in front of the face. The handle points back and slightly up (about -168°), with the hammer head just behind his head at face height.
The hammer: a 74px brown #8a5a32 handle with dark wrap stripes. The head is a 40x58 silver #cdd3db rounded block with a dark #262b33 inset panel carrying a pale zigzag rune and a vertical line. Small blue crackles flicker around the head every half second while he carries it. It must not look like any film's hammer.
The walls, labels in white Inter 700 set directly on the material (no tag or box):
- wall 1: wooden barricade 140x190, two #8a5530 posts and four #a46a3b planks with nail dots, label on the third plank in cream #fbe9d6
- wall 2: red brick wall 140x222, #a63d2c bricks in a running bond with pale #d9a99a mortar
- wall 3: glass pane 150x242, dark navy #1c2838 with a light grey #c8d0da frame and two diagonal pale streaks
- wall 4: concrete slab 186x416, grey #a2a4a8 to #8e9094 with two faint horizontal seams, label in light grey
The flag: a thin white pole 438px tall with a ball on top and a 170x112 bright green #2fd47a banner that waves on a travelling sine wave, the goal word centred in white Inter 700 20px.
Lightning: jagged midpoint-displacement bolts with a white core, a #9ccaff mid stroke and a soft #7fb8ff glow, plus 2-3 thin branches. Each bolt re-randomises every frame and flickers in brightness.
Type: Inter 700 only. Captions are white, 37px, centred, two lines at y=134 and y=180, with full stops, no box, no shadow. They fade in and out over 0.25s.
Finish: a soft vignette to rgba(0,0,0,.3) and a 5% film grain re-randomised 24 times a second.
Banned: cuts, outlines on the background, gradients on the stickman, captions that pop in word by word, labels on dark tags, debris that lingers forever, AI images or AI video, copyrighted characters or movie props, a voiceover, a logo or watermark.
</direction>
<structure>
16 seconds. Walls 1-3 are smashed on a 2-second beat; wall 4 wins first; then the comeback.
The hit move for walls 1-3, in this order:
1. Wind-up (hit-0.24s): he jumps 42px, tucks his knees and swings the hammer up and back over his head.
2. Strike (hit-0.07s): he thrusts it forward flat at shoulder height so the head lands on the top edge of the wall.
3. Lightning: a bolt from the sky hits the hammer head for 0.17s and the sky flashes blue.
4. Break: the wall breaks 0.02s later and a white dust cloud puffs at its base.
5. Recover: he returns to the carry pose by hit+0.48s.
Timeline: running, caption 1 visible from frame 0 (0s) → wall 1 is already on screen and he smashes it, planks and posts fly forward and land flat (0.5s) → wall 2 enters (about 1.5s) and he smashes it, bricks burst up in a cloud then pile (2.5s) → wall 3 enters and he shatters it, transparent shards drop in place (4.5s) → all debris fades out 2-2.8s after its hit → wall 4 slides in at full speed and the scroll stops hard at 6.55s with its left edge at x=376 → he raises the hammer straight up, it charges with crackles (6.3-6.58s) → orange #ff7a4a / #ffc070 sparks burst from the slab's upper-left corner and black radial cracks appear there, the slab doesn't break (6.6s) → caption 1 fades out (6.85-7.1s) and he is thrown backward onto his back, head to the left, still gripping the hammer, which lies upright by his feet (6.82-7.35s) → caption 2 in, he lies still (7.35-7.9s) → he sits up holding the hammer in front (7.9-8.25s), then stands (8.25-8.55s) → he walks forward to hip x=300 and presses the hammer forward-up against the cracked corner (8.55-9.05s) → a continuous flickering bolt hits the hammer, small arcs jump from hammer to slab, a warm glow sits at the contact point, the sky brightens to steel blue and the cracks spread (9.0-9.9s) → at 9.9s a big bolt, a strong blue sky flash and 12px shake, and the slab turns into a 3x7 stack of grey cubes (each with an X shading) that holds its shape and trembles for 0.25s, then collapses top to bottom and fades by 10.6s, caption 2 fades out (9.95-10.15s) → he swings back to carry, scrolling restarts at 460px/s and he drifts back to x=215 (10.45-11.4s) → caption 3 in (10.95s) → the flagpole slides in and the scroll stops with the pole at x=374 (11.9-12.5s) → the sky blends to dawn, a pale #f8dc9c sun (radius 44) rises from behind the hills to (466, 346) with a warm 330px halo, and a green glow builds behind the flag (12.6-14s) → he raises the hammer straight overhead with both hands, it crackles constantly, and small bolts strike it at about 13.9s and 15.0s, with a gentle 3px idle bob until 16s.
For any other topic, keep the same shape: three obstacles of rising toughness smashed on a 2-second beat with lightning, a fourth that wins and knocks him down, a beat on the ground, the comeback charge against the same obstacle, it crumbles into cubes, he runs to a goal and the night turns to dawn.
</structure>
<build>
1. One HTML file. Every frame is a pure function of time: seek(t) draws frame t. No timers, no CSS animation, and every random value comes from a seeded RNG so any frame can be redrawn identically.
2. Scroll position is the integral of a speed curve (400px/s; brake to 0 over 6.2-6.55s; 0 until 10.45s; ramp to 460px/s over 0.4s; brake to 0 over 11.9-12.5s). Precompute it in 1ms steps. Place each wall in world coordinates so its left edge is exactly where the hammer head lands at its hit time.
3. The figure is a skeleton: the hip position and body rotation, then thigh and shin angles per leg, and the arms solved with two-bone IK to hands placed along the hammer handle. The hammer pose is just an angle plus a shoulder-to-hand reach. Every pose change uses easeOutCubic or easeInOutCubic, and hits and landings get squash and stretch on a damped spring (damping .45, frequency 14).
4. Debris is simulated once at load from a seed (gravity 2200px/s², two damped bounces, then it settles flat) and looked up by time. Screen shake decays exponentially: 6px on each smash, 5px when the slab lands, 6px on his fall and 12px on the final strike.
5. Keep the sky, mountain and ground colours as keyframes on the story clock and blend between them with easeInOutCubic.
6. Render with Playwright in headless Chrome at 720x1280: seek every frame at 30fps and blend 2 subframes (±0.25 of a frame) for motion blur. Pipe the JPEGs into ffmpeg and encode libx264 at CRF 16, yuv420p, with +faststart.
7. Sound: if I upload my sound effects pack, use it; otherwise download royalty-free effects. Peak-align each one to its frame:
- 0.5s, 2.5s, 4.5s: a whoosh on the wind-up plus a thunder crack, followed by wood crack, brick crumble and glass shatter
- 6.55s: heavy thud as the slab lands
- 6.6s: metallic clang with sparks
- 7.35s: body fall
- 9.0-9.9s: electric crackle build
- 9.9s: big thunder strike with a rock collapse
- 10.45s: whoosh as he runs again
- 12.6s: soft riser into the sunrise
- 13.9s and 15.0s: small zaps
Add a driving cinematic music bed that stays tense through the night section and lifts at the sunrise, 6dB under the hits. Master with a limiter to -14 LUFS, -1.5dB true peak.
</build>
<gotchas>
The walls must scroll at exactly the ground speed or they slide like they're on ice. The hammer head has to touch the wall's top edge on the hit frame: solve the strike angle from the shoulder position, don't eyeball it. Debris must fly forward and then fade, or it piles up behind the runner as the ground scrolls. Lay broken posts and planks flat when they settle; never leave tall pieces standing upright. The weak hit on wall 4 gets sparks and cracks but no lightning bolt and no wall break, so the final strike reads as much bigger. The cube stack must hold its shape for a beat before collapsing, or the break looks like a glitch. Keep the debris and bolts clear of the caption area. Show me a contact sheet at 2 frames per second before the final render.
</gotchas>
<start>
Ask me the inputs, show me the beat sheet with my walls, captions and goal word, then build, show the contact sheet and render the video.
</start>
使用建议
适合做励志类竖版短视频,替换四面墙的文字、目标词和字幕后再生成。