Procedural Cities as Active Simulators for Planning

Modelling a 3D city poses an interesting challenge. To create a virtual city, a road pattern has to be designed and a large number of buildings need to be generated. Every urban place has a road network, often a superimposed pattern plan that serves a population density and buildings which follow statutory rules. This patterned behaviour of the city is why it is possible to develop rules or “computational instructions,” to generate city models. In this article, we are going to discuss how to use procedural modelling and CityEngine, a rule‐based application commonly used in the movie industry and gam‐ ing to produce vast realistic cityscapes, for regional and urban planning via an urban analytics approach. Unlike cinema’s imaginary worlds, cities have real‐life population dependencies that need to be modelled for the development of planning scenarios. The goal is then to use the generative properties of the procedural modelling approach, along with population prediction models, to create informed 3D city scenarios. Instead of designing solutions, the user can use interactive param‐ eters to affect the 3D model globally, thus enabling virtual cities to become active simulators for planning. Using urban analytics and generative environments, procedural cities may be able to create a “teaser” of different versions of how the city would look like in the future.


Introduction: From 3D Cities to Urban Generators
Remarkably detailed descriptions of cities can be found in the works of architects, cinematographers, writers, and artists, long before the era of 3D digital visualization. As a research topic, the same issue reflects concerns mentioned in megacities and their problems, the metapolis instead of the metropolis, fractal cities, and many others. The explosion in 3D graphics and computer simulations since the 1980s has allowed these notions to become virtualised, with the development of 3D worlds and related tools to be used not only for the better analysis and understanding of our living environment but for the visualisation of the city of the future.
Alternative realities of cities in today's digital media culture are used extensively and even become protagonists in blockbuster films such as the Blade Runner 2049 (2017), Total Recall (2012), The Witcher (2021), and games such as GTA V (2013), CitiesSkylines (2015), and many more. But the challenge in these systems is that even small cities comprise several thousands of buildings, streets, streetlights, and several urban furniture, which can easily become a costly and time-consuming production task. With vast amounts of buildings comes a vast amount of geometry. For example, the accumulated area for the development of a realistic city, such as in the movie Independent Day: Resurgence, can be as much as 30 sq mi, with 150,000 unique buildings, states VFX lead M. Buhler (Gnomon, 2017). Manually modelling the buildings one by one, controlling the materials, and having to render them properly for a single scene would practically be an impossible task.
The demand in production for these environments led to the use of urban generators, computer-based interfaces which allow the construction of a virtual 3D city, with an incredible amount of detail, all with a "click of a mouse." These systems operate using procedural modelling, a technique in which all geometries and textures are a result of pre-configured rules and algorithms. Procedural control over the urban fabric and not just the individual buildings, enables the generation of digital sets far more quickly, at a larger scale, and with much more level of detail than ever before.
These environments allowed the development of dynamic 3D city models, with the ability to evolve in time and space. As such, they have the ability to inherit simulating capabilities within the generation process. We will call these "active urban simulations of cities," that is 3D city models capable of testing scenarios of population, employment, and land uses, and simulating charge or growth over time. By changing the procedural rules, it is possible to introduce variations or optimality into the process, developing the logic to enable certain goals to be pursued. We can then assume that 3D city models can be either dynamic or static in how they are produced. That is, the idea of hand-made environments or procedural generation to build a single environment, versus a dynamic procedural environment that is responsive.
The question arises, as to whether these environments are useful for urban planning. In the next paragraphs, we will discuss the difference between static and active city simulations and how procedural engines, capable of generating complete urban environments, can become useful planning tools.

Static 3D City Simulators
Static models have a predefined structure and study a specific time in space. While dynamically generated models can evolve or change over time and have the ability to create scenarios or variations. Static 3D city model simulations have been popular since the early 1990s, as an evolution of the traditional "maquette," the physical scaled-down models that architects and planners built to present their conceptual ideas. Tools for planning such as the interactive tables, by Mitchell and McCullough since the early 1990s and others, later on, have had a significant impact on urban design and planning processes, using multi-layered manipulative platforms that integrate digital and physical representations to present such simulations (Mitchell & McCullough, 1995). These 3D digital models of cities have presented new ways of introducing participation, urban analytics, or simulations within the built environment (Hudson-Smith et al., 2007) and that is their primary purpose until today.
We are going to refer to these applications as "static 3D urban simulations." The reason is that even though they are primarily used for displaying dynamic information, the 3D city models themselves are inherently static. There are currently numerous applications and examples of 3D models which serve as integrating simulations for planning purposes, such as traffic management and flow analysis (DCPLION Single Line Street Base Map, Midtown Manhattan Model), the analyses for the maintenance and expansion of the tube transportation system (e.g., New York City Subway Resources), or even the study conducted for the examination of the conditions which caused the collapse of the twin towers of the World Trade Centre (Lower Manhattan Development Corporation). Perhaps more than anything, the use of static 3D city models focuses on tasks related to environmental simulations like noise mapping, disaster management, sustainable architecture, airflow simulations, and city planning (Chronis et al., 2017;Döllner et al., 2006;Shiode, 2000).
Today's challenges on these systems remain the quest for finding a simple way of using urban analytics, as a way to inform designed scenarios of these urban environments. In the next sections, we begin to establish the progression from the foundations of graphics to computer-generated environments, to present the beginnings of the use of procedural simulations for planning with the integration of urban analytics.

Procedural Modelling
Procedural techniques are code segments or algorithms that specify some characteristic of a computergenerated model or effect. The adjective procedural is used in computer science to distinguish entities that are described by program code rather than by data structures (Erbert et al., 1994).
With the introduction of three-dimensional texturing (solid texturing) by Perlin (1985), procedural techniques are almost exclusively used to produce realistic images of marble, wood, stone, and clouds ( Figure 1). These tools rely on the crucial idea of pseudo-randomness. That is, for example, to seed parameters, which allows the stochasticity in the generation of an image. Pixar's RenderMan is an application that has applied this technique in the generation of procedural 3D primitives (procprims, for short). User-provided subroutines can be called upon to generate geometry (RenderMan, 2013). The advantage of procpripms is that they can generate an incredible geometric complexity from a small number of inputs, requiring much less processing power to handle geometry. The downside however is that the produced variations can be repetitive and stale if the complexity of the rules is low. For example, a cube can be generated in a scene by defining its coordinates in space and the parameters width and height of the cube. By adding pseudorandomness to the cube's dimensions and coordinates, we can begin to generate an x number of varying cubes in a scene. Now imagine if this would apply to generating buildings, using a more complex set of rules. A vast variety of scenes would be possible to generate than with a non-procedural representation.
In a procedural approach, rather than explicitly specifying and storing all the complex details of an object, the storing is a set of instructions, or simply a recipe, that can be reproduced or modified at will using simple controls. Figure 1. These images of clouds are created exclusively using Perlin noise. It simulates the texture of clouds by modifying parameters. These are three variations out of hundreds of textures generated from the filter "NoiseLab: perlin smudged" by mitaywalle, using the Filter Forge application (https://www.filterforge.com). An application which among others, allow users to create their own procedural textures (see Ashbrook, 2018).

Active Urban Simulations
We consider "active urban simulators" as dynamically generated 3D city models, which are computationally able to evolve. These could be procedurally generated, but not necessarily. To understand how active urban simulations are implemented in an urban gaming environment it would be useful to have a closer look into a few distinguished examples from the gaming history ( Figure 2). Wright's (1989) original SimCity, as shown in the first figure, is a game and an active urban simulation. The original game simulates the growth of a city and places the user in the role of the mayor. The implementation of this model in a gaming environment was the first example of a model that was communicated to a wider audience using simple controls. Wright, in his original version, implemented Forrester's theories for urban dynamics (Birch, 1970) to calculate values such as the city's education, unemployment, and growth rates, and these figures, in turn, determine whether the city's population will blossom or plunge. SimCity is one of the first urban planning games, which introduced the idea of a user-friendly interface for testing scenarios in a city. Despite that it is a game, based on simplified models and game mechanics, it is an original example of a generated city integrating urban science.
Train Fever (2015) integrates a land-use transportation model, to calculate population and employment flows from rail networks and used this to predict demand in housing and thus growing cities. It's a unique way of engaging people in planning processes and understanding the dynamics of the city by showing how urban developments are influenced by the design of transportation. Other city simulation games, such as Cities: Skylines Urban Road, are also using procedural content generation and asset packaging and provide a fully modular road asset framework for Cities. These games, provide insights into the technology used that could potentially be useful for planning. Batty in a recent conversation on RTPI, strongly emphasised the need for data and software engineering literacy in planning education and practice (Batty, 2021) and some of these tools have been the focus of researchers in computational urban planning field for many years now.  (2015), and CitiesSkylines (2020).

Procedural Modelling in Planning
The key idea behind the procedural development of city models is the development of rules for the generation of the "physical" 3D urban environment, that will produce all the viable variations when creating scenarios. That is the reason why both in gaming and in planning, the developers depend on theories of urban morphology and specifically "urban grammars" to write the recipes that will generate the forms. All the way from the pattern language of Alexander (1977) to Salingaros (2000), and the principles of urban structure, these theories provided the mathematical principles of urban structures. A significant leap to translating theories of urban morphology to computing language is the works of Stiny and Gips (1972), which gave the leverage to translate rules to computational instructions for shapes and created a syntax for buildings. Many of today's "city generators" depend on these theories to develop their procedural strategy (see Kelly & McCabe, 2006).
There are a few examples of procedural city modelling and buildings in planning. Mayall and Hall (2007) present a complete software application to generate procedural streets in the programming language LISP. Steadman's (2006) work on geometry and architecture and Spacemate, is also an example where different layouts of buildings are generated using data on floor space index, lighting, and open areas all the way back to 1978 as a study on the geometry of buildings to generate layouts for energy optimisation simulations (Steadman, 2006). Nowadays, research is focusing on the use of machine learning and AI, to create alternative variations of 3D cityscapes using large, collected datasets from captured static 3D models. Characteristic is the example of NVIDIA's generation of 3D approximate landscapes from images (NVIDIA Corporation, 2022).
Most of these examples focus on the generation of city models for the optimization of city configurations (Duering et al., 2020) and a few of them present platforms for facilitating tailored simulations such as UrbanSim (Waddell, 2002). In this case, these virtual environments provide the ideal approach for supporting planning in understanding the possibilities, the problems, and the impacts of the practices of urban modelling, analytics, and planning policies, as it enables the simulation of the consequences directly on the future form of the cities, interactively using simple controls.
At the moment there are some open-source and commercial applications allowing the procedural generation of cityscapes, with only a very few number of those being widely distributed. CityEngine is one of these applications originally by ETH in Zurich (Parish & Müller, 2001). CityEngine has embedded rules to generate street networks and a large number of buildings from open geolocated data, using shape grammars that can be custom tailored. It focuses on streamlining the production of approximate realistic cityscapes using the procedural approach, but at the moment does not provide support for developing urban analytics simulations, such as the forester theories or land-use models, in order to support planning simulations. These need to be developed separately using the built-in Python module. Moreover, it is a stand-alone software which limits the distributing capabilities of the interactive procedural content.

Urban Modelling Using Procedural Platforms
To understand how to develop active city simulators in procedural content, perhaps it is useful to look into "toy model" examples. CityEngine, using the procedural approach, can be useful to quickly develop interactive "sketches" of urban models that can be explored using simple controls such as sliders or switches. Such sketches can be extremely useful to help in explaining the underline math of how dynamic models work. In this case, they can provide powerful educational tools, such as in the case of the visualization of theoretically inspired location models, published in the University College London Centre for Advanced Spatial Analysis (CASA) working paper series as found on the CASA website (Roumpani, 2013), which is a demonstration of the process, the advantages, challenges, and limitations of integrating urban modelling simulations within CityEngine or procedural GIS systems and the real-time generation of cities. More specifically, the three studies describe the development of the original von Thünen's (1826) land-bid rent model, secondly a version of the von Thünen generalization by Wilson and Birkin (1987), and finally the retail locational model by Wilson (2010). The extended von Thünen model (Figure 3) attempts to explain how land uses evolve in relation to product demand and supply in a city including multiple centre markets while demonstrating a more complex dynamic by introducing time within the simulation process and allowing to predict how land uses will evolve in one, two, or 10 years based on calculating equilibrium (Wilson, 2012). These applications, as developed in CityEngine using Python, are a demonstration of the generative characteristics and how they can be used to simulate the real-time evolution of land uses.
The produced outcomes can be both visual and analytical with the option of providing 3D statistics and reports. For example, let us assume that a planning task requires the allocation of a new retail centre. This task would require the integration of a retail model (Harris & Wilson, 1978) to measure the revenue of a shop by calculating the flows of money from the residences to the shopping centres. By defining sets of blocks that represent the already existing shopping centres and ones that represent the residences, the application offers the option of acting as a locational model allowing the user to experiment with different locations for shopping centres which will generate the highest profits based on travelling distance and competition. This is achieved using functions that are applied globally to the generated 3D urban environment and can be used to define spatial relationships. It provides the opportunity to create a "gamified" connection between design, urban analytics, and 3D visualisations, as they can provide a unique method for communicating this information to professionals or the broader public. Instead of designing solutions, the user can use interactive parameters to affect the 3D model globally and produce varied scenarios, thus enabling virtual cities to become active simulators for planning.

Urban Analytics in CityEngine
The following question can be asked: Can the integration of analytics in 3D visualisations help answer meaningful questions in planning? Picon and Ratti (2019), in a conversation on digital media in architecture and planning, discuss in depth the need for such systems to be developed as a response to the increasing amount of produced urban data for the built environment. The need for parametric/procedural control becomes evident when the complexity of city data, becomes big enough, to require a means to explore a multitude of dependent parameters. With the emergence of digital twins in the smart cities' context and the production of an increasing number of datasets that describe the environment, the challenge is on the development of methods to collect, manage, and analyse the streams of data and, at the same time, cope with the complexity of the algorithms that produce meaningful analytics (Hudson-Smith et al., 2020).
In the following example, we are using a pre-defined external model, calibrated using real data, to define the amount of new future developments required for an area. In this case study, we use the outputs of QUANT (Batty & Milton, 2021) an advanced urban prediction model developed in CASA. QUANT, among others, produces scenarios of population and employment for the UK using a type of spatial interaction (a type belonging to the family of gravity models). We use QUANT as an external model, to provide the population scenarios on a regional scale which define the future housing need of a local area and we will use CityEngine to drive the procedural 3D generation based on these population predic-tions. The idea is to enable the user to utilise the procedural controls and building syntax supplied by CityEngine as an interface, control the parameters of the urban model as inputs, and produce generated 3D visualisations of the QUANT scenarios as outputs.
The workflow is as follows. The generated or designed building volumes from CityEngine are used to make an estimation of the proposed housing capacity, which in turn is provided to the QUANT model as inputs for the population and employment matrix. QUANT then predicts population fluctuations in the area based on regional flows, which CityEnigne redistributes to the generated zones, thus showing demand for housing and consequently retail or schools (education). An increase in demand is indicated in the 3D model which prompts the planner or user to add additional infrastructure, which in turn triggers a new QUANT iteration. This loop will ensure the stability of the planning scenarios and will allow the communication between the two platforms: QUANT and the planning model built in CityEngine. To develop a fully responsive system, machine learning for accelerating urban modelling can be employed as described in Milton and Roumpani (2019).
Let us now assume that, in this scenario, QUANT indicates that there is going to be additional demand for hosting population in the regional zones where the Queen's Elisabeth Olympic Park is located, for instance, due to a planned increase in employment in one of the zones in the Olympic Park. To estimate the demand for housing within the Olympic Park, we would need to run a new instance of QUANT and re-distribute the population flows within our area of interest. This essentially means that it will be possible to test different urban design solutions inside the park and use QUANT to evaluate population scenarios on a regional scale by including flows that extend the study area (Figure 4).
The result of this work is a composite active simulation of the Olympic Park, with all the planning variables, such as proposed building heights, maximum building heights, roads eaves, etc., redeveloped procedurally, using real development data and outputting analytics from the simulated outputs. Let's assume that the employment of a nearby university zone is tripled. The demand in the residential area calculated by QUANT shows that it exceeds the building's capacity and is indicated using red volumes (weighted distribution considers proximity to the university). On the left side, we created two skyrises based on permitted development zones in the planning applications. New scenario capabilities allow the user to experiment with multiple solutions/variations that satisfy the population projections, e.g., experiment with building density scenarios.

Opportunities for Gamification
Using simple controls to trigger the evolution of a 3D city model creates opportunities for the gamification of urban planning in the context of planning participation. The concept of collaborative planning using a table augmented with digital city layouts and with physical objects that can be moved around to create planning scenarios is a vision that has been developed and exhib-ited widely with procedural technology used to generate urban layouts.
The "Expanding Lima" model is a study set within the context of the ReMap Lima project, which attempts to utilise public engagement and modelling methodologies to address issues such as the unofficial growth in the outskirts of Lima, Peru. In this example, data collected from mapping drones ( Figure 5) are integrated with collected information from the communities and  public participation, in order to provide inputs for a dynamic 3D city simulation. The model uses measures of accessibility through the mapped road networks and house density indicators from footprints extracted from the captured 3D model, in order to create a predicting simulation of the rapidly growing urban environment. All indicators can be controlled externally by the user using the CityEngine sliders to produce the different scenarios ( Figure 6).
To demonstrate and test the possibilities for an online scenario, a toy "gravity type" model as described above is employed to identify the optimal locations for possible new developments, based on flows from mapped residences and externally driven population growth. New virtual lots were designed with zero population and began populating the newly developed zones by assuming an increase in population using a growth rate defined by surveys. Despite the lack of sufficient datasets, this work produced an early interactive application which schematically illustrates the growth of the favelas over time and the possibilities for such platforms.
The use of 3D interactive urban environments for public participation can improve the role that planning can play in the socio-environmental processes and open space for the communication between different decision-making parties such as citizens, planners, and policymakers.

Conclusions
Tools which include procedural modelling and city scenario methods can improve our understanding of the urban environment. Urban modelling methods and simulations can support planning and communicating the parameters which are critical to balancing urban life. This would help shape decision making either by testing a large number of different options or seeking for the optimum option from a finite number of proposals. Current procedural modelling software such as CityEngine is primarily used for visualization. However, with few additional components, the same tools can be adapted to include urban analytics for the evaluation of early designs. If we assume, that the planning problem is not finite, then there must be numerous variations of pro-duced "optimal" solutions. In this case, this framework may question the authoritarian role of the master plan to produce dynamic online systems that can change over time, either with the inputs from users, with applications for the public, or by the evolution of new proposed developments over the years. Within this context, the procedural approach can provide the means for an online scenario-making methodology that allows the planner to think in terms of properties, capacities, and recipes, rather than traditional design. This is certainly a different way of implementing urban planning in practice which is closer to policymaking. The purpose of the developed tools is then to allow a quick understanding of the implications of applying land use and population metrics within a defined geo-referenced boundary whilst acknowledging existing site constraints and communicating interactive scenarios to the wider audience, allowing to create a "teaser" of different versions of how the city would look like in the future.
Spatial Analysis with Andrew Hudson-Smith and Flora Roumpani, and the Bartlett School of Architecture/UCL Urban Laboratory with Ben Campkin. It was undertaken in close collaboration with Carlos Escalante from CENCA, Silvia de Los Rios from CIDAP, and Liliana Miranda from Foro Ciudades Para la Vida, a network of 57 organisations from 20 Peruvian cities, ranging from local government, academics, and civil society groups, as well as local communities from two contested settlements in Lima, Peru. Drone Adventures will be joining in a mission using mapping drones with Alexandre Habersaat and Emanuele Lubrano.