Gauntlets of Recursion (+3)

Times, trials, and turbulence.

Voxel Land

Voxels On The Side

Anyone who has been reading my journal for a while should know by now that I’m pretty fascinated by the topic of 3D graphics rendering — particularly in software (ie. no OpenGL/Direct3D) — and so it should come as no big surprise that I woke up on Saturday and spontaneously sat down to write a 3D voxel-based heightmap renderer. 😛

The core of it was written on Saturday, but I spent parts of Sunday and today doing optimizations and making it generally prettier. The end result is as follows:


The ‘features’ are a 640x480x32 voxel heightmap display running at ~25FPS on my 3.0ghz computer, with distance-based fog, and a skybox-esque background image that rotates independently of the camera. The water level is variable, and the water is shaded based on the depth of the water of that voxel. The terrain is infinitely wrapping, so you will likely see some seams here and there where edges meet. Give ‘er a download — I’m interested to hear feedback or ideas for improvement:

Download Voxel-Land (908kb)

(Controls: Arrow keys for rotation/movement, Page Up/Down for moving up/down)

I had a lot of fun writing this, so I’m seriously considering a small (read: under 3 weeks) mini-game based on this voxel renderer. Something along the vein of the Comanche series. It’s not very impressive by today’s killer-3D-graphics standards, but a neat little project nonetheless. More to come as the week progresses!

8 responses to “Voxel Land

  1. David "Trapper Zoid" November 20, 2007 at 1:41 am

    Voxels were used in Magic Carpet, weren’t they? Deformable terrain is the factor that endears voxels to me; it shouldn’t be too tricky to do neat Populous like effects with a height map.

  2. Stephen November 20, 2007 at 9:22 am

    Hey David, (long time no see! :))

    I believe Magic Carpet actually used a gouraud-shaded triangle rasterizer for its display. Heightmaps are pretty open to deformation in general (irregardless of visual implementation), so this is definitely something that I will be including in my work.

  3. David McGraw November 20, 2007 at 12:46 pm

    *DROOLS* Damn I need to get into some 3D stuff! Looks pretty neat!

  4. Anonymous November 20, 2007 at 1:41 pm

    That looks Voxelicious!

  5. Draff November 20, 2007 at 11:27 pm

    That above was me expressing my interest in your work. 😛

  6. Stephen November 21, 2007 at 2:00 pm

    Thanks Draff. I’m thinking about gearing it towards a small Mech combat game, similar to Armoured Core and the likes. We’ve certainly discussed the idea no small number of times. 😉

  7. SteelGolem November 27, 2007 at 6:46 am

    mmm i’ve always thought voxels were tasty. i haven’t seen anyone do any kind of shadowing with voxel maps yet though, any ideas about that?

  8. Stephen November 27, 2007 at 9:31 am

    I’m not sure how feasible shadows would be in real-time, but I do plan on adding some pre-processing to maps to generate static terrain shadows based on a variable time-of-day/lighting-conditions.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: