Procedurally Generated Buildings

My first real attempts at procedural generation, in a 3D space, started with ‘buildings’. From a developer perspective, generating buildings can be a great way to learn how to procedurally generate objects. I always admired the randomness and unique form of buildings, especially when architecture is greatly applied. My inspiration to procedurally generate buildings has got to be the love for grand design and my admiration for many landmarks and extravagant architecture buildings found across the world. My main approach to this is to always consider using some form of mesh deformation or fractals.


Morphing Mesh To Different Structures

This was my first test generating buildings. I tried to generate random structures based on the mesh primitives of a cube. I went about doing this by creating a cube and continuously morphing it to different structures over time. I was hoping to eventually see a pattern that would be the foundation of how I start to deform or apply some fractals that would make the structures look more like buildings. Buildings tend to be more cubic, which is why in this example, I started from a cube, deforming it by moving its vertices in random directions over time, which consequently led to many obscure structures or objects. Though this would work well as an object generator, it surely didn’t help in generating buildings. However, the morphing element did show some hints and helped approach this task differently.


Buildings Generator

This random building generator example shows a lot of improvement from the morphing cube. My approach to generate a building in this example was very different from the morphing cube approach. Rather than moving the vertices randomly, which was the main factor in the morphing cube. I thought of moving them in an orderly way but in order to have a mesh that looked more like a building, I needed a lot more vertices as oppose to cube 12 vertices used in the morphing cube example. The decisive factor in this example came when I did this Rounded Cube example, where the cube created had a lot more vertices. So I took this example and then some, moving selected vertices in columns so that I would be able to stretch selected areas of the cube in a way that would make the cube look more like a building. Adding some randomness makes this process even better, where each cube generated looked unique with a very close resemblance to a building.

Source files.