A voxel (short for “volume element”) is the 3D equivalent of a pixel. Where a pixel represents a point on a 2D grid, a voxel represents a point in a 3D grid — a small cube of space.

Voxels are used in games for:

  • 3D pathfinding — dividing space into navigable/blocked cubes (see DonAI Navigation - 3D Pathfinding for Flying Enemies)
  • Destructible terrain — games like Minecraft and Deep Rock Galactic represent their worlds as voxel grids
  • Volume rendering — medical imaging (CT/MRI scans) and scientific visualization
  • Lighting and GI — voxel-based global illumination (VXGI) approximates light bouncing through a voxelized scene

The main trade-off is memory: a voxel grid with 100 cells per axis requires 1,000,000 voxels. This is why voxel size and grid dimensions need to be carefully tuned for the use case.