ai21.net
語言

代碼生成的像素藝術人生故事短片

示範影片

代碼生成的像素藝術人生故事短片 — 1代碼生成的像素藝術人生故事短片 — 2

提示詞

<inputs>
Ask me for: a voiceover or song with a spoken line (the audio file) and its transcript, 10-12 small objects that sum up my life, two silhouettes to light like a heat camera (a head in profile and a raised hand), and the 3 words I want to land hardest. If I skip any, use the defaults: vinyl, book, camera, cat, coin, game controller, cap, heart, money, plant, clapperboard, skateboard; free CC0 silhouettes from Openverse; action, intention, curiosity.
</inputs>

<direction>
A 20 second 4:3 film, 1440x1080 at 60fps, cut to the voice. Off-white paper, black, one red, one yellow, Geist for every word. Film grain on everything, a soft vignette, and a camera that never rests: a slow handheld float under everything plus a slow push inside every scene.
No scene cuts to the next: each handoff starts on the exact last frame of the scene before. The only hard cuts are the beat flips on the last word.
Every object is pixel art you draw yourself: a 16x16 grid per object, every cell a hand-placed colour, rendered as a 3D block (a darker extrusion down-right, a thin bevel on every cell) with a soft contact shadow.
The silhouettes are lit like a heat camera: the heat comes from how thick the body is at each point, so the nose, the hair and the fingertips run cooler, plus one hotspot and a slow moving noise, mapped through a black > red > orange > cream ramp. The edge stays razor sharp, with a soft glow outside it.
Motion rules: nothing pops in (eased glides of about 0.5s with a soft start), fast moves get real motion blur instead of ghost copies, and captions type with the voice behind a block cursor.
Banned: stock footage, AI video, 3D camera moves, particles, glitch.
</direction>

<structure>
Hang every scene on the transcript's word timings (measure them with faster-whisper word timestamps, one short chunk at a time):
1. The first word fills a yellow card. The card wipes off to the left and the question types underneath on two centred lines that glide to stay centred as they grow, the key word underlined in red as it's spoken.
2. The objects streak past in lanes above and below the words, a cyan four-point flare sweeps in, then the page burns away: black closes in from the edges onto the head, behind a hot red edge.
3. The head heats up on black while the answer types low on the left. A thin white orbit draws itself around the head, its far half passing behind it. On the last word, paper blooms out from inside the head with the objects in it, and the camera falls through: the head rushes past the lens until the paper is all we see.
4. The objects sit on a tilted ring seen in perspective (the front ones bigger and lower, drawn last), slowly turning, each one bobbing; the coin flips and lands with sparks.
5. On each of the 3 words, that object flies out of the ring to the left and grows, the page floods black from it, and the word types beside it (camera: a red shutter star; book: a red ribbon sweep; record: two white orbits and red notes). Then the flood drains back into the object as it flies home, and the camera dives closer into the ring. Put each hero object in the slot that is front-left when its word lands.
6. The ring pulls in a touch, bursts outward, every object turns to ink, and ink blots grow and swallow the page.
7. The hand rises into frame, hot, with the line split either side of it. The heart drops into its palm, then lifts to the centre at the size the next scene holds it.
8. The last word, one letter per beat, the background flipping paper / black / red, the heart holding its place across the cut, the centre object morphing pixel by pixel into the next one.
9. Thin brush strokes sweep through, the letters drift apart and float, then settle back into the word with the heart above it. The camera keeps pushing through the hold.
</structure>

<build>
1. One HTML canvas. Every frame is a pure function of time inside seek(t).
2. Bake each pixel sprite once to an offscreen canvas (the extrusion layers, then the face), then draw it scaled and rotated.
3. The heat: precompute each silhouette's base heat once (a distance transform of the mask, held at the edge value outside it so nothing dark bleeds in when it is upscaled). Every frame, add the hotspot and two octaves of value noise at quarter resolution, map it through a 256-step lookup, upscale it, and cut it with the full-resolution mask.
4. The fall through the head: draw the ring scene into an offscreen layer, mask it with the head scaled up about a point inside the skull, and grow that scale on a cubed curve until the head covers the frame. The ring inside zooms less than the head does, so it reads as depth.
5. The pixel morph: pair every cell of object A with a cell of object B and glide each one's position and colour, with a small random delay per cell.
6. Render with Playwright at 60fps with 8 motion-blur subframes, then lay the original audio back on with ffmpeg.
</build>

<gotchas>
A mask PNG with no alpha channel fills the whole box with heat, so put the silhouette in the alpha. A limb cut by the photo's border shows as a straight edge, so extend the mask past the frame. A handoff only reads as smooth when the last frame of one scene is the first frame of the next: draw the outgoing scene under the transition, and give scenes that show the same ring one shared zoom function. A flood that's still retreating when the next scene starts reads as a hard cut, so let it finish first. A fast ease-out flood reads as a jump; use a soft start.
</gotchas>

<start>
Ask me for the inputs, measure the word timings, then show me 8 stills before you render.
</start>

中文翻譯

<inputs>
向我索取:一段帶口播臺詞的旁白或歌曲(即音頻文件)及其文字稿,10-12 件能概括我這一生的小物件,兩個要像熱成像攝影機那樣打光的剪影(一個側面頭部和一個舉起的手),以及我最希望衝擊力最強的 3 個詞。如果我跳過了其中任何一項,就用默認值:黑膠唱片、書、相機、貓、硬幣、遊戲手柄、帽子、心、錢、植物、場記板、滑板;來自 Openverse 的免費 CC0 剪影;action、intention、curiosity。
</inputs>

<direction>
一部 20 秒的 4:3 影片,1440x1080,60fps,跟着人聲剪輯。米白紙張、黑色、一種紅、一種黃,每個詞都用 Geist。所有東西都帶膠片顆粒、柔和的暗角,以及一個永不停歇的鏡頭:一切之下都有緩慢的手持漂浮,同時每個場景內部都有緩慢推近。
場景之間不做切換:每一次交接都從上一場確切的最後一幀開始。唯一的硬切是最後一個詞上的節拍翻轉。
每件物件都是你自己畫的像素畫:每件物件一個 16x16 網格,每個格子都是手工放置的顏色,渲染爲一個 3D 方塊(向右下方更深的擠出,每個格子上有一道細倒角),並帶柔和的接觸陰影。
剪影像熱成像攝影機那樣打光:熱量來自身體在每個點上的厚度,所以鼻子、頭髮和指尖偏冷,再加上一個熱點和緩慢移動的噪波,通過 黑 > 紅 > 橙 > 奶油色 的色階映射。邊緣保持刀鋒般銳利,外側帶一圈柔和輝光。
運動規則:沒有任何東西突然彈出(約 0.5 秒的緩動滑入,帶柔和起始),快速運動會獲得真正的運動模糊,而不是殘影複製,字幕隨着人聲逐字打出,後面跟一個塊狀光標。
禁止:素材庫視頻、AI 視頻、3D 鏡頭運動、粒子、故障效果。
</direction>

<structure>
把每個場景都掛在文字稿的詞時間點上(用 faster-whisper 的詞級時間戳測量,一次一個短片段):
1. 第一個詞填滿一張黃色卡片。卡片向左擦除,問題在下方用兩行居中文字逐字打出,隨着文字增長而滑動以保持居中,關鍵詞在被說出時用紅色下劃線標出。
2. 物件在文字上方和下方的通道中飛掠而過,一道青色四角閃光掃入,然後頁面燃燒殆盡:黑色從邊緣向頭部收攏,藏在一道灼熱的紅色邊緣之後。
3. 頭部在黑色背景上逐漸升溫,同時答案在左側低處逐字打出。一圈細細的白色軌道自行繞着頭部畫出,它較遠的一半從頭部後方穿過。在最後一個詞上,紙張從頭部內部綻放出來,物件就在其中,然後鏡頭穿過它墜落:頭部從鏡頭旁衝過,直到我們只看得見紙張。
4. 物件坐在一個以透視看到的傾斜圓環上(前面的更大、更低,且最後繪製),緩慢轉動,每一件都在上下浮動;硬幣翻轉後帶着火花落下。
5. 在 3 個詞中的每一個上,那件物件從圓環中向左飛出並變大,頁面從它那裏湧滿黑色,詞在它旁邊逐字打出(相機:一顆紅色快門星;書:一道紅色緞帶掃過;唱片:兩圈白色軌道與紅色音符)。隨後湧流退回物件之中,物件飛回原位,而鏡頭向圓環更近地俯衝。把每個主角物件放在它的詞落下時處於左前方的那個槽位裏。
6. 圓環稍微收攏,然後向外爆開,每件物件都化作墨,墨點擴大併吞沒頁面。
7. 手升入畫面,滾燙,文字行分列在它的兩側。心落入它的掌心,然後升到中央,尺寸正是下一場戲托住它時的大小。
8. 最後一個詞,一拍一個字母,背景在紙色 / 黑色 / 紅色之間翻轉,心在切點兩側保持原位,中央的物件逐像素地變形爲下一件。
9. 細細的筆觸掃過,字母散開並漂浮,然後回到詞中,心在詞的上方。鏡頭在停頓期間持續推近。
</structure>

<build>
1. 一塊 HTML canvas。每一幀都是 seek(t) 內關於時間的純函數。
2. 把每個像素精靈只烘焙一次到離屏 canvas(先擠出層,再是正面),然後按縮放和旋轉繪製它。
3. 熱成像:只預計算一次每個剪影的基礎熱量(對遮罩做距離變換,在遮罩之外保持邊緣值,這樣放大時不會有暗色滲入)。每一幀,加上熱點和兩個八度的值噪聲(按四分之一分辨率),通過 256 級查找表映射,再放大,然後用全分辨率遮罩裁剪它。
4. 穿過頭部的墜落:把圓環場景畫入一個離屏圖層,用圍繞頭骨內部某一點放大的頭部來遮罩它,並按三次方曲線增長這個縮放,直到頭部覆蓋畫面。裏面的圓環放大得比頭部少,因此讀起來有縱深感。
5. 像素變形:把物件 A 的每個格子與物件 B 的一個格子配對,滑動過渡每個格子的位置與顏色,每個格子帶一點隨機延遲。
6. 用 Playwright 以 60fps 和 8 個運動模糊子幀渲染,然後用 ffmpeg 把原始音頻鋪回去。
</build>

<gotchas>
沒有 alpha 通道的遮罩 PNG 會讓整個框充滿熱量,所以要把剪影放進 alpha 通道。被照片邊緣切斷的肢體看上去會是一條直邊,所以要把遮罩延伸到畫面之外。只有當一場戲的最後一幀就是下一場戲的第一幀時,交接纔讀起來順滑:在過渡下面繪製正在離開的場景,並讓展示同一個圓環的場景共用一個縮放函數。如果下一場開始時湧流仍在退去,讀起來會像硬切,所以先讓它退完。快速的 ease-out 湧流讀起來像跳變;要使用柔和的起始。
</gotchas>

<start>
向我索取輸入,測量詞時間點,然後在渲染之前先給我看 8 張靜幀。
</start>

溯源

原作者
twoclipping
發佈日期
2026-10-07(由推文 ID 反解)
原始出處
查看原帖 ↗
收錄來源
yihui-dev/awesome-opus5-5-videos · twoclipping-041659 · MIT
zhuyansen/awesome-opus-5.5-video · 2107822293653041659 · 未聲明授權
本條由 2 個來源合併去重而來