用 Opus 5.5 代码绘制 2D 动画广告短片
作者把爆款 2D 动画视频的套路做成提示词:让 Claude Opus 5.5 用 HTML canvas 逐帧画 1080x1920、60fps 的 40 秒竖屏短片,把产品藏进类型故事里当广告。

this guy is a genuis he makes these 2d roblox videos with claude opus 5.5 almost every single one of his videos is hitting a million views so i turned it into an ad creative for a brand just give claude this prompt and itll make a fully polished ad creative for your brand and its not in the roblox style its in a 2d animation style like his without the robloxy-y looking characters here is the prompt -> <inputs> Ask me for: the product (a real one I give you, or invent a fake brand so there are no brand issues), the genre the story hides inside (detective, alien invasion, heist, nature doc, cooking show), and where it will be posted (it decides the follow handle). If I have no idea, pitch me 3 "What if" stories that each hide the product inside a genre, and let me pick. Ask which voice tool I have: ElevenLabs (about 1,000 credits a Short) or free Kokoro run locally. Tell me no image or video model is needed, because every frame is drawn in code. Then show me the script with word counts and seconds per line, a rough storyboard, and a cast sheet before anything costs money. </inputs> <direction> A 1080x1920, 60 fps, 40-45 s vertical Short: a 2D "What if" kid cartoon that is secretly an ad, drawn entirely on an HTML canvas in code. Not 3D, not AI images, not a Roblox look. It borrows the big What-if channels' rhythm (DAY/CASE cards, a HUD counter, poofs, pop-in captions, a rewind loop) but every character and outfit is original. The ad formula (from the best Pixar-style AI ads): - Cold open in a genre with no product mention for the first beats; the viewer thinks it is a story. - The product enters as a plot device (the evidence, the stolen thing, the reason someone wins), never as an ad. - The twist is the product's benefit turned into a punchline ("too good to share", "too hard to kill"). - End on one glossy packshot: the product spinning in on a sunburst with a 2-line tagline. Characters: short, chibi, cartoony, one shared rig for the whole cast. - Big round head (radius 150 at scale 1, slightly wider than tall), small pear-shaped body, stubby rounded legs and arms ending in round mitten hands, oval shoes with a coloured sole. Adults are taller (1.2-1.3x body), little siblings 0.82x. - Every shape has an 8 px #2a1b3d outline and one soft darker shade on its right edge only (a thin crescent, never half the face). - Hair is smooth rounded shapes: a cap that covers the whole crown, a soft side swoop, a bowl cut, a side part, a ponytail hanging BEHIND the head. Never spikes or zigzags. - Give every character their own outfit; never copy a reference creator's character clothes 1:1. Example cast: detective kid (tan belted trench coat, red scarf wrap, brown fedora with a band), little brother (red-white striped tee, blue overalls, bowl cut), Mom (black hair, yellow headband, ponytail, coral sweater, green pants), Dad (side part, short jaw beard, round thin glasses, green sweater vest, white shirt, blue tie), dog (white with a brown eye patch and floppy brown ears). - Faces carry the comedy. Eyes: normal (white with a big pupil and two highlights), huge, happy arcs, closed, star, spiral, narrow. Brows: up, worry, angry, flat (mirror them per eye so worry never reads as angry). Mouths: smile, grin, wide, scream (one clean open shape with teeth band and tongue), o, flat, smirk, wavy, chew (puffed cheeks). Plus blush, sweat drops and sunglasses that drop in. Blink for 0.1 s about every 1.6 s. Mouths flap only while that character's words are being spoken. Sets: detailed flat rooms in saturated colours with thick outlines, each with a night version (darker blue grade plus warm lamp glows): a kitchen (wallpaper, upper cabinets, window with curtains and sky, jar shelf, plant, clock, pendant lamp, tiled backsplash, drawer counter, checker floor) and a bedroom (striped wall, window, poster, toy shelf, bed with a star blanket, nightstand lamp, plank floor, rug). Bursting sunburst colours for montages and the packshot. Fonts (all free, from Google Fonts' GitHub repo): - Captions: Lilita One. - Day/CASE cards and big world words: Luckiest Guy. - The product wrapper text: Sniglet ExtraBold, auto-fitted so it never clips. Captions: - 1-2 words at a time in Lilita One 94 px, centred at y 1600 (on the legs, never across a face), max 900 px wide. - White with a 20 px #1c1030 outline and a soft shadow, popping from 55% to 100% in 0.16 s. - Key words in caps and colour: red #ff5165, green #5dff8f, yellow #ffd23f, pink #ff7ad9, cyan #7debff, orange #ffa53d, purple #c49bff. - No full stops or commas on screen, ever. Hide captions on the packshot. Fake game UI over the world: - A HUD counter pill (260x92, centred at x 540, y 196) with a tiny product icon that tracks the story (snacks stolen, clues found) and ticks with a green "+N". - CASE/DAY cards: Luckiest Guy 230 px in yellow #ffd23f with a 38 px outline, tilted -6 degrees, popping in over 0.22 s and leaving at 1.05 s. - Toast pills (88 px tall at y 374), a FOLLOW button with the handle chip and a cursor that presses it (it turns green "FOLLOWING"). Motion: something moves on every line, and the picture changes every 1-3 s. - Things arrive with a squash (0.72, 1.12, 0.95, 1 over 0.3 s), an overshoot ease or a white poof cloud with stars, never a plain fade. - Characters breathe (1.2% squash) all the time. - The camera pushes in 5-15% per shot, stays inside the set, and shakes (decaying over 0.35 s) on every hit. Banned: real logos or real creators' characters, AI stills, spiky hair, a frame that holds still for more than 1 s, captions over faces, system fallback fonts, whispered narration. </direction> <structure> Length: 40-45 s, 85-100 words, 14 lines. Times below are from the 40.3 s "Snack Detective" ad; key every beat to a real word. 0-5 s: the narrator reads the title as line 1 ("What if you were a detective and someone kept stealing your snacks?") over the striking picture (crime-scene tape round an empty drawer; the hero poofs in on "detective"; the drawer slides open empty). 5-8 s: the hero's line that proves it ("My Krunchkin bar! GONE!"): spiral eyes, scream, a toast pill ("CASE OPENED"), the HUD appears with +1. 8-13 s: CASE 1. Suspect one (little brother with chocolate on his face, a magnifier finds it) and a tiny excuse line ("It's paint!"). 13-17 s: CASE 2, bigger. HUD +1. A second suspect (the dog) looks guilty, the wrapper slides out. 17-21 s: CASE 3, the biggest. HUD +3. A third suspect (Dad "on a diet", a bar in his pocket) with a callback pop-in of suspect one pointing. 21-24.5 s: the follow beat told inside the story ("Follow, and the detective gets one more clue"): the button is pressed about 0.5 s into the line and a clue card drops in. 24.5-26.5 s: the turn begins ("So you set a trap"): night, a spotlight on the product as bait. 26.5-29 s: a 3-shot montage with no voice (0.85 s each on bursting colours): DUST!, NIGHT CAM (green tint, REC), RING RING! The counter races to 999. 29-30 s: the hero's line ("Got you!"): flashlight snaps on. The music cuts dead. 30-35 s: the twist: the fridge light floods on, it is Mom, chewing ("They're too crunchy to share, sweetie"), sunglasses drop in. 35-37.5 s: the packshot ("Krunchkin. Too good to share."): the bar spins in, crumbs fly, TOO GOOD / TO SHARE pops in. 37.5-39.8 s: a short tag from the hero ("Wait, there's a whole box?") as Mom slides a giant box into frame, HUD +94. last 0.55 s: REWIND. The whole film scrubs backwards to frame 0 with scanlines and a REWIND label, so the end loops into the start. </structure> <build> 1. Tools (free): Python 3 with numpy, scipy and Pillow, FFmpeg, Node with Playwright and its Chromium, faster-whisper large-v3-turbo (int8 on the CPU), git for fonts. Install what's missing and tell me what you installed. 2. Script and storyboard first: - "you" and "your" point of view, the title as line 1, one picture per line, 10-16 words at most per line, words a 10-year-old uses, no names. - Draw the storyboard with the real rig and real fonts (15 panels at 1080x1920, tiled with times, speaker and line), and a cast lineup. Zoom in on every character at full size and fix hair, hats, glasses, mouths and outfits before showing me. 3. Voice: ElevenLabs eleven_v3 with stock library voices, one take per character, all of that character's lines in one request separated by blank lines. - Narrator: an energetic young male creator voice (Liam). Hero kid: a playful bright voice (Jessica). Mom: sassy (Laura). Little brother: the kid voice pitched up 3 semitones afterwards. - Audio tags: [excited], [screaming], [nervously], [sweetly], [mischievously], [confused]. Write numbers as words ("Case one"). - Ask before spending credits. Check the API key's own credit cap before the big narrator request. - Run faster-whisper with word timestamps on each take. Match lines by word count with difflib, refine each line's edges on the audio itself (pad 0.06 s before, 0.15 s after). - Squeeze pauses inside a line to 0.22 s. Leave 0.2 s between lines, 0.33 s before each CASE line, and a 2.55 s silent slot for the montage. - Level every take to the narrator's median. Word times on the finished track come from the take times plus the assembly offsets, so every cut, card, caption and sound starts on a real word. 4. Film (free): one HTML page with one canvas, where every frame is a pure function of time: http://window.seek(t), window.READY, window.END. - A SHOTS list of [start, end, function] keyed to word times (cuts land 0.04 s before their word). Each shot sets a camera (centre, zoom over time, clamped to the set), draws its world and characters, and the overlays (HUD, cards, toasts, follow button, captions) draw in screen space on top. - One rig function draws every character from a pose: x, y, scale, squash, rotation, flip, arm and leg angles, head tilt, eyes, brows, mouth, look, blush, sweat, shades, prop. Hand positions come from the same arm maths, so props (magnifier, flashlight, product, salad, paintbrush) sit in the hand. 5. Check before render: contact sheets at the start and end of every line on the real timing. Fix captions over faces, props out of frame, cards over heads, camera past the set edge, and any text that clips. 6. Render (free): seek 120 subframes a second in headless Chromium, pipe JPEG screenshots to FFmpeg, blend pairs with tmix for motion blur at 60 fps (about 8 min for 40 s on 2 CPUs). Encode the upload copy with libx264 CRF 20, preset slow, AAC 256k (about 26 MB). 7. Sound (free, Mixkit): - Music: one playful bed ("Comical"), about 19 dB under the voice. Cut it dead on the two big moments (the trap springing and the twist reveal), back on the packshot. - Effects placed so each one's loudest moment lands on its frame: a poof on arrivals, pops and whooshes on cards, a coin ding on every counter tick, a glint on the magnifier, a boing on silly pop-ins, a slam on screams, a click and slam on the flashlight, a gasp and sting on the reveal, a crunch on the product, a party horn on the tagline, a rewind sound on the loop. - Effects on speech 12 dB under the voice, in gaps 4 dB under. Measure voice versus everything else per line and duck the rest under any line below 15.5 dB (the worst line should end at 15.5 dB or more). - Two-pass loudnorm to -14 LUFS, true peak -1.5. 8. Final checks: no frame still for over 1 s outside a deliberate beat, captions on their words, and a look at 15 frames across the finished file before delivering. </build> <gotchas> - My workspace's own internet is blocked; fonts come from Google Fonts' GitHub repo with a sparse git clone (ofl/lilitaone, apache/luckiestguy, ofl/sniglet). Never fall back to DejaVu or another system font. - A browser tab can call ElevenLabs but cannot save files into my folders. Record the voices with a small .bat on my PC that curls the API into the project's Raw folder, and runs faster-whisper there in the same double-click. - An ElevenLabs API key can have its own credit cap below the account balance. A refused request returns quota_exceeded; log the response body so the reason is visible. - Whisper writes "1" for "one" and drops "!" and "..."; match lines by word count, not exact text. - Spiky or zig-zag hair always looks broken. Use smooth bezier hair caps whose top reaches above the head's crown, or the crown shows as a bald band. - A ponytail drawn in front of the body covers held props; hang it behind the head on the far side. - Square glasses crash into the brows; use round thin rims centred on the eyes with the brows above them. - A hanging scarf tail reads as a tie; use a neck wrap with a small side knot. - Big shading ellipses split faces in half; keep the shade a thin crescent on one edge. - Plain script tags share one global scope: a page variable named like a helper function (window.N vs function N) blanks the whole page. Prefix names. - A zoomed camera centre near the floor shows black past the set edge. Clamp the camera centre to the set for its zoom. - Captions at y 1290 and 124 px covered faces in every close-up; 94 px at y 1600 sits on the legs. - Hits placed on screamed words ("GONE!", "box?") pushed the voice under 15 dB; check per line and duck before normalising. - The follow beat is one swappable shot: change the handle per platform and re-render only that. </gotchas> <start> Ask me for the product and the genre, or pitch 3. Then show me the script (word count and seconds per line), the storyboard and the cast sheet before any voice is generated. </start>
这条是引用着另一条写的:x.com/caesarscales/status/2119395056767603175