The next version on January 19th, 2018 added rules to window generation, and applied the edge algorithm around the windows. With materials assigned to the generated Gameobjects, the generated buildings became more attractive to the eye.
Monthly Archives: January 2018
Building a procedural city generator in Unity
On January 12th, 2018 I added the ability to generate finer detail on the rooftop and grid-like facades on the building walls. The added edges on top of the building created a more believable look, and I was able to adapt the code to create randomized grid patterns on the walls.
The code still isn’t perfect; top building on the left has a definite overhang. Part of the work was figuring out where the rules failed in generating believable content and correcting as I go along.
Building a procedural city generator in Unity
The next version on January 8th 2018 refined the arrangement of blocks to make the layout more realistic (e.g. adding believable corners so that the windows seem feasible), and added a ground section to the buildings. The ground section allowed me to define the area the building would occupy, and randomize the scale of the upper section of the buildings. The windows are now thin slices instead of blocks, thus they can be arranged within a defined wall region.