Transparent cutout cleanup
Skill 0xheycat/isometric-game-skills/skills/transparent-cutout-cleanup
Agent-ready toolkit for isometric games: ComfyUI art pipelines, seamless terrain, sprites, grid math, Canvas2D rendering, pathfinding, and asset automation.
npx -y skills add 0xheycat/isometric-game-skills --skill transparent-cutout-cleanupAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use when removing backgrounds from generated sprites to get clean alpha edges with no halo, fringe, or leftover background pixels.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
1.9 KB, as published. Nobody here has run it
Transparent Cutout Cleanup
Overview
AI-generated sprites come on a background. Naive removal leaves a colored halo or jagged edge that screams amateur when tiles are placed together. This skill produces clean, premultiplied-safe alpha cutouts.
When to Use
- Any generated sprite needs a transparent background.
- Placed sprites show a white/gray halo or fringe.
- Edges look jagged or have leftover background color.
Process
- Generate on a PLAIN flat background (easier to key out than a busy one).
- Use a background-removal model (e.g. InSPyReNet / rembg) rather than a hard color key.
- Inspect edges at 400% zoom for halo or fringe pixels.
- Defringe / decontaminate edge color so no background tint remains.
- Erode the alpha by 1px if a faint halo persists.
- Save as PNG with straight alpha; verify on both light and dark backgrounds.
- Batch the cleaned sprites for the atlas packer.
Pair this with the ComfyUI rembg node in seamless-isometric-terrain/scripts.
Rationalizations (Stop Lying to Yourself)
| Excuse | Reality |
|---|---|
| "A white halo is barely visible" | On a dark tile it is glaring. Defringe every sprite. |
| "Hard color-key is faster" | It eats anti-aliased edges and looks jagged. Use a proper matting model. |
Red Flags - STOP if you catch yourself:
- Visible halo/fringe when placed on a contrasting background.
- Jagged, aliased cutout edges.
- Background color contaminating semi-transparent pixels.
Verification
You are NOT done until every box is checked:
- Edges are clean at 400% zoom on light AND dark backgrounds.
- No background-color contamination on semi-transparent pixels.
- All sprites exported as straight-alpha PNG.