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.