Vox2png
Converts a MagicaVoxel .vox file into layered sprites and writes them to a .png file
Install / Use
/learn @jemisa/Vox2pngREADME
vox2png
This program was inspired by this post on /r/gamedev.
The technique described here not only looks nice, but allows you to do voxel graphics in purely 2D engines (as long as you can do matrix transformations).
The big downside is that it is an absolute PITA to create assets for, because you need to draw your voxel object layer-by-layer by hand.
To make this a lot easier I decided to write this program.
It takes a MagicaVoxel .vox file, and creates a .png sprite sheet from it.
To show you what I mean by that, here are some screenshots:
Source model:
Resulting sprite sheet:

// TODO Add an in engine screenshot here
Building and running
Vox2png doesn't have any dependencies except the C Standard Library (and math.h). Just compile vox2png.c with your C compiler, like this:
gcc vox2png.c -o vox2png -lm
Then you just run it like this:
./vox2png input.vox output.png
Or, if you want to use a special sprite packing mode use this:
./vox2png input.vox output.png horizontal/vertical/square
There is also a mode that gives each sprite cell its own png file:
./vox2png input.vox output multifile
Which produces numbered files for each Z layer, like this: output0.png, output1.png .. outputN.png
If you want to see a certain feature, just ask me and I'll add it. Or, if you know C, it shouldn't be hard to do it yourself.
Related Skills
node-connect
352.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
