Cities in Motion - Developer Diary #5: The Hofburg Palace

Paradox Interactive has sent over the second of the series exclusive developer diaries in which they discuss the progress and development of Cities in Motion for the PC. Targeted for an early 2011 release, Cities in Motion is a modern day transport tycoon.

Written by Tarkko Oikkonen, environmental designer of Cities in Motion:

"Hello people,

My name is Tarkko, and I'm one of the environment artists at Colossal Order working on Cities in Motion. I was asked to give you a little insight into the process of creating buildings for the game.

For this demonstration I have chosen one of the most famous historical landmarks in Vienna, the Hofburg Palace. Since the 13th century, this monumental building complex has housed some of the most powerful people in Austrian history. Many pivotal and memorable events are centered upon this very landmark, and the sight of it has quite likely been etched onto the retinas of every Austrian. I will be concentrating on the Neue Burg section of Hofburg, built between 1881 and 1913.

The Hofburg Palace in the game

The challenge comes from several different things, including questions on how to adapt the structure into the game, and what level of detail is reasonable to maintain. Moreover, for a building like Hofburg, there is plenty of work and precision required, so it's hard to even decide where to begin. So, where should one start?

For us, the beginning dates back to when our team visited Vienna in early 2009 to collect reference material and study the city's transportation system. The Internet usually offers a good amount of reference material for famous landmarks, but nothing beats the real thing. The material we collected was very valuable because with it, one could get more in touch with the true essence of the building and thus study it more intimately. When working on a landmark, I'd say the most crucial part for a game artist is to really capture the essence of the building. In reality, it's almost impossible to create an exact 1-to-1 copy of the structure, model every tiny dent polygon precisely, and to texture it down to the last pixel. So, in a sense, you're compelled to make compromises. The way I think about this is that you shouldn't even aim to just make a carbon copy of the building in the first place; you need to make the building your own but retain the original essence.

Our Lead Artist Antti Isosomppi at Hofburg

I began by studying the collected reference material. It's important to know your subject well, so for work like this, I'd really suggest researching the history of the building. Not only is it fascinating and educational, but the background work helps you to orientate yourself to the task at hand. We decided that it might be better to draw orthographic images from photographs for 3D modeling, as we couldn't find any useful blueprints of the structure. We like to do this for more complex structures because it greatly helps to understand the relative sizes of each part of the building and to perceive details that could have been missed otherwise.

Orthographic drawings for Neue Burg

The next step is to finally move on to the 3D aspect of the creative process. I set up my orthographic images on planes inside 3D software and position them according to the overhead projection image taken from Google Maps (Google Earth and Bing Maps with the “Bird's Eye” function have proven to be really useful for references while working on content, which is usually seen from an isometric angle) which shows the base of the building. In reality, the Neue Burg section is only a small part of the Hofburg complex, but due to the game system's size limitations, we had to cut out the other sections of Hofburg. This is really just a simplified representation of what's supposed to be there, but the curving shape of the facade makes Neue Burg really stand out from the rest of the complex.

Modeling out different segments of Neue Burg

Because of the game's perspective, I needed to focus on how the building would look when being seen from a top-down view, so I didn't need to worry much about the polygons underneath. As I model further, I also keep unwrapping the object's UVs for texturing. If you unwrap while you're still building the model, it's sometimes helpful to place temporary textures to help you observe whether you're going in the right direction. For Neue Burg's textures, it was decided that the photographs we took should be used as much as possible. The photograph-based texture would later be retouched and painted over – in Cities in Motion, texturing is really painstakingly pixel-precise work.

As this is one of the buildings with a glass ceiling, the interior of the marble hall was also done. For this, a separate texture map was used. The interior hall object was later attached to the main building object. After I finished the base model and texture, I did some additional detailing by adding the angel statues on the rooftop and the Doppeladlers (the crowned double-headed eagles). During this stage, I also fixed some remaining UV issues and did the whole texture retouch process.

Angel statues and Doppeladlers on the roof

When I was done with the modeling aspect along with the diffuse texture, it was time to move on and work on other maps. Specular maps are used to single out the shiny and reflecting surfaces which – in case of buildings – are usually windows, rooftop plates, and pipes.After specular maps, we process the normal maps out of bump maps. We create the grayscale bump maps by hand, painting over the diffuse map and looking for the spots that either bulge out or inset. Photoshop's high-pass filter is useful for the most difficult parts of this process. Then we use this simple and handy little application called Crazy Bump which allows you to generate normal maps out of your freshly made bump map – a truly formidable program that makes life a little easier for people like me.

Our engine also demands the creation of a separate ambient occlusion map (also called light map). This requires a different UV channel, so basically you need to unwrap the entire object again so that you don't get any overlapping faces. The use of automatic unwrapping techniques is advisable, even though they will only get you so far; there's always some manual tweaking to be done. After a separate UV set is completed, we bake out the AO map in the 3D software.

We also use illumination maps and colorization in Cities in Motion, but neither of those were required for the Hofburg. When the model is finalized, the last step is to create a level of detail (LOD) version of the building to be used for further camera distances. The LOD process is rather complex, since now all the information of our separate maps (diffuse, normal, and AO) need to be combined into a single map. Basically, we create a low-polygon version (target polygonal resolution is roughly 10-25% of that of the original) of the building into which the combined map is baked using software called x Normal.

All the different maps used in the Hofburg and a wireframe model

With close to 20,000 triangles, the Hofburg is one of the most geometrically heavy buildings in the game. I had to simplify the building a lot to fit it in the game environment; I also tried to preserve its original essence well as I could while still giving it my own touch. When creating buildings for Cities in Motion, one of our main objectives was to give them a miniature-like feel, so we greatly simplified the models, much like they would simplify miniatures of the buildings in real life. When creating a building, you might often find yourself thinking, "Man, I really wish I had a miniature like this!" I hope that this feeling is conveyed to players as well."