Generate clean 2D game sprites & animation atlases — component-row pipeline: state rows, alpha cleanup, frame extraction, runtime atlases. Codex/Claude skill.
docs(changelog): 4.3.0's upgrade note says runs without --prop-plate keep 4.2.0's bytes but for the engine fingerprint implementation_sha256, which hashes every file in sprite_gen/video
Soohong Kimc284e1b6fc42
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 622673a..173d989 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -4,7 +4,7 @@ All notable public changes to `sprite-gen` are recorded here. Versions track the## Unreleased (v4.3.0)-**Upgrading from 4.2.0: runs without `--prop-plate` are unchanged (only `sprite_gen/video/prop_plate.py` changed, and `video-frames` reaches it only with the flag). Runs with `--prop-plate` now also find and erase shaded sides and tops a video model draws on the plate, erase pale green codec ringing and dark reddened box-edge lines within 4 px of what the plate's pixels and the colour rules took, exclude the side and top and their 4 px rim from `--decontam` palette learning, add `side_px` and `side_touch_px` to each frame row and `side_touching` to the frames report's `prop_plate`, print a third warning line when the plate's shaded side or top meets the subject, and refuse a canvas report without `prop_plate.rgb` before keying (`video-canvas --prop-plate` has always written it). `video-canvas --prop-plate` is unchanged. No new dependency, no model call.**+**Upgrading from 4.2.0: runs without `--prop-plate` give the same files, frames reports, stdout, and stderr byte for byte as 4.2.0, except the engine fingerprint `implementation_sha256` (in `producer` of the loop report and other reports that carry one, and in `measurement_engine` and `receipt_engine` fields), which hashes every file in `sprite_gen/video` (only `sprite_gen/video/prop_plate.py` changed, and `video-frames` reaches it only with `--prop-plate`). Runs with `--prop-plate` now also find and erase shaded sides and tops a video model draws on the plate, erase pale green codec ringing and dark reddened box-edge lines within 4 px of what the plate's pixels and the colour rules took, exclude the side and top and their 4 px rim from `--decontam` palette learning, add `side_px` and `side_touch_px` to each frame row and `side_touching` to the frames report's `prop_plate`, print a third warning line when the plate's shaded side or top meets the subject, and refuse a canvas report without `prop_plate.rgb` before keying (`video-canvas --prop-plate` has always written it). `video-canvas --prop-plate` is unchanged. No new dependency, no model call.**- **Fix: `video-frames --prop-plate` finds and erases shaded box sides and tops drawn on the plate, using the plate colour from the canvas report.** With the camera following the body, a video model can draw the flat plate as a box with thickness: a shaded side beside its front and a top above it in darker shades of the plate's colour. 4.2.0 matched only the bright front (pixels within 48 of the plate's colour on every channel), leaving any side wider than the 4 px rim in keyed frames and every cut from them as a vertical band of dark magenta, or a grey line where the side was thin. `video-frames --prop-plate` now reads `prop_plate.rgb` along with `prop_plate.box` from the canvas report (refusing a report without `rgb` before anything is keyed with `video-frames: --prop-plate: <path> holds no plate colour (prop_plate.rgb); make the canvas again with video-canvas --prop-plate`) and finds the front, the side and top, and the light span of the blend line by that one colour. In each frame, after the front is found as before, `find` locates the side and top: pixels that are a shade of the plate's colour, meaning the plate's colour times a least-squares brightness `k` (pixel dot colour over colour dot colour) between 0.4 (`SHADE_LEAST`) and 1, with each channel within `k * 48` of `k` times the colour so the tolerance darkens with the colour. They count only when joined to the front side by side or at corners (directly or through other shades), and only in pieces of shades holding at least 1% of the plate's area on the frame each (`PIECE_SHARE`, the same floor as the front's pieces). What is not read as a side: a shade the subject holds apart from the plate; dark magenta codec mixing where the subject's outline crosses the plate (too thin a piece; `side_px` is 0 in every frame of the synthetic clips without a side); a sliver of side the subject hides all but less than `PIECE_SHARE` of (the 4 px rim takes that sliver); black and the plate's colour at 0.35 of its light (at 0.4 it is a shade); and skin tones (of eight skin tones tested, mixed with the plate's colour as a codec blends an edge, the darkest (92, 51, 23) is read as a shade only from 0.47 of the plate's colour and a light one (238, 206, 178) from 0.78). Each frame's reported `box` spans the front and the side and top (seeding the next frame's search window), while `tilt` is measured on the front alone. Erasure and `--decontam` palette exclusion now cover the front, side, and top and the 4 px rim around them.- **Fix: the third erasure rule measures its 4 px reach from what the plate's pixels and the colour rules took.** In 4.1.0 and 4.2.0, opaque pieces remaining after the magenta and blend-line rules were erased only when they lay wholly within 4 px of the plate's pixels. They now go when they lie in a piece (opaque pixels joined side by side or at corners) wholly within 4 px of what the plate's pixels (front, side, and top) and the two colour rules took. This erases a box's far edge drawn darker and redder than any shade along with the grey line beyond it, and the pale green a codec rings just past the line the plate's edge blends into the key with, while keeping the subject reaching past that 4 px reach (with the rest of the line where its pixels touch it).