Voxel art without a mesh: a CPU raycaster that walks the grid
voxel-artist is a small Rust crate from a week in September 2025 (14 commits,
about 640 lines in src/). The whole pipeline is: fill a VoxelGrid with
colours from procedural shapes, shoot one ray per pixel through it on the CPU,
write a PNG (or a GIF, as of the fifth day). No meshes, no GPU, no assets.
The part I like is how little a shape has to be. Shape is one method,
color_at(x, y, z) -> Option<Color>, and rasterize_shape just asks it about
every voxel centre. A sphere is a distance check, and the cone and pyramid
(added later) are “how wide am I at this height.” Later shapes overwrite
earlier ones, so a scene is just the order you call things in.

multi example, unchangedRendering is a 3D DDA: clip the ray to the grid’s bounding box, then step voxel to voxel, always crossing whichever axis boundary comes next, until something is filled. The nice side effect is that the axis you last stepped across is the surface normal, so shading comes for free. It’s ambient plus one Lambert term plus optional exponential fog on hit distance. Every face points along one of six directions, so it can only take one of six brightnesses, and that’s why the spheres get those terraced contour rings instead of smooth shading. I think that’s most of what gives it the look.
Because Shape is a public trait, you can write your own without touching
the library. These next three are scenes written for this post (they live as
extra examples in a scratch clone, not in the repo). A heightfield Shape
with colour bands by height, plus Cone trees:

There’s no subtract operation, but VoxelGrid::clear is public, so carving is
just a loop:

And the voxel size is the whole aesthetic dial. Same three shapes at 8³, 16³ and 64³:

That’s the same trade the greedy-mesher makes: it starts from the same idea
(a grid filled from maths at voxel centres) and turns it into polygons for a
game engine, where this one never leaves the grid and just raycasts it. Both
are the same itch as the-meadow-grew-a-map, drawing things from code
rather than making assets. There’s also a longer walkthrough sitting in the
repo as BLOG.md.
A couple of loose ends I noticed. The comment on RenderSettings::light_dir
says it points toward the light, but the shader uses n · -light_dir, so it
actually behaves as the direction the light travels. The sphere example
follows the comment and negates it, so I think its light sweep is lighting the
faces pointing away from where the light is meant to be (from below, too). And the README’s
usage snippet builds RenderSettings without the light and fog fields added
later, so it wouldn’t compile as written. No shadows either, which BLOG.md
already lists as a next step.
Listed with everything else in everything-on-github.