# 2D Sprite Animation (video-to-spritesheet pipeline) > **Asset reference for game-generation.** Use for ANY animated 2D asset — > characters, objects, effects — delivered as a spritesheet. The pipeline: > key-pose image → `higgsfield generate create` (**`seedance1_5`**) → frame extraction > (ffmpeg) → frame selection → per-frame background removal → spritesheet > assembly. Style: the key-pose prompt embeds the STYLE FORMULA per > `stylization.md` — open it first, as for every asset. Why video instead of generating frames directly: an image model drawing N frames independently cannot hold the character identical across frames — limbs, proportions and details drift, and the animation "boils". A video model animates ONE image, so every frame is the same character by construction. We then sample the video back into frames. This trades prompt control for temporal coherence — the right trade for game sprites. ## Native AutoSprite route — preferred Use `autosprite` when present in the live model catalog. It owns animation, frame selection, background removal, and sheet assembly: ```bash higgsfield model get autosprite higgsfield upload create ./character.png --json higgsfield generate create autosprite \ --image_url "" \ --kind walk \ --video_tier turbo \ --frame_count 12 \ --frame_size 256 \ --remove_bg default \ --with_sound false \ --is_humanoid true \ --wait \ --json ``` Supported standard kinds and isometric directions come from `higgsfield model get autosprite`. For `kind=custom`, pass both `--prompt` and `--name`; omit both for standard kinds. Use the manual pipeline below only when AutoSprite is unavailable or the project requires explicit control over extracted frames. --- ## Pipeline at a glance | # | Stage | Tool | Output | |---|---|---|---| | 1 | Source image | manifest / user / `stylization.md` pipeline | character or object image | | 2 | Key-pose image | `higgsfield generate create` → `flux_2` | full-body pose at the action's mid/peak phase | | 3 | Animation video | `higgsfield generate create` → **`seedance1_5`** | 4 s, 720p, AR = key-pose ratio (explicit); loop: start = end frame | | 4 | Raw frames | ffmpeg | every frame of the video as PNG | | 5 | Frame selection | local script | `frame_count` frames (2–64, default 25), evenly spaced, first + last always kept | | 6 | Alpha | `image_background_remover`, per frame | transparent-background PNGs | | 7 | Spritesheet | local assembly | grid PNG, metadata encoded in the filename | Hard rules (each one is a known failure when violated): - **The subject is NEVER cropped.** Full body in frame at every stage, with visible empty margin above the head and below the feet. A key pose, a video frame, or a sheet cell that clips the subject is a rejected asset — regenerate, do not "fix in post". - **The video model is `seedance1_5` exactly.** Not `seedance_2_0`, not the current default of `higgsfield generate create`. Verify availability via `higgsfield model list` if a call errors, but do not silently substitute a model. - **start = end only for loops.** Looping actions pass the SAME image as both start frame and end frame. One-shot actions (attack, death, hit, cast) pass only the start frame — forcing them back to the start pose ruins the action. - **First and last extracted frames are always kept** in the selection. For loops the last frame is then dropped at sheet assembly (see stage 7) — kept during selection, excluded from the sheet. - **Background removal runs on FRAMES, one by one** — never on the video. --- ## Stage 1 — Source image What goes in: the character/asset image from the manifest (generated per `stylization.md`, FORMULA embedded) or supplied by the user. Character, object, or both in one shot — the pipeline does not care what the subject is, only that it is fully visible. If the source already crops the subject (feet cut by the canvas, head at the edge), it cannot enter stage 2 as-is — regenerate or outpaint it to full body first. A cropped input guarantees a cropped animation. ## Stage 2 — Key-pose generation (`flux_2`) **What:** produce the subject in the *mid/peak phase* of the requested action. The video model animates *around* the image it is given; starting from the action's characteristic phase is what makes 4 seconds of video read as that action. - `idle` → slight lean / relaxed breathing stance - `walk` / `run` → mid-stride, one leg forward - `attack` → wind-up (weapon raised / fist drawn back) - `jump` → crouched anticipation - `cast` / `effect` → energy gathered at the hands / pre-release - flames, water, props → the shape at its most typical, not its extreme **How:** `higgsfield generate create` with model `flux_2`, the source image as media reference, the STYLE FORMULA verbatim in the prompt, plus the pose instruction. The prompt MUST demand: - *full body / full object in frame* — head to feet visible; - *empty margin above and below the subject* — the motion needs headroom and footroom (a jump goes up, a stride extends down; without reserve space the video model crops); - a *clean, uniform, uncluttered background* — it is removed per-frame later, and a busy background degrades the matte. **The background color must NOT appear anywhere on the subject** — pick it by looking at the subject's palette first (green character → magenta background, red/pink character → green, neutral subject → any saturated key color per `stylization.md`). A shared color is how the remover eats holes into the subject or leaves background patches stuck to it. **Why a separate key pose at all:** feeding the neutral source straight into video gives generic swaying. The key pose is the steering wheel — it is the single biggest lever on what action the video actually performs. Gate: subject fully inside the frame with visible margin top and bottom, nothing clipped, style matches the FORMULA. Cropped or off-style → reroll (regeneration budget per SKILL.md: 2 attempts, then best-of). ```bash higgsfield generate create flux_2 \ --image ./source-character.png \ --prompt "