LerpworksAcademy
On this page

World and levels › World breakdowns

Horizon Zero Dawn: placing a world by rules

Breakdown

Know first: Scattering by rules

This breakdown takes apart how Guerrilla Games placed every plant and rock of Horizon Zero Dawn (2017). Every tree, bush, rock and patch of grass in a huge world is set by rules while the player walks. The source is the slides of a GDC 2017 talk by Jaap van Muijden, a senior tech programmer at Guerrilla. What makes it a good example: it shows, piece by piece, the theory under any procedural placement. Rules turn maps of the world into a density map, and a fixed pattern turns density into exact spots, so that the same rules always give the same forest.

The whole picture

The slides list the goals first: quick iterations, a large variety, a believable look, and art direction, meaning that artists stay in control. Three more goals describe how: data driven, deterministic and locally stable. Deterministic means the same data always gives the same forest. Locally stable means an edit in one place changes only that place. The system works as a chain:

world data: maps of the land, painted, generated and baked
  → density logic: a graph of rules for each kind of object
  → a density map for each layer of objects
  → dithering: a fixed pattern of points decides the exact spots
  → placement: rotation, size and tilt for each object
  → objects around the player, made on the graphics card as they are needed
PartThe problemThe answer
World dataArtists must control a world too big to place by handThe land as a stack of 2D maps: painted, generated from roads and objects, baked from erosion
Density logicOne map can’t say where each kind of plant growsA graph of rules per ecotope, from the maps to a density for each asset
DitheringDensity says how many, not where; random spots clump, and an edit reshuffles the forestA fixed pattern of points with spread-out thresholds
Layers that don’t collideTwo kinds of tree can grow into each otherKinds with the same footprint share one pattern
On the graphics cardArtists need to see a change at once, all over a big worldThe whole chain runs on the GPU around the player

Further in the article

  1. World data: the land as a stack of maps
  2. Density logic: rules as a graph
  3. From density to points: a dither pattern
  4. Kinds that don’t collide: layered dithering
  5. On the graphics card, around the player
  6. Findings
  7. What to take away
  8. Exercises
  9. Sources and further reading
  10. Test yourself