Ali Hafez/Projects/

Procedural City

April 2024, for Advanced Computer Graphics



The final submission for CS 479, Advanced Computer Graphics, with Julie Dorsey. I worked with a partner to create a 3D procedural city generator in Blender using Python scripts. My part of the project consisted of generating the underlying terrain of the city with Perlin noise, and then calculating gradients to generate a built environment on flatter areas of the generated terrain. My partner added clouds and animated birds, which are seen in some of the example images in the git repo.

Procedural city generators exist and can create a good variety of cities, but they're usually limited to flat, modern cities. The goal here was to create a kind of city integrated in nature, and that meant being able to conform to its terrain, being nestled in greenery, and a small, dense urban layout. Originally I'd wanted to strive for a more medieval type of city, like an "old town" with narrow, labyrinthine streets (since that's like my favorite thing ever) but that proved difficult, and you can even sort of imitate that look with this robust software.

Link to project's GitHub (unfortunately there's no readme, but if you clone the repo, the CityGenerator_WriteUp.pdf tells you how to run it.)