Even if this problem seams to have an easy solution – just model all the buildings one by one – the reality is a bit more complicated than it may look. When I have completed the first release of the town, on 2001, I followed the ‘easy’ approach: just modeling every single building with Lightwave. The result was far from being satisfactory for the following reasons:

- This process is very time consuming. It would be much better to use the time to model the principal buildings rather simple generic buildings that nobody notice.
- It is repetitive. I deeply hate to do same things twice.
- Low variance. At the end all the building started to look the same.
- Low flexibility. If error, I had to remodel the building from scratch (did I already talked about doing same thing twice?)

## CityEngine

I did not have the solution to this problem till 2010, when a swiss company, Procedural (today ESRI), published a software for the ‘procedural’ generation of cities: CityEngine. This concept behind this software is simple but smart at the same time. If we describe the process of creating a building, we end up to have more or less this ‘algorithm’ for every type of building: |

- Build the base
- Extrude vertically for the height
- Add details like door, windows, moulding
- Build the roof
- Apply textures
- Save the object

If we now imagine to write a Grammar that can convert the above high level language into language statements, we could have the following:

- Start
- Create Polygon
- Extrude #
*height* - Split #
*NumberOfStoreys*

- Insert #WindowsOBJ
- Insert #DoorOBJ
- Insert #RoofType
- PaintWall #Texture1
- Save Building#
- End

At this point, if we call the above ‘Program’ by changing every time some parameter (#DoorOBJ, #RoofType, etc) we can generate a large variance of buildings with a single click.This is exactly what CityEngine does (with a much higher level of complexity, of course), it allows you to ‘describe’ the building process modeling with a pretty complex Grammar and then it can, more or less randomly, generate buildings using random sets of parameters at each iteration. With a reasonable basic collection of details (doors, windows, textures, roofs) the combinations of the resulting buildings are pretty infinite.

The results of this process is a highly detailed collection of unique buildings that can be exported in Wavefront format and then loaded in the main modeling software (in my case, Lightwave).

I am a software developer, it was not difficult at all for me to learn this Grammar and to develop the script for Ostia. This task took me about 3 months (and from time to time I am still adding new features) but I can finally generate with one click all the secondary buildings of Ostia.

The last version of Ostia Antica with CityEngine takes 6 minutes to be completely rebuilt and it counts 20546 Objects for a total of 7`044`721 polygons.

The complete project of Ostia Antica in CityEngine |

I was even able to model some of the principal monuments using only CityEngine, like the Hortensius *Horrea*, the Great *Horrea* and *Horrea* of Artemis. For other monuments, I have further customized in Lightwave the model created with CityEngine, like the Guilds Square, the Garden Houses and the Navalia.

A view of the Hortenisus Horrea built with CityEngine |

A detail of a block created with CityEngine.Notice the high variance of the building |