Skip to content
Techniques & Technology

BSP Trees

3D rendering optimisation

Binary Space Partitioning trees enabled Doom's impossible 3D by pre-calculating visibility, determining which surfaces could see which others to eliminate overdraw.

pcPlayStationsega-saturn 3drenderingoptimisation 1993–1999

Overview

Doom looked 3D but ran on hardware that couldn’t do 3D. BSP trees made it possible by pre-computing spatial relationships during level compilation. The algorithm recursively divided space into regions, creating a tree structure that told the engine exactly what to draw and in what order—no wasted pixels, no z-fighting.

Fast facts

  • Origin: Computer science (1969).
  • Gaming use: Doom (1993).
  • Purpose: Visibility determination.
  • Compile time: Pre-calculated.

How BSP works

StepProcess
1Choose splitting plane
2Divide space in two
3Recurse on each half
4Build tree structure

Doom implementation

UseBenefit
Wall renderingBack-to-front order
Collision detectionEfficient spatial queries
AI pathfindingNavigation assistance

Compile-time calculation

AdvantageTrade-off
No runtime costLevel must compile
Optimal orderingStatic geometry only
Consistent speedMap changes need rebuild

Visibility benefits

Problem solvedMethod
OverdrawRender visible only
SortingAutomatic ordering
OcclusionBehind walls skipped

Quake evolution

EnhancementPurpose
PVSPotentially Visible Set
PortalsRoom connectivity
LightmapsPre-calculated lighting

Legacy

UseApplication
Collision detectionSpatial queries
AI navigationPathfinding
CSG operationsLevel building

Modern alternatives

TechniqueUse case
OctreesDynamic scenes
BVHRay tracing
GPU cullingHardware acceleration

See also