In our offline replay, a four-second clip produced 32 candidate PNGs with nearly identical opening poses and an opaque black matte. Those files still required pose selection and background removal.
This guide is for a developer making a 2D prototype from a full-body character reference. Start with one action and one view. The output to aim for is a transparent PNG sheet plus its frame order, timing, and anchor coordinates. Judge the result at its actual size in the game.
Choose a route that fits the animation
You can start from a short AI video, individual generated poses, or a character you animate with a rig. The choice depends on which part of the motion you need to control.
| Your situation | Practical starting point | Work you must allow for |
|---|---|---|
| A prototype needs a flowing walk, idle, or tail movement | Generate one short video, then extract candidates | Select poses, repair identity drift, remove the matte, and stabilize the character |
| An attack needs a specific anticipation and impact pose | Draw or generate the required poses separately, using the same reference | Keep proportions, camera angle, lighting, and canvas coordinates consistent between images |
| The same character needs many reusable actions | Consider a rig or conventional animation timeline before generating every action independently | Prepare the character for the rig and export rendered frames; a finished flat image may need to be separated or redrawn |
| The deliverable is small pixel art | Use AI candidates as motion or design references, then finish on the target pixel grid | Repair pixel clusters, outlines, palette changes, and details that disappear at gameplay size |
The video route is the main workflow here. If you already have separate pose images, join at the cleanup stage. Packing works the same way once every frame has the correct size and anchor.
Can an image model draw the whole sheet?
You can ask for several poses on one image, then cut them into frames. Inspect the actual pixel dimensions and every panel before treating it as a grid. The four-row illustration later in this guide has visible cell lines, yet its dimensions do not divide evenly into eight columns and four rows. Use a generated sheet as a pose draft: repair or redraw weak poses, place each on the common canvas, and repack them. If one pose fails, editing that pose separately lets you keep the others.
Set the character, action, and canvas before generating
Start with one full-body character facing the direction you need. Leave room around the hands, feet, ears, tail, and weapon. If your reference is a turnaround sheet, crop one chosen view for the motion input. A model asked to animate several views at once may interpret them as different subjects. Keep the full reference sheet separately for checking costume details.
Write down the identity details you can inspect: silhouette, head-to-body ratio, scarf color, belt position, boot shape, and which hand holds a prop. Check these at the intended display size. A face that looks consistent in a large preview may become unreadable when the character is 48 pixels tall. If the reference itself keeps changing, first build a stable set using the character consistency workflow.
Choose a provisional cell size and ground point. For a worked layout example, use 128 × 160 pixels per frame and a ground anchor at (64, 144), measured from the top-left. Eight frames in one row produce a 1024 × 160 PNG. These are illustrative design choices, not dimensions measured from the fox replay. Pick a larger cell if the widest attack or tallest jump would be clipped.
Plan each action's behavior before deciding its frame count:
| Action | What to select | Playback decision |
|---|---|---|
| Idle | A small, readable change in breathing, posture, or secondary motion | Loop it; remove accidental whole-body drift without erasing the intended motion |
| Walk | Opposite foot contacts with passing and weight-transfer poses between them | Loop it and match cadence to movement speed |
| Run | Clear push-off and recovery, plus a flight phase if the intended gait has one | Check that the action reads as running at gameplay size |
| Attack or hit reaction | Anticipation, an identifiable impact, and recovery | Usually play once; decide exactly when damage or the reaction begins |
| Jump | Takeoff, an airborne pose, and landing | For variable jumps, separate takeoff, air, and landing states so gameplay controls their duration |
| Four or eight directions | The required views with matching proportions and action phases | Keep directions in separate animations; review transitions when the player turns |
For a symmetrical side-view character, mirroring may cover left and right movement. Check it before relying on it: a shield, written emblem, damaged eye, or weapon hand will change sides. A back view also requires visual information absent from a single front view. Draw or generate and approve that view explicitly.
Generate one action and reject unusable motion early
Give the image-to-video tool your chosen view and ask for one action in a fixed shot. Keep the provider's output file before editing it. Record the reference, prompt, provider and model, generation settings, and the candidate you chose, so a later revision can be compared with the same input.
This is a suggested brief for the fox-style walk example. It has not been tested as a new video-generation prompt:
Create one left-facing walk cycle for a small 2D game character.
Use the attached full-body image as the identity reference.
Preserve the face, silhouette, scarf, belt, boots, palette, and proportions.
Walk in place. Show a clear left-foot contact, weight transfer,
passing pose, opposite contact, and return toward the starting phase.
Keep the entire body visible and the ground level stable.
Use a fixed camera and a plain background distinct from the character.
Keep tail and scarf motion restrained and consistent with walking.
No cuts, zoom, camera rotation, new props, text, particles,
costume changes, extra limbs, or feet leaving the image.
Return a short candidate video for inspection.
For an idle, replace the stride instructions with the small movement you want. For an attack, specify the weapon hand, wind-up, impact direction, and recovery. A prompt asking for walking, jumping, attacking, and turning in one short clip makes it harder to isolate a complete version of any one action.
Scrub through the whole result before removing any background. Reject a candidate if a foot vanishes at contact, the head changes design, the body rotates away from the required view, or the camera crops a necessary limb. An isolated bad drawing may be repairable. Missing motion phases or repeated costume changes call for another candidate or a change to the animation method.
A documented route in Runway
If you need a specific interface to start from, Runway's Gen-4.5 guide documents this route. On October 16, 2026, it lists Standard or higher as the plan requirement and charges generation credits. We reviewed the instructions without running a generation:
- Open Apps View and search for
Gen-4.5, or choose it in Tool Mode with Video selected. - Drop your chosen character image into the prompt window. Confirm that the chosen aspect ratio keeps the whole body visible.
- Enter the motion prompt, choose a duration, and review the generation cost. The documented duration range is 2 to 10 seconds; four seconds is a starting choice for this exercise.
- Select
Generate. When it finishes, inspect the candidate and use the download control below the result to save the video locally.
Runway's image-to-video prompting guide recommends concentrating the text on motion because the image supplies the appearance. You can shorten the earlier brief to:
Fixed camera. The character walks in place facing left, with clear
alternating foot contacts and a gentle rise and fall of the body.
The full body stays in frame. The tail follows the stride.
The motion returns toward its opening phase.
Download a candidate video and continue with the same extraction and cleanup steps below. A successful generation does not establish that the feet, identity, or loop are usable.
If you use the Character Animation Skill
The reviewed repository, introduced in @danny489642's original post, includes a generic provider adapter. At this pinned revision, its example endpoints and model name are placeholders. The generation command stops with FIRST-RUN SETUP REQUIRED until it is configured. You can use a video generated elsewhere and run the offline scripts without that adapter.
If you configure it, map the actual provider's upload, generation, polling, and download responses to the adapter. It sends the reference image to the configured service. Check that service's image-use terms and cost before making a call, and supply its API key through the named environment variable. Copying an example configuration or creating a .env file alone does not establish a working provider connection.
Extract frames and inspect the actual replay
You need FFmpeg for extraction and Python with Pillow for the repository's alignment and packer. To reproduce the pinned offline example, use a fresh working directory:
git clone https://github.com/youxichuhai/character-animation-skill.git
cd character-animation-skill
git checkout 7593bab755b160476978b1648b190f2a7e99cf41
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
ffmpeg -version
python scripts/extract_frames.py \
--video examples/source_4s.mp4 \
--output-dir output/raw_frames \
--fps 8
python scripts/align_frames.py \
--input-dir output/raw_frames \
--output-dir output/frames
python scripts/build_spritesheet.py \
--input-dir output/frames \
--output output/spritesheet.png
The activation command above is for macOS and Linux shells. In Windows PowerShell, activate the environment with .venv\Scripts\Activate.ps1. FFmpeg must be installed and available on your command path. The repository specifies minimum dependency versions, so save the versions from your own environment with python -m pip freeze > installed-versions.txt.
The example MP4 is 4.000 seconds, 768 × 1120 pixels, and 24 fps, encoded as H.264 yuv420p. The offline run gives the following results:
| Stage | Observed output | What it establishes |
|---|---|---|
| Extraction at 8 fps | 32 PNG candidates, all fully opaque | Fixed-rate sampling worked; pose selection and transparency remain |
| Default alignment | 32 canvases at 684 × 944 pixels | The canvases match; the interior black matte remains |
| Default packing | 4104 × 5664 PNG, six columns and six rows | 32 populated cells and four unused cells |
| Clean eight-frame example | Supplied separately in the repository | The offline commands do not explain its full curation and cleanup |

The first two adjacent comparisons measured only 0.06 and 0.08 mean absolute RGB difference on a 0 to 255 scale after each cell was reduced to 24 × 32 pixels with Lanczos resampling. That supports the visible near-duplicate opening. It is a diagnostic for this example, not a universal cutoff for rejecting frames. A subtle idle can intentionally contain very similar poses.
For your own source.mp4, you can extract candidates directly without installing the Skill:
mkdir raw_frames
ffmpeg -n -i source.mp4 -vf fps=8 raw_frames/frame_%04d.png
The FFmpeg fps filter sets the output sampling rate. A four-second input at 8 fps yields 32 candidates in this example. Increasing the rate gives you more time samples to inspect; it cannot repair a malformed hand or create a motion phase absent from the video. Use a fresh output folder for each extraction. The repository's script overwrites matching filenames and counts existing PNGs, so reusing a directory can leave stale frames.
Select poses by their role in the action
View the candidates in chronological order with their filenames visible. First identify a complete action. For walking, find a clear contact of one foot and the next contact of that same foot after the opposite step. Within that span, look for the down, passing, and high positions on both halves of the cycle. Keep extra frames where they clarify weight or an overlapping leg.
Do not select every fourth image solely to reach eight frames. The opening may hold still while the middle moves quickly. Uniform selection would spend frames on the hold and skip the useful movement. Likewise, two files with different pixels may show the same pose with only changing fur texture.
Keep a small selection table with source filename, pose role, keep or reject, and reason. Rename the chosen frames with zero-padded playback names such as walk_00.png through walk_07.png, keeping that mapping to the source. This prevents alphabetical sorting from placing frame 10 before frame 2. Copy selected frames into their own folder so the packer cannot include rejects.
For attacks, select the wind-up and impact first, then add the recovery. For a jump controlled by gameplay, choose useful takeoff, airborne, and landing poses for separate states. For an idle, judge the silhouette and breathing rhythm; a large pose difference is not the objective. If no candidate contains a necessary contact or impact, stop trying to solve that missing phase by rearranging the other frames.

The illustration groups walking, running, jumping, and attacking into four rows. It shows how an action plan can be organized, but we have not checked its poses as a continuous animation. The 1774 × 887 image also does not divide into integer-sized cells for an 8 × 4 engine grid. Use it as a visual planning reference. Build your export from separately cleaned frames on an exact grid.
Remove the background without removing the character
The extraction above preserves the video's opaque pixels. The alignment script estimates a background from the top-left pixel, finds a rectangular bounding box, and puts that rectangle onto a transparent canvas. It does not erase the background inside the rectangle. Black pixels between an arm and the torso therefore remain even when the outside padding is transparent.
In the retained replay, 9,408,576 pixels, or 40.48% of the packed image, had alpha 255 and all RGB channels below 18. The supplied eight-frame example had 9,050 such pixels, or 0.18%. Dark boots and outlines also satisfy this rule, so the count alone cannot tell you which pixels to erase.

Choose the cleanup method from the image you actually have:
- For a flat background distinct from every character color, use a color selection or mask in your image editor. Start with the exterior connected background, then inspect enclosed gaps between limbs, under the tail, and inside a weapon grip separately.
- If the matte and character share a color, protect the character with a subject mask or manual selection before deleting background pixels. A global black-to-transparent operation would also remove black gloves, eyes, and outlines.
- For fur, blurred edges, smoke, or translucent fabric, use a matting workflow with editable masks. Compare adjacent frames so the edge does not change thickness or lose the same hair repeatedly.
- If the background is already transparent, preserve that alpha channel. Check whether the apparent checkerboard is an editor display or pixels baked into the image.
For a flat matte in GIMP, add an alpha channel if needed, then try Colors > Color to Alpha on a copy and sample the matte color. Its documented transparency and opacity thresholds control which colors become transparent or remain opaque. Protect any character areas that share the matte color and inspect the preview before applying it. When you want to select only the connected exterior, use Fuzzy Select; Select by Color also selects similar colors elsewhere in the image.
Work on copies of the selected frames and keep their canvas dimensions unchanged. In an editor that supports transparency, create or edit a mask, inspect the result, then export RGBA PNGs. Reopen one exported file before batch processing the rest. A PNG extension alone does not establish that any pixels are transparent.
Preview each frame against white, black, and a saturated color. White exposes dark matte remnants; black exposes pale fringes; a contrasting color makes holes and missing outlines easier to see. Inspect the alpha channel as a grayscale image as well. For hard pixel-art edges, decide deliberately whether partial alpha belongs in the style. Painted edges may need partial transparency to avoid a jagged silhouette.
If an edge still looks dark after its alpha has been softened, its RGB color may contain the old matte. Repair those edge colors or refine the mask. Increasing transparency repeatedly can shrink the character while leaving the fringe visible.
Keep a shared anchor and preserve intentional motion
Put every cleaned frame on the same canvas. Mark a common ground point or animation root on a separate guide layer. For an in-place walk, compare the planted feet and pelvis against that guide while stepping through the frames. Translate a frame to correct accidental drift; retain the intended rise and fall of the gait.
A bottom-center bounding box can be misleading. The lowest pixel might be a scarf tip, shadow, or leftover matte speck. A wide tail can shift the box's center while the body stays still. Clean stray pixels and judge a consistent anatomical reference instead of automatically centering each silhouette.
Separate scale drift from position drift. If the head and torso repeatedly grow, moving the image cannot fix them. A consistent rescale may help a small uniform size change, but a changing head-to-body ratio needs drawing repair or a new candidate. Avoid stretching each frame to fill its cell, which would conceal the original drift by creating new distortion.
For the 128 × 160 layout example, keep the root at (64, 144) in every frame. The unused 16 pixels below it leave room for effects or drawing variation. Choose enough space above and beside it for the entire action. Do not trim each frame independently unless your atlas format also preserves its original offset and pivot.
Resize the batch at one scale
The replay's 684 × 944 cells and the 128 × 160 worked layout are different sizes and proportions. Stretching the replay directly into those smaller cells would distort the character. First choose one scale for the character, then apply it to every frame and place the results on the chosen output canvas. Make the canvas large enough for the full action around its shared root.
For a separate numerical example, suppose you have aligned every pose on a 1024 × 1280 canvas with the root at (512, 1152). Scaling the entire canvas by one eighth gives 128 × 160, with the root at (64, 144). In Pillow, image.resize((128, 160), Image.Resampling.LANCZOS) performs that resize for a painted RGBA image; the resize documentation describes the filter choices. Use nearest-neighbor resampling when preserving an existing hard pixel grid. Shrinking a painted image alone does not produce finished pixel art.
Keep the scale fixed across actions as well. If an attack extends farther than a walk, add canvas space around the same-size character. After resizing, recheck the alpha edges, one-pixel details, and the position of the ground point.
Jumping needs a separate decision. If the game controller moves the whole character upward, prepare the airborne drawing around a stable local root. If the sprite animation itself contains the vertical arc, preserve that displacement. Applying both can double the movement; bottom-aligning every airborne drawing can erase it. Keep a cast shadow on a separate layer when it would otherwise distort the anchor calculation.
Set playback timing and check the loop seam
Extraction fps and animation fps are independent. Eight selected drawings played at 8 fps last one second. At 12 fps, the same drawings last about 0.667 seconds. For unequal frame holds, the duration is the sum of those holds. Decide the timing from the action's weight and gameplay needs.
Play the full sequence, then inspect last → first → second. Watch the feet, head position, silhouette, and tail direction. If the last drawing repeats the first, holding both may create an unintended pause. Remove a redundant endpoint when that fixes the seam; retain a repeated drawing when its hold is intentional. Reversing the sequence into a ping-pong loop also reverses weight transfer and secondary motion, so review the result before using that shortcut.
For an in-place walk, compare the planted foot with the floor while the controller moves. As a timing example, a cycle designed to represent 64 pixels of travel over 0.8 seconds corresponds to 80 pixels per second. This is a planning calculation, not a speed measured from the fox video. If the game moves faster or slower, adjust the cadence, stride, or movement speed together. A planted foot that skates across the floor signals a mismatch.
An attack can use a longer anticipation or recovery hold while keeping a short impact. Record the damage window separately from the visual PNG. For variable-height jumps, keep the air state active for the time controlled by gameplay and enter the landing state on contact. A single fixed-duration jump clip cannot by itself describe every possible jump length.
Pack an exact grid and keep its frame map
After cleanup and alignment, place only selected frames in output/clean_frames. With the pinned repository, request eight columns explicitly:
python scripts/build_spritesheet.py \
--input-dir output/clean_frames \
--output output/walk.png \
--columns 8
With eight equal 128 × 160 inputs, expect 1024 × 160. The builder sorts filenames. It also accepts unequal image sizes and positions them within the largest cell, which can move the intended root. Check dimensions before packing and avoid using that behavior as an alignment fix.
You can also pack with Pillow alone. Save the following as pack_equal_frames.py and run python pack_equal_frames.py from a directory containing clean_frames. It expects lowercase .png filenames in playback order and writes into a new packed directory. It checks dimensions and records occupied cells; it performs no matting or pose correction.
from pathlib import Path
import json
from PIL import Image
files = sorted(Path("clean_frames").glob("*.png"))
if not files:
raise SystemExit("No PNG frames in clean_frames")
images = []
for path in files:
with Image.open(path) as image:
images.append(image.convert("RGBA"))
width, height = images[0].size
if any(image.size != (width, height) for image in images):
raise SystemExit("All frames must have the same canvas dimensions")
columns = 8
rows = (len(images) + columns - 1) // columns
sheet = Image.new("RGBA", (columns * width, rows * height), (0, 0, 0, 0))
cells = []
for index, (path, image) in enumerate(zip(files, images)):
x, y = (index % columns) * width, (index // columns) * height
sheet.alpha_composite(image, (x, y))
cells.append({"file": path.name, "x": x, "y": y})
folder = Path("packed")
folder.mkdir(exist_ok=False)
sheet.save(folder / "sheet.png")
metadata = {"cell_width": width, "cell_height": height,
"columns": columns, "rows": rows,
"frame_count": len(images), "frames": cells}
(folder / "cells.json").write_text(json.dumps(metadata, indent=2), encoding="utf-8")
print(f"{len(images)} frames; {sheet.width}x{sheet.height}; map in packed/cells.json")
Install Pillow in an isolated Python environment if needed. The script refuses an existing packed folder; move the prior result aside before another run. Its JSON is a simple frame map for inspection, not a Unity or Godot importer format. Record animation names, frame durations, loop behavior, and the common root alongside it.
For the eight-frame worked layout, a complete playback note could look like this. Save it beside the cell map and use it to enter the settings in your engine. The JSON records the settings for this example. Enter them in your engine; the note itself is not an engine resource:
{
"image": "sheet.png",
"cell_size_px": [128, 160],
"grid": [8, 1],
"frame_count": 8,
"anchor_px": [64, 144],
"anchor_origin": "top-left",
"animations": {
"walk_left": {
"frame_indices": [0, 1, 2, 3, 4, 5, 6, 7],
"duration_ms": [125, 125, 125, 125, 125, 125, 125, 125],
"loop": true
}
}
}
Here the eight holds total one second, equivalent to 8 fps. An attack could use a different list of holds and loop: false. Keep separate entries for different actions or directions, and define whether frame indices count across the sheet from left to right, then top to bottom; that is the order used here.
For a GUI route, Aseprite's sprite-sheet documentation covers File > Import Sprite Sheet with cell size, offset, and padding, and File > Export Sprite Sheet for exporting an animation. Its timeline lets you preview frames, change their duration, and tag action ranges. Check the imported order before exporting.
Check integer dimensions before engine slicing: sheet width must equal columns multiplied by cell width, and height must equal rows multiplied by cell height for this gap-free grid. With 10 frames and eight columns, there are two rows and six unused cells. Keep the occupied frame count; those unused cells must not enter the animation. If you add gaps or borders, record their exact sizes and configure the slicer to match.
Import the selected frames into Godot or Unity
Godot with AnimatedSprite2D
Following Godot's 2D sprite animation tutorial:
- Add an
AnimatedSprite2Dnode and create aNew SpriteFramesresource in its Sprite Frames property. - Open the resource and choose
Add frames from a Sprite Sheet. Select your PNG. - Set horizontal and vertical counts to your grid, such as eight and one for the worked layout. Select only occupied cells in playback order.
- Name the animation
walk, choose its speed and loop behavior, and preview it. Put other actions in separate animations.
Then position the visual relative to the controller's origin so its chosen ground point meets the floor. Review controller movement and state changes alongside the resource preview. Treat a collision shape as a gameplay decision separate from the sprite outline.
Unity with the Sprite Editor
Unity's Sprite Editor reference documents equal-grid slicing and custom pivots:
- Import the PNG as a sprite and set
Sprite ModetoMultiple. Open the Sprite Editor. - Choose
Slice, thenGrid By Cell Sizewith 128 × 160 for the worked layout, orGrid By Cell Countwith eight columns and one row. - Set any offset and padding to match the export. Check every occupied rectangle and assign a consistent pivot, then apply.
Unity normalized pivots use the bottom-left as (0, 0). The example root at top-left (64, 144) on a 128 × 160 canvas therefore becomes (0.5, 0.1). Use your actual root when calculating it.
To create the clip, select the character GameObject and open Window > Animation > Animation. For an object without an animation, choose Create and save the clip; for an object with existing clips, use Create New Clip in the clip menu. Unity documents this in creating an Animation Clip. Build the sprite sequence from your slices in the intended order, set its timing and loop behavior, then test it with the controller. Keep the same pixels-per-unit setting across the character's actions using the sprite import settings. For pixel art, inspect point filtering and compression at the actual camera scale; for painted sprites, inspect edge quality under the filter you intend to use.
Troubleshoot the symptom you can see
| Symptom | What to inspect | Next action |
|---|---|---|
| Character becomes a black rectangle in the game | Alpha channel and background inside the crop | Remove the matte; transparent outside padding leaves interior pixels untouched |
| Boots or eyes have transparent holes | Whether a global color deletion selected character colors | Restore those pixels and restrict background removal with a mask |
| Body bounces or shifts sideways | Root guides, independent trims, and changing tail bounds | Restore a common canvas and correct accidental translation |
| Character pulses in size | Head and torso proportions across neighboring frames | Repair scale or regenerate; recentering alone will not fix it |
| Loop pauses once per cycle | Repeated endpoints, long holds, and unused grid cells | Correct the selected frame list and seam timing |
| Feet slide while the character moves | Contact timing against controller displacement | Adjust movement speed, stride, or playback cadence together |
| Attack lands before the visible impact | Animation holds, state transitions, and damage timing | Move the gameplay event to the intended phase and review interruption behavior |
| Tail or weapon is cut off | Source video boundaries, cell size, and engine rectangles | Enlarge and realign the canvas if pixels exist; regenerate if the source cropped them |
| Colored strips appear beside a sprite | Slice boundaries and neighboring cells under the active texture filter | Correct the rectangles and test suitable padding or edge extrusion in the export pipeline |
| Pixel-art outline crawls | Changing pixel clusters, resampling, compression, and subpixel display positions | Repair at target resolution and inspect the final import and camera settings |
Check the asset at gameplay size before handing it off
Open a minimal scene with the intended camera scale, a floor, and both light and dark scenery. Play each action while stationary and while moving. Check idle-to-walk, walk-to-idle, direction changes, attack recovery, and landing where those states exist. Pause on the contact and impact frames. This catches problems that a large contact sheet can hide.
Check texture dimensions and memory as well. The raw 4104 × 5664 replay would require about 88.7 MiB for one uncompressed RGBA8 base image, calculated as width × height × four bytes. That estimate excludes mipmaps and runtime overhead; compressed formats change the result. The illustrative 1024 × 160 eight-frame sheet is 0.625 MiB under the same calculation. Downsize to the actual art requirements and review the texture settings on the target platform.
Keep the source reference, provider output, selection map, editable masks or layered animation, cleaned frames, packed PNG, and frame metadata together. Record the source asset's license and the provider terms relevant to your use. The repository's MIT license covers its reviewed materials under those terms; it does not establish rights to an unrelated character you upload or to every provider's output.
Hand off the PNG with its cell size, grid dimensions, occupied frame indices, action names, durations, loop flags, anchor coordinates and coordinate convention, and intended display scale. Include the engine and scene used to check playback. If it has not been played in the game yet, state that in the handoff.
