top of page

Procedural Cities

This project was the artefact used for my dissertation and acheived an A grade. The purpose was to analyse a highly parameterised tool for the generation of urban environments. Within the tool parameters are used to generate urban environemts to a users specification.

​

The generation of an urban environment is split into 3 distinct stage. The generation of a road network, the forming and subdivision of plots, and the creation of building in the plots. 

Generation Video​​

Github

Latest Repo

image.png

Image of only primary road generation

​

Road Generation

Road generation uses an extended L-System where roads are recursively generated from an initial segment. Production rules ensure new proposed roads adhere to local and global constraints such as, overlapping and population density. Roads are categorised into primary, secondary and border each with their own charecteristics to mimic existing road patterns in the real world. 

Plot Generation

Plot generation begins with the identification of road intersections. These serve as the starting points for a traversal algorithm inspired by the left-hand rule used in maze solving algorithms. An algorithm traverse along the road until an enclosed polygon is found - forming a plot. Plots are assumed to be convex so a deflation algorithm is used to inset the plots to create space for pavements and props. Plots are then subdivided to create building lots which acts as the footprint for the generated buildings.

Screenshot 2025-05-08 at 09.38.02.png
Screenshot 2025-05-08 at 09.38.48.png

Building Generation

Building generation is carried out using shape grammars. Every generated building begins with a spline footprint dervied from the subdivied plot, and its height is determined dynamically based on factors like location and how densely populated the area it inhabits is. Paramaterised grammar rules define the structure of the building allowing variation in structure and style without rewriting core logic. The roof is generated using a procedural mesh. Vertexes and triangles are calculated using the building footprint and the UV's are set accordingly to ensure the texture is displayed correctly. 

Optimization

Sever optimisation techniques are implemented to ensure real-time performance. Identical assets - which there are a lot of in a city -  are batched to significantly reduce draw callls minimising CPU overhead. LOD's and camera frustrum checks are also implemented to help performance. Additionally parameters are capped to sensible ranges to avoid generating excessive or unstably layouts. The current plot generation is a bottle-neck for performance and is being worked on in my free time. 

Bar Chart
bottom of page