Procedural City Generation with Voronoi Graphs and Themed Architecture

Sunday, Jun 1, 2025 | 3 minute read | Updated at Sunday, Jun 1, 2025

@

This prototype explores procedural city generation using Voronoi-based layout, thematic building components, and runtime mesh construction. Inspired by the modular structure of Carcassonne but moving beyond a grid, I leaned into Voronoi shapes for a more organic spatial structure β€” enabling winding streets, irregular blocks, and smoother transitions between city zones.

The entire system runs multithreaded, allowing geometry and logic generation to be offloaded from the main thread without stalling frame updates.


🧠 Voronoi as a City Skeleton

Rather than relying on a grid or tile-based layout, I used Voronoi tessellation to generate the foundational structure of the city. Each Voronoi cell becomes a city plot β€” defining roads, boundaries, and building zones.

The benefit of this approach is its naturalistic, non-uniform layout: blocks vary in size and shape, streets curve organically, and plazas or open areas emerge from low-density regions.


Problem: Assembling Consistent Urban Forms

With irregular cell shapes, traditional snapping and prefab placement doesn’t work well. Each plot needs a way to assemble geometry procedurally, while still feeling architecturally coherent.

βœ… Solution: Themed Modular Elements

Buildings are constructed from a theme library β€” a curated set of roofs, wall types, windows, and detailing components. Each building instance draws from this pool based on its Voronoi cell’s size and contextual data (e.g. city density, street access, proximity to edges).

The BuildR 2 system generates each building as a mesh in real-time, combining the selected components into a consistent structure β€” including facade variation, corner treatments, and roof silhouette.


πŸ”„ Multithreaded Runtime Generation

To maintain performance, all geometry generation is handled off the main thread. Each Voronoi cell is evaluated independently: calculating geometry, assigning styles, and producing mesh data. Only the final mesh is dispatched to the main thread for rendering.

This architecture allows the system to scale well β€” larger cities or dynamic updates (e.g. zooming, panning, regenerating) don’t block gameplay or editing.


Stylization & Visual Cohesion

To enhance readability and give it a stylized tone, the system uses:

  • Flat-color or cel-shaded materials for clean forms
  • Silhouette-driven building profiles
  • Palette-controlled themes for neighborhoods
  • Simplified ambient occlusion via baked vertex color gradients

Optimization Notes

  • Voronoi cells are generated in a thread-safe background context
  • Meshes are combined in chunks for rendering efficiency
  • Procedural components use shared geometry references where possible
  • Material variants are instanced with minimal runtime overhead

Future Steps

  • Add pedestrian or vehicle agents navigating Voronoi street graph
  • Support for dynamic zoning (residential, industrial, landmark areas)
  • Hook the city graph into the Procedural Labs editor for live generation and tuning
  • Implement LOD transitions for distant buildings

TL;DR

  • Procedural city layout via Voronoi tessellation
  • Themed, modular buildings assembled from a style library
  • Full multithreaded generation of geometry and logic
  • BuildR 2 used for flexible real-time mesh creation
  • Stylized visuals supported by palette constraints and silhouette shaping

This project was a great test case for organic layout, mesh synthesis, and runtime performance tuning β€” and it’ll feed directly into future work on scalable procedural cities in the Procedural Labs pipeline.

Β© 2025 Procedural Labs

🌱 Powered by Hugo with theme Dream.

About Jasper

I’m a developer and systems designer specializing in procedural generation β€” from terrain and architecture to runtime logic and asset pipelines. For over a decade, I’ve been building tools and frameworks that enable dynamic content in games, with a focus on performance, modularity, and control.

Procedural Labs is my space to share experiments, devlogs, and prototypes β€” often built around graph-based systems, multithreaded generation, and stylized runtime rendering. I care about systems that are expressive for developers, friendly for designers, and efficient under load.

Whether it’s non-Euclidean space generation, Voronoi-based city layouts, or custom lighting via mesh data, I build tools that treat procedural generation as both a creative and engineering discipline.

Social Links