Friday, 9 January 2009

How to...Create Voxels

Over the years, I've always been fascinated by Voxels.

Many moons ago, before the time when 3D engines could render a gazillion multi-layered triangles per second, things were pretty basic. 3D terrain would always look flat, basic and angular. At the time, Voxels were used as a neat way of adding detail (roughness) to an otherwise flat polygonal landscape. See these examples over at Eric Chadwick's site.

Here is something that I was playing with a while back (but I think it's relevant to show it on here). This technique does NOT use actual voxels, but is similar in appearance.

Initially I mocked up the technique in 3DSMax to test how it would work. Below shows two simple quads, the first with a simple grass texture (which we will call the base layer), and the second quad with the same texture but this time with areas removed using simple transparency (which we will call the voxel layer).

Now imagine taking that base layer to represent the terrain, and stacking lots of those voxel layers on top of one another to form a column.

If small gaps are placed between the vertical spacing of these voxel layers, when looked from this angle it's easy to fool the eye into thinking that these elements are connected. This simple illusion allows this technique to work.

This technique can be applied to almost any surface, even spherical. When considering a spherical surface, the voxel layers are actually concentric spheres increasing in radius. Remember in 3DSMax, the 'PUSH' modifier can be used to create these layers.

Here is a little scene I created in Max, to demonstrate how those simple 'faked' voxels can easily be created in any 3D engine. Using multiple layers of polygons and transparency, this cute effect can be created.


  1. the wonderfull voxels, yet i cant seem to find a program which would work with them in a more user-friendly atmosphere

  2. Remember the hideous burnt orange shag-pile carpet? ... Very 1970's ;-(

    Cheers Bazza