AI 2D & pixel art
Buril's 2D pipeline targets pixel art, sprite sheets, and tile sets specifically — the domain where AI tools have caught up to (and occasionally exceeded) hand-craft for production-acceptable output. The pipeline composes:
- PixelLab — the leading per-sprite AI provider, wired via
pixellab-mcp. - SpriteCook — sprite sheet and tile set generation.
- Aseprite — the industry-standard pixel editor, wired via
pixel-mcp(an OSS MCP server we've absorbed and extended). - Local stable-diffusion-pixel pipeline — ControlNet-driven SD generation tuned for low-res pixel output.
Tool families:
| Family | What |
|---|---|
pixel_* | Aseprite bridge, palette ops, dithering, sprite sheets |
pixellab_* | PixelLab cloud (BYOK) |
spritecook_* | SpriteCook cloud (BYOK) |
pixelgen_sd_* | Local stable-diffusion-pixel pipeline (via ComfyUI) |
Total: ~45 tools.
The pipelines
A. Generate a single sprite
Generate a 32x32 pixel-art knight sprite, idle pose, and save to
Assets/Sprites/Knight_Idle.png.
The pixel-cook specialist picks the provider (PixelLab cloud by default if a key is wired; SD-local otherwise):
pixellab_generate --prompt "knight" --resolution 32x32 --view idlepixel_palette_constrain --max_colors 16pixel_export_png --path Assets/Sprites/Knight_Idle.png
Total time: 5-15 seconds.
B. Generate a sprite sheet
Generate a 4-direction walk-cycle sprite sheet for the knight, 32x32, 8 frames per direction.
spritecook_generate
prompt: "knight, pixel art"
resolution: 32x32
views: ["north", "south", "east", "west"]
frames_per_view: 8
output: Assets/Sprites/Knight_Walk.png
SpriteCook returns a single PNG with 32 sprite frames arranged in a grid, plus an Aseprite-compatible .aseprite source.
C. Generate a tile set
Generate a 16x16 dungeon tile set: walls, floor, doors, stairs, water.
spritecook_tileset_generate
prompt: "fantasy dungeon"
resolution: 16x16
categories: [wall, floor, door, stairs, water]
output: Assets/Tiles/Dungeon/
Returns one PNG per category plus a Unity Tilemap-ready Asset bundle. The pixel_unity_tilemap_assemble post-step wires the tiles into a TilePalette.
D. Edit in Aseprite (round-trip)
Open the knight sprite in Aseprite, add a sword in the right hand, and bring it back.
The pixel-cook specialist:
pixel_aseprite_open --path Assets/Sprites/Knight_Idle.pngpixel_aseprite_apply_brush --target "right_hand_anchor" --brush sword_shortpixel_aseprite_savepixel_aseprite_export_png --path Assets/Sprites/Knight_Idle.png
Aseprite must be installed locally. The bridge talks to Aseprite over its scripting API via the pixel-mcp MCP server.
Installing pixel-mcp
Python 3.11+:
pip install pixel-mcp
Register in Buril:
Tools → Buril → MCP Hub → Register External → Type: pixel-mcp
pixel-mcp is OSS — Buril ships extensions on top in Tools~/pixel-mcp-buril/. See Third-party licenses for attribution.
PixelLab vs. SpriteCook vs. SD-local
| Need | Use |
|---|---|
| One-off sprite, fast and on-brand | PixelLab (best per-sprite quality) |
| Animated sprite sheet (walk, attack, etc.) | SpriteCook (sheet-aware) |
| Large tile sets and biomes | SpriteCook (tileset mode) |
| Offline, no API budget | SD-local (Stable Diffusion via ComfyUI) |
Palette enforcement
AI providers occasionally output 256-color RGBA where you wanted 16 colors. The pixel_palette_constrain tool snaps any input to a palette:
{
"tool": "pixel_palette_constrain",
"input": {
"path": "Assets/Sprites/Knight_Idle.png",
"palette": "endesga-32",
"dither_mode": "ordered"
}
}
Bundled palettes include endesga-32, pico-8, nes-54, gameboy-pocket-4, pixel-perfect-32. You can supply a custom palette as a JSON array of hex codes.
Animation export
Aseprite's tags + frame durations are preserved through the round-trip. Export to:
- Sprite sheet PNG + JSON metadata (TexturePacker format) —
pixel_export_sheet. - Unity AnimationClips per Aseprite tag —
pixel_export_unity_clips. - GIF for prototyping —
pixel_export_gif.
Common issues
| Symptom | Fix |
|---|---|
| Generated sprite looks blurry | Resolution was too low; AI upsamples. Set explicit resolution. |
| Walk cycle frames inconsistent | SpriteCook uses a per-frame prompt — set consistency_anchor to the first frame's hash. |
| Tilemap edges don't tile | Run pixel_make_seamless on each tile category. |
| Aseprite bridge fails to connect | pixel-mcp server not running. Re-register in MCP Hub. |
Read next
- AI 3D generation — the 3D counterpart.
- MCP registry —
pixel-mcpand other MCP servers.