top of page

PROCEDURAL CITY GENERATOR

May 2019
github-mark.png
  • YouTube Social  Icon

This prototype procedural city generator project was my first attempt at procedural generation. Its constructed from 3 different suburb types, which are comprised of blocks, roads, paths and buildings. The layout was calculated using noise based voronoi diagram's, and my own algorithms for road, path, building and block alignments.

​

Whilst this system isn't optimized and has many flaws, It was a very good learning experience and I gained a lot of knowledge and understanding while developing it.

Technical Features
  • City Seeds - Integers can be used to seed all aspects of the generated cities.

  • Suburbs - Suburb positions, alignment and rotation calculated based on a noise function. These plot points are then used to calculate a voronoi division diagram which generates suburb polygons.

  • ​Blocks - Suburbs are sub divided again using a voronoi diagrams and generate the block polygons.

  • Roads - Roads are created based on the parent block's edge polygon.

  • Paths - Paths are calculated the same as roads, except using a shrunken block edge polygon.

  • Buildings - Buildings are placed along the edges on a shrunken path polygon. Prefabs set using their parents suburb type: Residential, Urban or City. Which were defined using noise when the suburbs are generated.

Libraries Used
  • David Arayan's Ezy-Slice 

    • Intuitive mesh slicing library for unity.

    • ​Git Repository can be found here​.

  • Oskar Sigvardsson's Delaunay Project

    • Library for calculating Voronoi Diagrams within Unity.

    • ​Git Repository can be found here​.

Algorithm Development Diagrams
bottom of page