Skip to content

Unity demo that uses a few tricks to build random nice-looking 3D cities

Notifications You must be signed in to change notification settings

pboechat/ProceduralCity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Procedural City

Procedural City is a demo that uses a few tricks to build random nice-looking 3D cities.

Screenshot


Idea

First, neighborhood blocks are randomly placed in an irregular rectangle grid.

Irregular Grid

Then, building allotments are packed inside blocks using this bin packing algorithm. Bin packing uses a heuristic that tries to maximize edge contact for "bins". This leads to better fitting of allotments along block edges. Once blocks are filled, non-edge allotments are discarded.

Bin Packing

Buildings are extruded from allotments and their façades decorated by two pattern matrices. Pattern matrices are picked from one of six achitectural styles (art deco, art noveau, brownstone, chicago old school, international and modernist). One pattern matrix implements simple block extrusion/exclusion to be performed in the façade geometry. Another determines which element (e.g., window, door, column) should be appended where in the façade. Details (e.g., headers, rails, firestairs) are randomly selected according to the defined achitectural style. Finally, some common props (e.g., chimney, water tank) are scattered around the rooftops.

Building Generation

Download

Windows

About

Unity demo that uses a few tricks to build random nice-looking 3D cities

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published