Link Search Menu Expand Document

Procedural Level Design


Overview

This project is an exercise in level design and architecture powered by procedural generation. I’m using Houdini to generate a city layout, sample a cluster of buildings, create a structure on top of the buildings, then add NPC pawns, cover objects, pipes and catwalks. The environments are loosely inspired by Mirror’s Edge’s rooftop environments where the player has to navigate from a start to end point by performing parkour.

The power of doing this all procedurally is in automated directed iteration. Different generations can be used as an infinite variety of levels. However, I prefer using iteration as a form of exploration and refinement, where iterations are studied for emergent properties which can be developed upon.

In the procedural context there’s two sorts of control: what changes between iterations, and what must be maintained between iterations. For this setup, in the game context further development could suppport associating parameters with difficulty depending on the game mechanics, such as height difference between buildings for trickier routes from A to B.



Breakdown

The procedural pipeline runs over an input 2D shape, with a global seed parameter referenced by all the randomized values.

City

City grid

The city grid is pretty basic - rectangle, shaped with noise, first subdivided by voronoi then lot subdivided.

Cluster selection

Next, a cluster of building footprints are selected as the “active” buildings. After extruding all the buildings, their total area is measured and buildings below a certain threshold of total area are removed from the active buildings.

For-Each Building

The following processes are run over every selected building.

Cut Out Top

The tops are cut out by a copy of themself vertically distorted with noise.

Top structure

The top structure is created by a process of subdivision and clustering, followed by creating a positive and negative, subtracting them, creating framing out of the negative, and merging the results.

Pipes

The pipes are created by subdividing the side surfaces, scattering start/end points, then in a loop finding the shortest path between them. In this case each loop the previous pipe path is removed from the surface area to avoid overlapping pipes.

Catwalk

The catwalks are created by making low resolution perimeter lines and appling noise for a quantized effect, then sweeping geometry along their path.

Props & figures

The props and figures are placed using a combination of UV layout and scattering. Each layer of objects is subtracted from the surface area before the next layer to avoid overlap, similar to the pipes.