All effects

screen_y = (cam_h − H[p]) / z + horizon

Voxel landscape.

1985 to today

Fly low over mountains that are nothing but a height map and a colour map. Comanche made it famous, a 5 KB program called Mars made jaws drop, and the demoscene bent it into caves, letters and tunnels.

8-bitPCGPU

How it works

The algorithm

For every screen column, walk away from the camera across a height map. At each step, look up the terrain height there, project it to a screen row by dividing by the distance, and draw a vertical strip in the colour-map colour, but only the part that sticks out above everything drawn in that column so far. Step sizes grow with distance; far strips fade into fog.

The old-hardware trick

Draw front to back and keep a per-column ‘horizon’ (y-buffer): once a column is covered to the top, nothing behind it costs anything. One height and one colour per map position replace all 3D geometry, and a growing step size means distant terrain costs less than nearby terrain.

Per frame, in pseudo-code
ybuffer[0..w] = screen_height
for z = 1; z < far; z += dz, dz += 0.01:
  left, right = view_frustum_edge(z)
  for x in 0..w:                     // one point per column
    p = lerp(left, right, x / w)
    y = (cam.h − HEIGHT[p]) / z · scale + horizon
    if y < ybuffer[x]:
      vline(x, y, ybuffer[x], fog(COLOUR[p], z))
      ybuffer[x] = y

Timeline

Documented milestones, with a source for each. Famous examples, not claims of who did it first.

  1. 19858-bit

    Rescue on Fractalus!

    Lucasfilm Games (fractals: Loren Carpenter) · Atari 8-bit

    Fractal mountains generated in real time on an Atari 800, seen through a dense alien atmosphere from a cockpit, the landscape as a procedural object, on 8-bit hardware.

    Source
  2. 1992PC

    Comanche's Voxel Space

    NovaLogic · Comanche · PC · DOS

    Terrain from a height map and a colour map instead of polygons, a 2.5D height field, not a volumetric voxel world, but the name stuck.

    Source
  3. 1993PC

    Mars

    Tim Clarke · PC · DOS

    Navigable procedural Martian terrain in a roughly 5 KB executable; the surviving disassembly project preserves a detailed reconstruction.

    Source
  4. 1994PC

    ‘Voxel landscapes and how I did it’

    Tim Clarke · comp.graphics.algorithms

    Clarke explains Mars: a wrapping 256×256 height and colour map, terrain by recursive subdivision, and visibility like a floating horizon.

    Source
  5. 1994PC

    Voxel letters in Heartquake

    Iguana · Heartquake · MS-DOS

    Greetings rendered as voxel height fields, the famous WATER part among them. Wild Light's Drift (1995) later returned to voxel letters.

    Source
  6. 1994PC

    The mirrored voxel cave

    EMF · Verses · MS-DOS · 64K

    A voxel landscape mirrored into a ceiling, so the camera flies through a cave instead of over a plain.

    Source
  7. 1995PC

    The voxel tunnel

    NoooN · Stars: Wonders of the World · MS-DOS

    Voxel Space wrapped around the view axis: a height map bent into a tube, flown through at speed. One of the scene's signature tunnels.

    Source
  8. 1996PC

    The voxel blob

    Iguana · Despair · MS-DOS

    Voxels used for an object instead of terrain: a morphing blob, far from the flight-simulator use of the technique.

    Source
  9. 2017GPU

    Voxel Space, explained in the browser

    Sebastian Macke · JavaScript

    The terrain renderer reduced to a short, inspectable algorithm, with front-to-back drawing and y-buffer occlusion explained.

    Source

Over time

6 live versions, from the oldest platform to today: 4 on the CPU, 2 on the GPU. Retro versions run at their original resolution and palette. Demos pause when off screen.

Atari 8-bit · 160 wide

Fractal mountains

1985

In the spirit of Rescue on Fractalus!: a fractal height map behind a cockpit frame, smothered in thick purple atmosphere, in a coarse 3-bit-per-channel palette.

8-bitCPUfractalfog
Detail page
PC · VGA · 320×200

Voxel Space

1992

The Comanche algorithm: a 512×512 diamond-square height map, a slope-lit colour map with water, grass, rock and snow, a y-buffer and distance fog.

PCCPUy-bufferheight map
Detail page
PC · DOS

Mars

1993

Tim Clarke's red planet, recreated with the same renderer: rust-coloured dunes and a dusty pink sky that swallows the distance.

PCCPUproceduralhaze
Detail page
PC · VGA · NoooN Stars-style

Voxel tunnel

1995

After NoooN's Stars: one ray per angle fans out from the screen centre, walks the tube front to back, and wall height pushes the surface inward. A radial horizon replaces the y-buffer. The walls carry a sea-and-land map, and after a few seconds the tube starts to twist.

PCCPUpolar y-buffertunneltwist
Detail page
GPU · for contrast

Raymarched mountains

2009

Not voxels, for contrast: this is how Elevated-style terrain works. Noise with analytic derivatives that damp the higher octaves on slopes, eroded-looking ridges, raymarched per pixel with sun, snow and aerial perspective.

GPUGPUfbmraymarching
Detail page
GPU · grid traversal

Real voxels

today

What ‘voxel’ means now: a grid of cubes. Each ray steps cell by cell through the height columns (a DDA) and lights the face it hits.

GPUGPUDDAcubes
Detail page