minecraft-texture
Minecraft Texture
Workflow modeled on the ai-kit texture tool (https://ai-kit.xingduansuzhao.com/texture): generate the texture with an image model, then post-process it into usable 16x16 / 32x32 pixel textures. The post-processing (white-background removal + color-block sampling) is implemented in
scripts/mc_texture.py— no login or external service required.
Workflow
- Generate — use an image model (e.g. the
imagegenskill) with a prompt that produces a flat front view of the item/block that fills the whole frame on a plain white background. Do NOT ask for grid lines — the pipeline converts white to transparency and samples color blocks directly. See best-practices-prompts. - Post-process — run the pipeline script:
python scripts/mc_texture.py pipeline texture.png -o out/ --sizes 16,32
This replaces the white background with transparency, samples the dominant color of every block, and writes out/texture-16x16.png and out/texture-32x32.png.
3. Verify — run python scripts/mc_texture.py check out/texture-32x32.png for a programmatic check (near-white dots, transparency ratio; no vision model needed). Rerun with a tuned --tolerance / --white-cutoff if background edges bleed or thin details disappear.