跳过主要内容
GDT
Skill免费GameSkill 出品GameSkill 原创

Video to Sprite Sheet (AI clip to looping game sprites)

/video-to-sprite-sheet

A GameSkill original that turns a short clip of one character on a plain background, such as an image-to-video result, into a game-ready sprite sheet: automatic key colour, despill, hard alpha, an automatically found seamless loop, one crop box for every frame so nothing jitters, bottom-centre anchor, fixed cells and an optional colour budget or palette. Exports PNG, JSON and a Godot 4 SpriteFrames .tres. Python 3 standard library plus ffmpeg.

许可证
MIT
出品
GameSkill 出品
下载 ZIP

我们测过

在 ffmpeg 7.1 + Python 3, sheet loaded in Godot 4.7.2 上通过 27/27 项检查(2026-11-09):能触发、有可运行示例、有截图和自检清单、单一职责、中英文文档齐全。触发检查是把提示词和 skill 描述做匹配,不是真实 agent 运行。

测试报告

GameSkill 测过的版本

GameSkill 为 gameskill.dev 原创编写并测过。ZIP 里是完整的 skill:SKILL.md 及中文版、脚本、可运行示例、测试、自检清单和我们的测试报告。

下载测过的 ZIP(45 KB)路线图:美术资产

GameSkill 原创,协议 MIT。ZIP 保留 LICENSE 和 CREDITS.md,里面列出了流程灵感来源、CC0 测试素材和第三方库及其协议。

Video to Sprite Sheet (AI clip to looping game sprites)

自检清单

  • 接缝 seam 低于 0.01,没有 WARN / Loop seam under 0.01 with no WARN
  • 放大 4 倍看过,没有绿边、没有抖动 / Looked at 4x: no green halo, no jitter
  • 同一角色的所有动作用同样的 cell 和 work / Every action of a character uses the same cell and work size

中文指南

这个 skill 做什么

GameSkill 原创(MIT)。把一段纯色背景上单个角色的动作视频(比如图生视频的结果)变成可直接用于游戏的精灵图:自动识别抠像颜色、去溢色、硬边透明、自动找无缝循环、所有帧用同一裁剪框(不抖动)、底部居中锚点、固定格子,可限制颜色数或映射到固定调色板,导出 PNG、JSON 和 Godot 4 的 SpriteFrames .tres。只需要 Python 3 标准库和 ffmpeg。

什么时候用

  • 把图生视频或录制的动画变成 2D 游戏帧
  • 视频转出来的动画循环处跳帧、抖动或有绿边
  • 同一角色的走、待机、攻击做成对齐的几张图

怎么装

下载本页的 ZIP,把 video-to-sprite-sheet/ 文件夹放进 .claude/skills/(Claude Code)或 .agents/skills/(Codex、Cursor),重启 agent。需要 Python 3 和 ffmpeg(含 ffprobe)。

最小示例

  1. python3 example/make_clip.py out/kettlebot.mp4
  2. python3 tools/vid2sheet.py out/kettlebot.mp4 --out out --name kettlebot_walk --fps 12 --cell 64 --colors 12

我们怎么测的

测试视频是我们原创的水壶机器人 Kettlebot 在带噪点的绿幕上走路(3 秒、24fps、H.264 CRF 28 压缩)。test/run_tests.py 共 15 项检查:自动识别出绿色背景;自动找到完整的走路循环(12fps 下 6 帧)且接缝接近 0;精灵图和 JSON 布局一致;透明只有 0 和 255;角色身上没有绿边;颜色不超过 12 种;脚在格子底边、角色居中;抖动小于 2 像素;能映射到 Sweetie 16 调色板;Godot 4.7.2 能加载导出的循环 SpriteFrames;抠掉全部像素、文件不存在、视频太短这三种情况都有清楚的提示。截图是放大 4 倍的走路精灵图。

致谢

"把 AI 视频变成精灵动画"的思路来自 X 上 @azaticus 的帖子(只放链接,没有使用任何代码或文字)。代码、示例和文字都是我们自己的。

搭配

  • code-sprites-16:用代码画 16 色精灵
  • pixel-snap-cleanup:清理 AI 生成的像素图
  • style-cards:固定调色板的风格卡

安装

告诉你的 AI

Install the skill from https://gameskill.dev/skills/video-to-sprite-sheet/install.md

GameSkill 测过的版本

测过的版本装到 .claude/skills/
mkdir -p .claude/skills
curl -fsSL https://gameskill.dev/dl/skills/video-to-sprite-sheet.zip -o /tmp/gameskill-video-to-sprite-sheet.zip
unzip -oq /tmp/gameskill-video-to-sprite-sheet.zip -d .claude/skills
rm /tmp/gameskill-video-to-sprite-sheet.zip

包含内容

  • tools/vid2sheet.py: key, despill, loop search, fixed crop, downscale, colour budget or palette, PNG + JSON + Godot SpriteFrames
  • example/make_clip.py: our Kettlebot walk-cycle test clip on a noisy green screen, H.264 like a generated clip
  • 15 checks in test/run_tests.py, including Godot 4 loading the exported animation

适合

  • Image-to-video or recorded animation turned into 2D game frames
  • Generated sprite animations that pop at the loop, wobble or keep a green halo
  • Batching walk, idle and attack clips of one character into matching sheets

不适合

  • Generating the clip itself: any image-to-video tool, or agent-sprite-forge's workflow
  • Drawing sprites by hand or in code: see code-sprites-16
  • Cleaning a single AI pixel image: see pixel-snap-cleanup

试试这条提示词

提示词
Turn this 3-second clip of my original character walking on a green screen into a looping 64 px sprite sheet with 16 colours, and give me a Godot SpriteFrames for it.

关于这个 Skill

A GameSkill original. Image-to-video models and recordings give smooth motion but not sprites: a green background, soft edges with spill, a loop that does not close, a character that drifts, too many frames and colours. tools/vid2sheet.py handles all of it in one command with Python 3 and ffmpeg. It keys the auto-detected background, despills it, makes the alpha hard, finds the closest-matching loop, crops every frame with one box and anchors it bottom-centre. It then downscales to a fixed cell, optionally limits the colours or maps them to a palette, and writes a PNG sheet, a JSON and a Godot 4 SpriteFrames resource.

Agent steps

  1. Get a clip of one original character on a flat background, camera locked, the action repeated.
  2. Convert with vid2sheet and read the seam, colour count and jitter it reports.
  3. Look at the sheet at 4x, then use the .tres in Godot or the JSON elsewhere.

Common problems it solves

  • Green halos and soft edges left by keying.
  • Loops that pop and characters that wobble from frame to frame.
  • Hundreds of frames and colours where a game needs a handful.

Credits

The idea of turning AI video into sprite animation comes from a post by @azaticus (link only; no code or text was used). Kettlebot, the code and the text are ours.

环境要求

  • Python 3 standard library
  • ffmpeg and ffprobe (tested with 7.1)
  • Godot 4 only to use the .tres (tested on 4.7.2)

相关主题

常见问题

同赛道 PRO 商业源码$49/yr

AI 2D 美术与序列帧管线 Sprite Asset Pipeline

把 AI 生成的原始视频直接变成商业级透明 2D 游戏序列帧:绿幕/溢色消除命令、0px 脚底锚点锁死排版、动作非线性重定时(4.33s → ~1.88s 含打击顿帧)与 Phaser / Godot 4 图集一键导出。

基于 AI video to sprite animation (post, idea only) (作者 @azaticus,no licence, idea only, no code or text used)的思路。代码和文字由 GameSkill 编写,ZIP 里的 CREDITS.md 列出所有来源。

搭配使用

作者标注的相关 Skills,或更适合相邻任务的 Skills。

Agent Sprite Forge
GDT
Skill
4.9k

Agent Sprite Forge

Five agent skills that turn one approved character still into a game-ready sprite set: one image-to-video clip per action, then deterministic Python tools key, register, loop, retime, palette-lock and export it for Godot, Aseprite and the web. Also maps, tiles and code-drawn art.

GodotWeb (Phaser / Three.js)Engine-agnosticClaude Code · Codex
Code Sprites 16
WEB
Skill
GameSkill 出品

Code Sprites 16 (pixel sprites drawn in code, locked palette)

A GameSkill original for browser games whose sprites are written in code: text rows of palette indices over a locked 16-colour palette, no image files. A dependency-free sprites.js validates, bakes and draws them crisp by origin; a Node checker fails ragged rows, illegal characters, empty or resized frames, extra colours and wrong sizes and writes a PNG contact sheet. Ships Seed Courier, an original 16-colour platformer tested in headless Chrome so every pixel on screen is a palette colour.

Web (Phaser / Three.js)Claude Code · Codex +2
Pixel Snap Cleanup
GDT
Skill
GameSkill 出品

Pixel Snap Cleanup (AI fake pixels to true pixel art)

A GameSkill original that turns AI "fake pixel" art into true pixel art at the grid you choose: snap to a real grid with the bundled Pixel Snapper (MIT), force 0/255 alpha and a fixed palette, hit the exact size, then check it is CLEAN and imports crisp into Godot 4. Works on single sprites and on animation frames, which share one grid.

GodotWeb (Phaser / Three.js)Engine-agnosticClaude Code · Codex +2

相似 skills

pixelfx
WEB
Skill
GameSkill 出品

pixelfx

244 pixel-art effects written as code (fire, explosions, magic, weather, UI, pickups, critters) plus a draft, render, look, refine loop for making new ones; every effect exports a sprite sheet with Aseprite-style JSON for Godot, Unity, Phaser or any engine.

Web (Phaser / Three.js)GodotUnityClaude Code · Codex +2
Shader Art Coding
WEB
Skill
GameSkill 出品

Shader Art Coding (GLSL / Shadertoy)

A tested library of 186 GLSL building blocks plus a workflow for procedural fragment shaders: SDF raymarching, 2D distance fields, noise and fBm, terrain, water, clouds, lighting and tonemapping. A Python bundler inlines only the functions a shader uses, and a checker lints it for the mistakes that break WebGL. Good for game backdrops, title screens, portals, pickups and full-screen effects.

Web (Phaser / Three.js)GodotEngine-agnosticClaude Code · Codex +4
Codixel
WEB
Skill
GameSkill 出品

Codixel

A pixel-art skill built on one idea: the agent writes code, it is not a painter. It asks for a reference image, then removes the background, pixelates, rigs with bones and animates it in code with a 2,000-line toolkit (core/pixel.js), showing every step on a sheet before making game files.

Engine-agnosticWeb (Phaser / Three.js)GodotClaude Code · Codex +2
open-game-skills
GDT
Starter Kit
GameSkill 出品

open-game-skills

An MIT pack of about 190 SKILL.md agent skills for game design: combat feel, camera, traversal, world, validation, 2D/Spine and art pipeline, with a dispatcher and adapters for Three.js, PixiJS, Phaser, Cocos, Godot, Unity and Unreal.

Engine-agnosticGodotUnityClaude Code · Codex +1