Procedural Buildings PART II

Transformation in Architectural Design by Pascal Muller


In this post, I will try to provide an overview out of my research in the internet of other approaches to this topic. Please bear in mind that I am no expert in Computer Graphics and probably just scratching the surface here in this blog. However I think that my findings might be of use to other people as well.

So, procedural generation algorithms for buildings is nothing new, has been successfully tackled by several people, mostly for scientific visualization and in the CG domain. I will try to present briefly these algorithms here as long as I understand them.

Overview of Procedural Building generation in Visualization/ CG domains

In the literature, the problem of procedural building generation can be seen as a sub-topic of urban modelling, and procedural city generation. In most (if not all) approaches, the building mesh is generated first, then the textures are applied on it. Some approaches use procedural texture generation, some are tiling pre-fabricated textures in order to form seamless façades.
Muller, Wonka and Parish have produced several publications, covering the issue of procedural building and city generation. Their algorithms are usually based on some implementation of L-systems. This is an algorithm for the generation of combinations of parameters, encoded in strings, that is used extensively in procedural generation of objects in Computer Graphics. Tree and plantation systems use this a lot, among other things. More on L-systems in the next part of this series.

In Procedural Modeling of Cities, pages 6 and 7, the authors discuss procedural building generation. They are referring to John Hart's Object Instancing Paradigm for procedurally generating the mesh.
A more elaborate description of a procedural building generation system can be found in "Procedural Modeling of Buildings" by Muller, Wonka et al. The algorithm first generates an assembly of primitive shapes using L-system production rules, unites them and then by extracting the faces of the 3D volume, starts generating 2-D scopes (textures) after another set of production rules. Texture elements are automatically aligned and parameterised, inherently by the application of the L-system production rules.

A very intricate and intuitive city building software is CityEngine by ESRI. CityEngine almost automatically generates 3D cities out of 2D maps coming from Geographic Information Systems (GIS). It is a very usable tool that is able to massively generate buildings and then position them on the map, respecting the city plan constraints (roads, blocks, etc). ESRI provides free 30 days evaluation. Already Unity fans and researchers have provided instructions on how to port CityEngine outcomes in Unity: here and here. It seems that Pascal Muller, whose seminal publications (see above) were pivotal to efficient building and city generation, founded initially Procedural and released the first versions of CityEngine, and then Procedural was acquired by ESRI in 2011.

What about Procedural Buildings in game development?

What is of greatest value to me is all the approaches that tried to solve the problem in the context of computer games, i.e. by taking into account dynamic rendering and run-time performance issues. All approaches that might work well in game environments (even if they are tailored for scene editors) are of interest.

I am obliged to start this reference material with .kkrieger. Product of the German demo scene by Farbrausch, a team of computer graphics programmers, .kkrieger set a milestone at the time it has been released, because it crammed Gigabytes of game content in just one meagre 96KBytes executable file. Using a framework for procedural generation of nearly anything (geometry, textures and materials, sounds) called Farbrausch tools, the team has been able to demonstrate this expertise in other demo releases as well. Fortunately, they have made available all their legacy code for others to look at, you may find it at GitHub.

A guy who has experience with procedural building (and city) generation is Shamus Young. He has built a system that he demonstrated it with a video  released in 2009, in a similar effort to assess the results and to enjoy the process. In his blog, he has documented a lot of his tricks and mechanisms, that are still a source of inspiration of people working with procedural modelling.

Procedural World is another fascinating blog full of useful techniques, information and how-to articles about procedural world generation, written and maintained by Miguel Cepero. I found very interesting all his articles, especially the ones about procedural architecture. Two of them are more relevant to this series of posts because he is talking about building the exterior (Dude, where is my Castle?) and interior geometry of a building level (Building Rooms).

Another good source of reference for procedural generation is Introversion's blog. Introversion is an indy game developer in UK that uses a lot of procedural texturing and modelling in their games, both as an element of game design and as a means to cut down costs of manually creating large levels. A nice city and buildings generation system for their Subversion game title is documented here, with some performance tips.

A pertinent article about Procedural modelling of buildings in the Unreal Engine can be found here. The Unreal Engine editor has a brush for generating and placing ad-hoc buildings in a scene, much like Unity does for terrain scenery and plantation. How cool would it be to have available in Unity Editor such a tool?

Then, you may find some interesting assets in the Unity asset store that I bumped into while browsing:
  • BuildR system by Jasper Stocker (costs 60 $), a seemingly elaborate building generation system
  • Dynamic Building Creator by Polyload.com (costs 10 $), this one creates easily destructible buildings but seems to generate only simple meshes out of prefb objects
  • Modular Building 1 Free by theLoom (free), which is not generating buildings but includes some useful textures and a custom shader for cubemap reflection
This is a brief overview (not exhaustive of course) on what's out there about this topic. As with the whole series of posts, it will be updated in somewhat frequent intervals, so come back to these pages for updated information.

The next PART III will elaborate on L-Systems and how they can be exploited in order to produce nice combinations of geometric features and textures on building façades.

Comments