Generate clean 2D game sprites & animation atlases — component-row pipeline: state rows, alpha cleanup, frame extraction, runtime atlases. Codex/Claude skill.
chore(release): prepare 2.18.0 walk loops repaired by RIFE, jolt reported, one cycle per set
Soohong Kimb36556e945d4
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 72922c6..47175f1 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -2,6 +2,15 @@All notable public changes to `sprite-gen` are recorded here. Versions track the `version:` field in `SKILL.md` and `pyproject.toml`.+## v2.18.0 - A walk's jumping frames are remade by RIFE, its jolt is measured, and a direction set shares one cycle++- **Jump frames are repaired** (`video-loop --repair auto`, the default for walk and run): a step whose coverage change is 1.4x the loop's median, over the whole body or the hair behind it (`--facing left` mirrors that box), is a jump, and the frame that broke it is replaced by the RIFE frame half way between its two neighbours — at most three, worst first, never next to a frame already made; every other frame stays the video's own. A single stray frame, which breaks the step into it and out of it, is the one remade. The report's `jump_repair` names the frames, the scores before and after and the interpolator; with a frame replaced the seam gate reads the rendered cells. `--repair off` cuts as filmed. On the 2026-10-03 eight-direction set it replaces the frames the experiment did in 8 of 10 views (the other two differ by one frame).+- **RIFE** is `rife-ncnn-vulkan` 20221029 with `rife-v4.6`, found by `SPRITE_GEN_RIFE` or `PATH` and located only when a frame is to be made; a loop that needs it and finds none fails naming `--repair off`. Colour is interpolated premultiplied and coverage separately. Measured: 0.33-0.41 s a call on an M4 Max GPU; 2.8-3.0 s in a Modal Linux container through Mesa llvmpipe, with the same frame; the binary's own CPU path (`-g -1`) is wrong and never passed. Code and weights are MIT. CI installs it on llvmpipe.+- **The jolt index is reported on every walk and run** (`jolt` in the loop report), read after the repair: how far each step strays from its neighbours' mean over the median step, the hair's, and the head's frame-to-frame moves sideways and up and down in % of the body height (largest, median, largest over median, range). Beyond the reference bounds (index 0.43, head sideways 0.75 %) it is a warning line and the loop is kept; `--jolt-max` / `--head-step-max` turn a bound into a gate (`video-loop: loop jolts — …`). As a default gate the bounds would have refilmed 16 of 30 Lite takes on two refusals' evidence, and the index does not separate an alternating side walk from a kept Pro walk (0.414), so they stay a reference.+- **One cycle per direction set**: new `sprite-gen video-cycle-align --loop-dir … --loop-dir …` resamples every loop to the set's median length at times k·L/L* — a time on a source frame keeps that frame, only times between frames are made by RIFE — turns each to start on a foot strike, and rebuilds its cycle, strip, GIF and WebP in place (`cycle_align` in `strip.json`). The cut as filmed is kept in `cycle.source/`, so a second run never resamples a resampled loop. `video-set` runs it for every walk or run filmed in two or more directions (`--align-cycles auto`, default). Strip metadata now records `cell_height_cap`.+- **Measured walk defaults**: `build_prompt(model=...)` calms a Lite walk (`LITE_WALK_TEXT`; Lite read "walks naturally" as a run) and holds a Lite back-diagonal walk's head (`LITE_HEAD_TEXT`; sideways sway 2.7-3.8 % fell to 1.7-3.1 %, Pro 0.88 %); Pro prompts are unchanged. A front or back walk films from its base still redrawn mid-step (`WALK_START_TEXT`, `walk_start_prompt`, `starts_mid_step`; 1 of 14 front clips walked straight from a standing still, 14 of 16 from a mid-step one); `video-set --walk-start redraw` (default) draws it with one `sprite-gen gen --ref` call.+- Method, measurements and the regression on the eight-direction set: [docs/loop-repair.md](docs/loop-repair.md).+## v2.17.0 - Two three-quarter views: a character walks down and up to the right as in an isometric game- `front_diagonal` and `back_diagonal` join `side`, `front` and `back` (`VIEW_TEXT`): three-quarter views turned to the right, the two an isometric game adds between the side and the front or back. Turned over (`video-loop` outputs mirrored), they give the left-hand two, so five views make eight directions.diff --git a/SKILL.md b/SKILL.mdindex 122d99a..fa5d153 100644--- a/SKILL.md+++ b/SKILL.md@@ -1,6 +1,6 @@---name: sprite-gen-version: 2.17.0+version: 2.18.0description: "Generates images and game sprites through GPT or Grok with guided provider choices, separate saved defaults, automatic cleanup and optional curation. Handles sprite requests, ordinary image generation/editing, standalone image-to-video clips (i2v, animate this still, 그록 영상, 이매진 비디오, 스틸 움직여줘, first/last frame, reference-to-video, 영상 이어붙이기, 영상 편집, extend/edit a clip), chroma removal, animation atlases, video loops, 큐레이션뷰, image candidates, 팔레트 스왑, palette swap, recolor, rig layers, engine exports, repeating backgrounds, projected shadows, motion/contact inspection and optional scene composition from existing assets."license: Apache-2.0depends_on:@@ -11,6 +11,8 @@ depends_on:why: "video-frames (clip -> frames) and video-set"- name: img2webpwhy: "video-loop WebP with exact alpha (libwebp); Pillow's animated writer drops -exact"+ - name: rife-ncnn-vulkan+ why: "video-loop jump repair and video-cycle-align (RIFE v4.6 in-betweens, release 20221029; SPRITE_GEN_RIFE names the binary; Linux without a GPU also needs mesa-vulkan-drivers)"required_scripts:- scripts/prepare_sprite_run.py- scripts/generate_sprite_image.pydiff --git a/pyproject.toml b/pyproject.tomlindex f6d9581..50a02db 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -12,7 +12,7 @@ build-backend = "setuptools.build_meta"name = "sprite-gen"# Release discipline: keep this package metadata version synchronized with# SKILL.md's `version:` field in the same release commit.-version = "2.17.0"+version = "2.18.0"description = "Component-row pipeline for clean 2D game sprites and animation atlases"readme = "README.md"license = "Apache-2.0"