Last year I wrote up a city generator with Blender’s Python interpreter to put together sprawling cityscapes for use in my renders. I’ve already written an article about that, and considering this is a follow up to the original, go check it out here for background information and a refresher on the basics of procedural city generation.
More recently, I decided I wanted to update the old Python script to create more versatile, visually appealing and detailed city scenes, in addition to exploring how Blender’s delightful geometry nodes could compete. The latest video I’ve published on my YouTube channel covers just this.
Not mentioned in this video is exactly what I wanted to expand on. The biggest functional difference between the old and new generators are procedural terrain and street generation. The generators now feature water, whether that be a river or a coastal beach. The streets and terrain that feature this water are now procedurally generated, unlike the original generator which required a premade street/terrain map as an input. Smaller details like streetlights have also been added. This makes for city generation that requires nothing more than the click of a button (assuming you have some base buildings and props to work with).
With the additions summarized, now we can get into the pros and cons of each generator. The Python script allows for easy access to Blender’s mesh operators, which is a powerful feature that enables intricate detail-oriented editing of each building. This is useful, although it pales in comparison to the immediate visual feedback and optimized nature of the geometry nodes. As more geometry node based mesh operations become available to use with possible future versions of Blender, using a Python script for this type of procedural generation may become entirely unnecessary. For now, though, each offers its own unique edge and benefit.