scenario-sprite-animation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseScenario Sprite Animation
Scenario Sprite 动画
Overview
概述
A bare prompt to a generic image model for "a sprite sheet, walk cycle, 8 frames" returns a picture of one; a written grid spec on a high-adherence image model returns the sheet (the single-sheet row below). Frame sequences come from routes picked by the control the task needs, not sprite size alone. This skill routes between lanes and carries the frame math; depth lives with siblings: (video model families), and (one character across an action set), (statics, pixel cleanup, upscaling; a sheet whose cells are one character's frames stays here), (iterate to brief). Connection and the core loop: the skill. If a sibling skill named here is missing from your available skills, ask the user to install it (); unattended, proceed from tool schemas and flag the gap.
scenario-videoscenario-consistencyscenario-model-trainingscenario-game-assetsscenario-refine-loopscenarionpx skills add scenario-labs/skills --skill <name>向通用图像模型输入「一张Sprite Sheet、行走循环、8帧」这样的简单提示词,只会得到一张示意图;而在高遵循度图像模型上使用明确的网格规范,才能生成可用的Sprite Sheet(对应下方的单Sheet路线)。帧序列的生成路线由任务所需的控制精度决定,而非仅由Sprite尺寸决定。
本技能负责在不同路线间调度,并处理帧计数相关的计算;更深入的功能由以下兄弟技能提供:(视频模型系列)、与(同一角色的多动作集合生成)、(静态资产、像素清理、超分辨率;单元格为同一角色帧的Sprite Sheet仍归本技能处理)、(迭代优化以符合需求)。
连接与核心循环依赖基础技能。如果你的可用技能中缺少此处提到的某个兄弟技能,请告知用户安装(命令:);若处于无人值守模式,请基于工具Schema继续执行,并标记缺失的技能。
scenario-videoscenario-consistencyscenario-model-trainingscenario-game-assetsscenario-refine-loopscenarionpx skills add scenario-labs/skills --skill <name>Quick reference
快速参考
| You need | Route |
|---|---|
| Pixel cycles or VFX, style-locked canvas | Purpose-trained animation model ( |
| An exact grid, chosen frame count, scripted beats | High-adherence general image model ( |
| A seamless loop from a still | First+last-frame video model ( |
| Poses at chosen moments | Keyframe video model ( |
| Animate this sprite, larger or styled | Image-to-video on the flattened still, prompt anchored in a sprite-animation style with scripted motion beats; model per |
| One character across an action set | Turnaround plus reference-to-video per |
| Frames to sheet, sheet to frames | Tool models via |
The schema is the contract, read with on the pick: re-discover the generative members each session rather than hardcode them (the tool ids above are fixed). Per-lane schema notes, covering the Retro Diffusion canvas lock and seed pairing on the pixel lane, the single-sheet schema shape and prices, the video-lane control surfaces, the alpha routes, and how to read a deprecation tag: references/lane-schemas.md.
model_schema_getreturnSpritesheetThe single-sheet lane trades the pixel lane's native pixels, locked canvas and seed pairing for a grid honored as written; the pixel look is emulated, so the snapping pass is part of the lane. Unattended, the task decides between the table's first two rows: an exact grid, frame count or scripted beats in the brief takes the top-ranked general model over , whose names exactly those needs. Write the spec for the pipeline that will read it: rows and columns within the slicer's 6x6 (16 frames as 4x4, never 2 by 8, which is a local cut), a canvas the grid divides evenly, one scale, camera, facing and ground baseline, the beats per frame range with the last frame matching the first, generous margins, no labels. Leave GIF production lines out: an image model returns stills, and a hold is the same pose across extra frames. A enum names no color, so a solid field is prompt wording; an existing character goes through the reference-image field; with no a re-run is a new character, so candidates come from the sample-count parameter and one sheet is approved before slicing. Read the delivered sheet before slicing: count the cells, read the cell edges, and count distinct poses, since a beat range naming a single end state can come back as one held pose. Then slice, seam-check the tiles per step 5, align the body across tiles, snap every kept tile with the same color count and seed, check that the snapped tiles share one size, and assemble. Alignment is a post step, not a prompt: the body drifts between rows (in one run the grounded feet sat 87 px higher in the last row than in the first, and neither anchoring language nor a layout template passed as reference image moved that), so measure each tile's body box, shift it onto one baseline and one horizontal center on a wider canvas so nothing clips, then the re-laid sheet and slice it, since frames edited locally never become assets.
specialty.model_idwhen_general_betterbackgroundseedupload_assetFor reusable layouts, read the grid manifest and template usage guide. Resolve uploaded assets and publish new versions through the skill's shared asset lifecycle. When none is accessible, the grid builder, run by a maintainer or an agent needing local geometry, creates the selected preset for MCP upload; it does not generate animation. Preserve the user's frame count and canvas over any preset. Templates do not replace the alignment, edge, and loop checks above.
scenarioThe frames pipeline is tool models run with , not separate MCP tools: a video-to-image-sequence extractor (, or every Nth frame via ; the order of its frames is verified, never assumed, see below), a grid maker (, up to 100, kept in input order; , default 3, and , computed from the count when unset, so a delivered 2 by 8 is the finished frames at ; takes a hex string, , or ), a grid slicer ( plus and , 1 to 6 each and defaulting to 2 when omitted, so 6x6 is the cap; no output-size parameter; tiles return in row-major order but not always at cell size, so check one with , and a resized tile or a sheet past 6x6 means cutting the sheet locally on the grid you counted), a sequence-to-video assembler (, a first-party id stable enough to name; fps 1 to 120, , , or ), and a pixel snapper (re-detects the art's grid and quantizes to the requested color count, the one palette control in the cleanup chain; priced per tile, so probe one before the set). GIF frame delays quantize to 10 ms, so ask the assembler for an fps that divides 100 (10, 20 or 25; 8 lands at 125 ms and 12 at 83 ms, neither on the grid), or it re-times and duplicates frames to hold the duration. Fps is the only timing lever after generation, so plan frame counts up front and count what came back. Analysis is fine locally: differencing, seam math, edge reads, and window searches need pixels on disk.
model_runextractAllFramesframeIntervalimagescolumnsrowscolumns: 8backgroundColortransparentblackwhiteimagexSubdivisionsySubdivisionsasset_getmodel_scenario-image-seq-to-videoloopCountpingpongoutputFormatgifmp4Frame order is verified, never assumed. Extracted frames share one and carry no index in , so their order exists only in the job row's , and that list has come back out of time order (a confirmed defect at authoring time). Before any stride math, slice, or assembly, pass the ids to the grid maker in returned order and read the contact sheet against the clip's free and () and its motion: a frame that breaks continuity is out of place, and the corrected order is carried as your own id list from then on. Never rebuild order from listings, timestamps, or .
createdAtmetadataassetIdsfirstFramelastFrameasset_getsearch| 需求场景 | 处理路线 |
|---|---|
| 像素动画循环或VFX、风格固定的画布 | 专用动画模型(使用用户原话描述的Sprite动画需求调用 |
| 精确的网格、指定帧数、脚本化动作节拍 | 高遵循度通用图像模型(使用用户原话描述的网格规范调用 |
| 从静态图生成无缝循环动画 | 首尾帧控制视频模型(使用循环需求调用 |
| 指定时刻的姿势 | 关键帧视频模型(使用关键帧固定需求调用 |
| 为现有Sprite添加动画、放大或调整风格 | 基于扁平化静态图的图生视频,提示词锚定Sprite动画风格并预设动作节拍;模型选择遵循 |
| 同一角色的多动作集合 | 遵循 |
| 帧转Sheet、Sheet转帧 | 通过 |
Schema是执行约定,请在选定模型后调用读取:每次会话都应重新获取生成相关的参数,而非硬编码(上述工具ID是固定的)。各路线的Schema说明请参考references/lane-schemas.md,内容涵盖Retro Diffusion的画布锁定、像素路线的种子配对、单Sheet路线的Schema结构与定价、视频路线的控制项、Alpha通道方案,以及如何读取弃用标签。
model_schema_getreturnSpritesheet单Sheet路线放弃了像素路线的原生像素、锁定画布和种子配对特性,以换取对网格规范的严格遵循;其像素风格是模拟出来的,因此像素吸附是该路线的必要步骤。
在无人值守模式下,任务会在表格的前两行路线中做选择:如果需求中包含精确网格、指定帧数或脚本化动作节拍,则优先选择排名最高的通用模型,而非中的专用模型——字段明确列出了这些适用场景。
请为后续处理管道编写符合要求的规范:行数和列数需在切片工具的6x6限制内(16帧应设为4x4,绝不能用2x8,后者属于本地裁切);画布尺寸需能被网格均匀划分;统一缩放比例、相机角度、朝向和地面基线;每个帧区间的动作节拍需满足最后一帧与第一帧匹配;预留充足边距,不要添加标签。
无需考虑GIF生成流程:图像模型只返回静态图,保持姿势只需在额外帧中重复同一姿势即可。枚举不指定具体颜色,因此纯色背景需要通过提示词描述;现有角色需通过参考图字段传入;如果没有参数,重跑会生成新角色,因此候选方案需通过样本数量参数生成,且需先确认一张Sheet合格后再进行切片。
切片前请先检查生成的Sheet:统计单元格数量、查看单元格边缘、统计不同姿势的数量——因为指定单一结束状态的动作节拍可能只会返回一个保持不变的姿势。
之后进行切片,按照步骤5的要求对Tile做接缝检查,跨Tile对齐角色身体,对所有保留的Tile使用相同的颜色数量和seed进行像素吸附,确认吸附后的Tile尺寸一致后再组装。
角色对齐是后处理步骤,无法通过提示词实现:角色身体在不同行之间会有偏移(某次运行中,最后一行的脚比第一行高87像素,无论是锚定描述还是作为参考图传入的布局模板都无法解决这个问题),因此需要测量每个Tile的角色包围盒,将其在更宽的画布上统一对齐到同一基线和水平中心,避免内容裁切,然后将重新排布的Sheet调用上传后再切片——因为本地编辑的帧永远不会成为资产。
specialty.model_idwhen_general_betterbackgroundseedupload_asset对于可复用的布局,请查阅网格清单和模板使用指南。上传资产的解析和新版本发布请通过技能的共享资产生命周期流程处理。如果无法访问上述资源,可由维护人员或需要本地几何计算的Agent运行网格构建工具,生成选定的预设用于MCP上传;该工具不生成动画。任何情况下都应优先满足用户的帧数和画布要求,而非套用预设。模板不能替代上述的对齐、边缘和循环检查。
scenario帧处理管道通过调用工具模型实现,而非独立的MCP工具,包括:
model_run- 视频转图像序列提取器:支持提取所有帧,或通过
extractAllFrames每N帧提取一帧;帧的顺序必须验证,绝不能假设(见下文)。frameInterval - 网格生成器:参数最多支持100张图,保持输入顺序;
images默认3列,columns未设置时会根据总数自动计算,因此生成的2行8列Sheet对应rows的成品帧;columns: 8支持十六进制颜色字符串、backgroundColor(透明)、transparent(黑)或black(白)。white - 网格切片器:传入以及
image和xSubdivisions参数,取值范围1-6,未指定时默认2,因此最大支持6x6网格;没有输出尺寸参数;Tile按行优先顺序返回,但尺寸不一定等于单元格尺寸,因此需要用ySubdivisions检查其中一个Tile,如果Tile被调整过尺寸或Sheet超过6x6,就需要根据你统计的网格在本地裁切Sheet。asset_get - 序列转视频组装器:,是足够稳定可直接引用的官方ID;支持1-120fps、
model_scenario-image-seq-to-video(循环次数)、loopCount(乒乓循环)、pingpong支持outputFormat或gif。mp4 - 像素吸附器:重新检测美术资源的网格,并量化到指定的颜色数量,是清理流程中唯一的调色板控制工具;按Tile计费,因此先测试一个再批量处理。
GIF的帧延迟以10ms为单位量化,因此请向组装器请求能整除100的fps(如10、20或25;8fps对应125ms,12fps对应83ms,都不在量化网格上),否则组装器会重新计时并复制帧来维持时长。
生成完成后,fps是唯一的时序控制手段,因此需要提前规划帧数,并核对实际返回的帧数。
本地分析是可行的:差值计算、接缝计算、边缘检测和窗口搜索都需要本地磁盘上的像素数据。
帧的顺序必须验证,绝不能假设。提取的帧具有相同的时间,且中没有索引,因此它们的顺序仅存在于任务行的列表中,而该列表可能不按时间顺序返回(这是编写本文时已确认的缺陷)。
在进行任何步长计算、切片或组装之前,请按返回的顺序将ID传入网格生成器,生成联系表(contact sheet),并与视频片段的和(通过获取)以及动作进行比对:破坏连续性的帧就是位置错误的,之后请使用你自己整理的正确ID列表。
绝不要通过列表排序、时间戳或功能重建帧顺序。
createdAtmetadataassetIdsfirstFramelastFrameasset_getsearchWorked example: a seamless idle loop from a still
实操示例:从静态图生成无缝待机动画循环
- Create a dedicated collection first (, tool catalog) and
collection_create(collection_add_assets,collection_id) every kept output as it lands. With no still to hand, generate and approve one first: it anchors every later step, so check subject-critical detail against the brief before animating, and budget it apart from the loop (references/lane-schemas.md). Flatten the character onto a plain field (a local edit is fine; assume video inputs drop transparency as reference inputs do) andasset_idsit. Confirm lane and budget with the user; unattended, take them from the task instructions, else the cheapest lane that fits, andupload_assetbefore every paid run.dry_run - with the loop requirement in the user's own words, prefer a non-deprecated pick, then
recommend. The schema decides the levers: duration and fps enums, a camera lock such asmodel_schema_get, an audio toggle, and a native loop flag where present, replacing the end-frame anchor: never send both (staticaccepts combinations that still fail at run time).dry_run - with the same still as first and last frame and a prompt that names the motion explicitly ("weight shifts, cloak sways; the character stays in place").
model_runre-called withjobs_waitwhile the job runs.pending_job_ids - If the sprite needs alpha, expect no video lane to emit it, so budget a removal pass; verify alpha survived on one downloaded frame before batching: inline display composites it away, and a transparent request can come back in a container without alpha (references/lane-schemas.md). Extract with the video-to-image-sequence tool and verify the frame order first (above). Confirm what was delivered before computing any stride (requests are not always honored): reports
asset_get,properties.duration,frameRate,nbFrames, andwidth;heightis the delivered frame count the math needs, so read those and leave the rest of the record alone. At authoring time the extractor exposed onlynbFramesandextractAllFrames, so confirm withframeInterval: no start offset, end, or range. Any non-uniform selection (trimmed window, stride off an offset, hand-picked subset) meansmodel_schema_getthen subsetting by asset id; aextractAllFrames: truethat cannot express the window is never a reason to leave the platform. Frame math: extracted count = delivered frames /frameInterval, endpoint-inclusive; where the schema exposes fps, generating at sprite cadence (8 to 12 fps: a cycle typically needs 8 to 16 frames) beats decimating after.frameInterval - Seam-check against the sequence's own motion, not by eye: a seam reads as a loop only relative to how much the frames already move. Compute the mean absolute pixel delta between consecutive frames (the motion baseline) and the delta across the seam; the loop closes when the seam sits at or below the baseline of the window being looped, not the whole sequence's, since per-step delta swings by orders of magnitude across a scene loop. On a near-static idle, of first and last frame is enough; on locomotion (hop, walk, attack) eyeballing passes visibly broken loops. If the seam is wide, do not re-run first: image-to-video models re-render off the input still, so frame 0 often diverges from every later frame (a large 0 to 1 delta is the tell) and no re-run fixes a loop anchored to it. Search start and end pairs inside the model's own rendering, excluding frame 0, and take the tightest closing window that still carries real motion. Trim to where the motion is: a duration longer than the action leaves a static tail, and the stride comes from the active window, not the delivered length. Only after a window search fails is a re-run (new
asset_displaywhere the schema has one, else reworded motion) worth the credits. Unattended, allow one re-run, then flag and stop.seed - Finish and package: a pixel-art target needs a snapping pass, which has traps of its own and is sometimes the wrong move (references/lane-schemas.md). Sheet via the grid maker, background or a color when the brief is opaque; preview via sequence-to-video as GIF; the assembler has no background parameter, so a deliverable GIF takes opaque frames already on its field.
transparentframes withasset_downloadand the preview withformat="png", and omitformat="gif"on a video asset, which rejectsformat.mp4
- 首先创建一个专用集合(,见工具目录),每生成一个保留的输出就调用
collection_create(传入collection_add_assets和collection_id)添加到集合中。如果没有现成的静态图,先生成并确认一张:它是后续所有步骤的锚点,因此在动画制作前需对照需求检查主体的关键细节,并将其预算与循环动画分开计算(参考references/lane-schemas.md)。将角色扁平化到纯色背景上(本地编辑即可;假设视频输入和参考输入一样会丢失透明通道),然后调用asset_ids上传。与用户确认路线和预算;无人值守模式下从任务指令中获取,否则选择符合需求的最便宜路线,且每次付费运行前都要执行upload_asset。dry_run - 使用用户原话描述的循环需求调用,优先选择未弃用的模型,然后调用
recommend获取Schema。Schema决定了可用的控制项:时长和fps枚举、model_schema_get等相机锁定选项、音频开关,以及可能存在的原生循环标志(可替代首尾帧锚点):绝不要同时传入首尾帧锚点和原生循环标志(static可能会接受运行时会失败的组合)。dry_run - 调用,将同一张静态图作为首帧和尾帧,并在提示词中明确描述动作(如「重心转移、斗篷飘动;角色保持原地」)。任务运行期间,使用
model_run重复调用pending_job_ids等待完成。jobs_wait - 如果Sprite需要Alpha通道,请注意没有任何视频路线会输出Alpha通道,因此需要预留背景移除步骤的预算;批量处理前先下载一帧验证Alpha通道是否存在:内嵌显示会合成掉透明通道,且请求透明背景的视频可能返回不带Alpha的容器格式(参考references/lane-schemas.md)。使用视频转图像序列工具提取帧,并首先验证帧顺序(见上文)。计算任何步长之前先确认实际交付的内容(请求不一定会被完全满足):会返回
asset_get、properties.duration、frameRate、nbFrames和width;height是计算所需的实际交付帧数,因此只需读取这些字段,其他记录内容不要修改。在编写本文时,提取器仅暴露nbFrames和extractAllFrames参数,因此请通过frameInterval确认:没有起始偏移、结束位置或范围参数。任何非均匀选择(裁切窗口、带偏移的步长、手动挑选的子集)都需要先设置model_schema_get,再按资产ID取子集;extractAllFrames: true无法满足窗口需求绝不是离开平台的理由。帧计数公式:提取帧数 = 交付帧数 /frameInterval,包含端点;如果Schema支持fps参数,以Sprite的常用帧率(8-12fps:一个循环通常需要8-16帧)生成,比生成后再抽帧效果更好。frameInterval - 接缝检查要基于序列自身的动作,而非肉眼判断:接缝是否自然只有相对于帧之间的运动量才有意义。计算连续帧之间的平均绝对像素差值(动作基线),以及接缝处的差值;当接缝处的差值小于等于待循环窗口的动作基线时,循环才是闭合的——注意是待循环窗口的基线,而非整个序列的,因为在一个场景循环中,每帧的差值可能相差数个数量级。对于接近静态的待机动画,用查看首尾帧就足够;但对于移动类动作(跳跃、行走、攻击),肉眼检查会放过明显有问题的循环。如果接缝差距很大,不要先重跑:图生视频模型是基于输入静态图重新渲染的,因此第0帧通常会和后续所有帧都有差异(第0帧到第1帧的差值很大就是信号),基于它锚定的循环重跑多少次都没用。请在模型生成的帧中(排除第0帧)搜索最佳的首尾帧对,找到既包含真实动作又最紧凑的闭合窗口。将序列裁切到动作区间:如果时长比动作本身长,会留下静态尾部,步长应基于有效动作窗口计算,而非交付的总长度。只有当窗口搜索失败时,才值得花积分重跑(如果Schema支持
asset_display,就用新的seed,否则重新描述动作)。无人值守模式下,最多允许一次重跑,之后标记问题并停止。seed - 完成与打包:如果目标是像素艺术风格,需要进行像素吸附处理,但这一步有自身的陷阱,有时甚至是错误的选择(参考references/lane-schemas.md)。通过网格生成器制作Sheet,背景根据需求选择(透明)或指定颜色;通过序列转视频工具生成GIF预览;组装器没有背景参数,因此可交付的GIF需要使用已经带背景的不透明帧。调用
transparent下载帧时指定asset_download,下载预览时指定format="png";视频资产不要指定format="gif"参数,否则会拒绝format格式。mp4
Common mistakes
常见错误
- Identical first and last frames with a bare prompt: that asks for a freeze, not a loop; the motion must be named.
- Treating margin or wording as containment for a travelling effect: what crosses the cell edge is gone, margin gets filled and crossed anyway, and containment wording cancels the throw. Keep the frames whose delivered edge band reads empty; the detached projectile is its own sprite.
- Assuming every model has a : many video schemas and several high-adherence image schemas have none, so reproducibility there is per-asset, not per-run.
seed - Counting on an interpolation filter: none exists in the catalog, and fps is the timing lever. Pixelating a non-pixel image is a different job from cleaning pixel art: the catalog carries a pixelate tool (grid size, palette) for the first and the snapper for the second, both found with (
search,target: "models",public: truefilters,tags: ["tool"]returns both; the descriptions tell them apart).query: "pixel" - Photo upscalers on pixel frames: they invent texture; use the pixel-preserving routes in .
scenario-game-assets - Shipping a sheet unstepped: per-frame steps return new ids and order lives only in the lists you pass, so carry the frame-to-output mapping (never rebuild it from listings or timestamps), then compare sheet to preview before delivery.
- Assembling deliverables locally because the frames are already on disk: analysis pulls the clip down, local assembly then looks free, and the frames never become assets, leaving the collection holding a sheet nobody else can reach.
- Ping-pong or loop flags set blind: watch the downloaded GIF and match the assembler to it.
- Softening an attack brief after a moderation block: the filter is the provider's, so try another general image model first per , grid spec unchanged; rewording the beats loses what the lane exists to honor.
scenario-moderation
- 仅用简单提示词指定首尾帧相同:这会生成静止画面而非循环;必须明确描述动作。
- 认为边距或提示词描述能限制移动效果:超出单元格边缘的内容会丢失,边距总会被填充或越过,而限制移动的描述反而会抵消投掷效果。请保留边缘区域为空的帧;独立的投射物应作为单独的Sprite处理。
- 假设所有模型都有参数:许多视频模型Schema和部分高遵循度图像模型Schema没有seed,因此可复现性是基于资产的,而非基于运行的。
seed - 依赖插值滤镜:目录中没有这类工具,fps是唯一的时序控制手段。将非像素图像像素化与清理像素艺术是不同的工作:目录中有专门的像素化工具(支持网格尺寸、调色板参数)用于前者,像素吸附工具用于后者,两者都可以通过找到(
search、target: "models"、public: truefilters、tags: ["tool"]会同时返回两者;可通过描述区分)。query: "pixel" - 对像素帧使用照片级超分辨率工具:这类工具会生成多余的纹理;请使用中的像素保留超分辨率路线。
scenario-game-assets - 未按步骤处理就交付Sheet:每帧处理步骤都会返回新的ID,且顺序仅存在于你传入的列表中,因此需要维护帧到输出的映射(绝不要通过列表或时间戳重建),交付前请将Sheet与预览进行比对。
- 因为帧已经在本地磁盘就本地组装交付物:分析步骤会下载视频,本地组装看似免费,但这些帧永远不会成为资产,导致集合中只有一张其他人无法访问的Sheet。
- 盲目设置乒乓循环或循环标志:请查看下载的GIF,根据实际情况调整组装器的设置。
- 被内容审核拦截后弱化攻击动作的需求:过滤是服务提供商的,因此请先按照的流程尝试其他通用图像模型,保持网格规范不变;修改动作描述会失去这条路线存在的意义(即严格遵循需求)。
scenario-moderation