Featured image of post Procedural Parcel Generation of City Blocks using OBB (Object Aligned Bounding Box) Parcelling

Procedural Parcel Generation of City Blocks using OBB (Object Aligned Bounding Box) Parcelling

This project started when I found jphsd’s reddit post on r/proceduralgeneration. I wanted to find a way to create similarly convincing, realistic city layouts. As I was researching, I found a very helpful blog post by Martin Evans which described the pseudocode for OBB (Object Aligned Bounding Box) Parcelling. Evans came upon OBB in this paper by Carlos A. Vanegas, Tom Kelly, Basil Weber, Jan Halatsch, Daniel G. Aliaga, and Pascal Müller. What interested me the most of this algorithm is that you can feed it any kind of simple polygon, and it’ll create believable city blocks.

Image 1 Image 2 Image 3 Image 4

I used Godot, an open source game engine, to implement the OBB algorithm to procedurally generate parcels of city blocks within a scene. My project can be found here. I chose to use Godot instead of Unity due to it being open source and actively developed, as well as its comprehensive Geometry2D API and procedural mesh generation using the SurfaceTool API. For creating the initial simple polygon to be parcelled, I used a method I found in this Stack Overflow post. First, random points are selected along differently sized circles with the same center, and then connect these points in a clockwise order to create snowflake-shaped simple polygons. Then an object aligned bounding box is used to recursively subdivide the polygon into two halves. The recursion concludes once a parcel has reached a certain size.

My hope for this project is to lay the groundwork for a game or simulation to efficiently procedurally generate organic cities.

comments powered by Disqus