Repository navigation
Better game sprites: walk cycles at a steady speed, and a backdrop colour for characters that white hides.
What's new
A named animation can be a cycle
A named sprite animation (Walk, Hover) was always cut as a gesture played once: sampled across its whole length and pinned to the rest pose at both ends. A walk cut that way came out with uneven steps, an odd frame rate, and the same pose at its start and end, so it stuttered and stopped in every loop.
Tick Repeating cycle when you add or edit the animation in the Sprites workspace, or set Plays → As a cycle on the clip. It is then cut like the built-in run: one period at a steady 12 poses a second, with no pin to a standing pose.
| The same walk | Poses | Frame rate | First and last pose |
|---|---|---|---|
| As a gesture (before) | 12 | 5.39 fps | the same pose twice |
| As a cycle | 12 | 12 fps | one ordinary step apart |
Gestures (a wave, an attack) are unchanged, and an existing animation stays a gesture until you tick the box.
A backdrop colour
A sprite can now be drawn on Green or Blue where it was always white. Pick a colour the character does not wear: white suits a dark character, green or blue one with white or pale parts, which do not separate from a white backdrop.
- The colour is named in the prompt.
- Every picture the take reads is put on it. A transparent picture is laid on it. A picture drawn on another flat colour, such as a white plate, is cut out and moved, the gap between the legs included: the model copies a sliver of the old backdrop onto every frame.
- A colour other than white holds only on a take that is pinned along its length: an idle, a gesture, a clip with first and last frames, or a loop after Close loop. An unpinned take is still drawn on white.
So the way to a cycle on a colour is two steps: draft it, then Close loop.
Close loop keeps its pin as a cutout
The pose that Close loop pins is now taken from the take's cut-out poses and saved with its transparency. It used to be a frame of the movie flattened on white, which left a white rim on a take drawn on another backdrop.
For agents
| Setting | Values | Notes |
|---|---|---|
sprite loop |
true |
Beside animation, for a repeating cycle. Omit it for a gesture. |
sprite backdrop |
"white" (default), "green", "blue" |
Applies to a take pinned along its length; otherwise the take is drawn on white. |
H3LoadStill backdrop |
"none", "white", "green", "blue" |
A colour lays a transparent picture on it and moves one drawn on another flat colour. |
For a cycle on a colour: render the clip, call sprite-self-pin, set the returned self_pin on the clip, and render again.
How it was tested
Draft renders of one character at 512×512, 56 frames, 12 poses, plus the unit tests (731 pass).
| What | Result |
|---|---|
| Walk as a gesture against the same walk as a cycle | 5.39 fps with a repeated end pose, against an exact 12 fps |
| Cycles and runs after Close loop on green: walk in three headings (front, side, back) and a side run | green on all 56 frames of each of the four takes |
| Idles and a one-shot gesture on green, pinned by the editor | green on all 56 frames of each of the four takes |
| An idle on blue | blue on all 56 frames |
| A closed walk on green at final quality | green on all 56 frames, 12 poses at 12 fps |
| Unpinned drafts with green chosen | drawn on a flat pale backdrop, as designed, and cut out cleanly |
| White reference plates moved to green, zoomed on the legs | the gap between the legs is open in the plate and in the takes pinned to it |
| The whole flow in the editor: add a cycle, choose Green, draft, Close loop | first take on white, second on green, both at 12 fps |
Two things the tests ruled out, and the release leaves out:
- Magenta. A pinned idle left it for a grassy scene between its pins, so it is not offered.
- A colour asked for in words alone, or pinned on the first frame only. Green gave way to a dark floor or a dirt ground within a dozen frames. That is why an unpinned take is drawn on white.
Updating
Update from ComfyUI-Manager or pull the repository, then restart ComfyUI. Projects and existing takes are unchanged: a named animation stays a gesture, and a sprite stays on white, until you choose otherwise.
Full changelog: https://github.com/igorls/comfyui-h3-editor/blob/main/CHANGELOG.md