Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Algorithms for the Automatic Generation of Urban

Streets and Buildings


Soon Tee Teoh
Department of Computer Science, San Jose State University
San Jose, California, USA

existing work in procedural city generation, and then


Abstract - We describe the algorithms we have developed
describe the novel features of our system.
to automatically generate street networks and building
plots in the automatic procedural creation of a realistic
city. Our system first sites the important regions of a city, 2 Related Works
such as the commercial center, historical center, and Greuter et al. [2] presented a procedural method to
residential areas. Then, a network of freeway and main generate ``pseudo-infinite'' virtual cities in real-time. They
roads are built. Finally, a network of streets are built are able to generate buildings with different facades, using
throughout the city. The main contribution described in different textures, in real-time. As the user pans across,
this paper is the design of the freeways, main streets and their program creates more random buildings in real-time,
minor streets, and the allocation of space for the roads and giving the illusion of an infinite city. In our work, we focus
buildings in the city. Compared to existing methods, our on more realistic cities, not only office buildings. We create
system creates cities that more closely mimics real-world residential areas, industrial areas, historical areas, and
cities, and can also generate millions of streets in seconds. commercial areas, for example. Also, we create a more
varied and realistic road network with freeways, main
Keywords: procedural modeling, 3D graphics streets, and smaller streets.

Lechner et al. [3] proposes using autonomous agents


to grow a city. Urban land-use is classified into three types:
1 Introduction commercial, residential and industrial. Different types have
Virtual graphical model of cities are frequently used different preferences, for example, residential developers
as the setting of computer games and virtual movie sets. prefer regions where roads are less congested, are close to
The automatic generation of realistic city models is water, and are far away from industrial areas. This is
therefore very useful. Furthermore, algorithms used in similar to the process that we use to site commercial and
realistic computer-generated city plans can be used as industrial centers. However, we consider even more
instructional tools in city-planning and geography classes. detailed land-use areas, such as airports, seaports, historical
In creating new virtual environments for a computer game areas and government areas. Also, we have developed a
level, the automatic city generation tool must (1) create a system to generate realistic streets.
new unique city, (2) create a city that is ``realistic'', sharing
common-sense similarities with real-world cities, and (3) Parish and Mueller's [5] system, called CityEngine,
generate the city within a few seconds. uses L-systems to generate streets and buildings. The inputs
to the system are height maps, land/water/vegetation maps,
We have developed a system that creates a new city on population density maps, zone maps, street patterns (such
an empty terrain, according to user preferences. Beginning as regular grids or radial), and building-height maps. This
with the city layout found by the Autopolis [9] procedural method focuses on generating street patterns and does not
city creation process, we create freeways, major streets and determine the land-use type of different areas of the city.
minor streets. We then find the boundaries of building Therefore, this method can only generate the commercial
parcels, and split the parcels into multiple plots. The major (downtown) area of the city, but not the entire city, because
contributions of this paper are: (1) the allocation of space to the distribution of building heights and street density is
simulate the width of freeways, (2) a fast algorithm to build uniform throughout the entire scene. Our work tries to
grid minor streets, (3) a fast algorithm to build curvy mimic the complexity of different patterns of city streets
suburban style minor streets, (4) a fast method to find and layouts.
building parcels, and (5) a fast method to split building
parcels into multiple building plots. We first describe the
Sun et al. [8] created a virtual road network. They materials and finished products for export. At the end of
build road patterns based on image-derived templates and each step in the process, the user is allowed to edit the
rule-based systems. They accept an input map of the program-generated output as well as specify preferences
population density of the area, and then intelligently before the program proceeds to the next step.
produce streets of different patterns based on geographical
and urban restrictions, such as elevation and congestion.
Our street-creation algorithms share some similarities with
their methods, but ours is integrated into a more realistic
city creation process that produces a city with different
integrated regions with different land-use. We create a
freeway pattern according to the layout of the city, and
assigns an appropriate street pattern to different parts of the
ciy.

DiLorenzo et al.'s [1] create a hierarchical model


based on zoning and other heuristics based on sociological
and empirical information from real-world cities. For
example, the density is the highest in the Central Business
District and decreases with distance from the center. Their
system then runs a simulation of the city growth/decay over
time.

Another related work is Thomas and Donikian's [10]


system for creating and animating populations in a virtual
city. They presented a method for simulating pedestrians
and vehicular traffic in a virtual city. Their work can
possibly be adapted to populate the cities created by our
process.

There are also some works that automatically generate


buildings, such as CGAshape [4] and Instant Architecture
[6]. There is also some work [7] to generate computer
graphics models of actual real-world cities, given data such
as terrain map.
Figure 1: The procedural city generation process
Teoh [9] uses a different approach in the Autopolis
city creation tool. Given terrain information, Autopolis sites The problem with the original Autopolis system is that
commercial centers, industrial centers, ports and airports they do not describe a rigorous system to allocate space for
according to city-planning heuristics. Then, a network of the streets and parcels for buildings. This is necessary to
freeways is automatically generated to connect these create a detailed graphical model of a city in which the user
centers. Commercial and industrial regions are grown from can explore. In particular, freeways are very wide and take
their respective centers, and residential centers are also up significant space; a typical eight-lane freeway is more
grown around them. Then, within the commercial area, than 50-meters wide. Since the path of a freeway is
government and historical areas are allocated. Finally, a represented as zero-width lines, space needs to be allocated
network main streets and small streets are built. on the map so that no buildings or other streets will be built
on the freeway. Furthermore, Autopolis does not describe a
real-time algorithm to create a large network of streets. In
3 Process our system, we allocate space for freeways, introduce a fast
We follow the process laid out in Autopolis [9], shown street-generation algorithm, and also introduce a new
in Figure 1. This method produces a fairly complex city algorithm to build curvy streets in suburban neighborhoods.
layout with sufficient realism, mainly because the regions
of the cities are sited based on geographical features and Then, we describe a new real-time method to find
city-planning rules, for example, that airports prefer to be plots of land between streets, and sub-divide the plots into
on flat land, and near water for possibility of future individual building parcels. Thus, our system uses the
expansion. Another example is that industrial areas tend to process in Autopolis to design the macro aspects of the city,
be near seaports and airports for ease of transport of raw such as the locations of different regions and land-use, and
we introduce methods to design the fine features of a city:
the street network and building plots. In this way, we make
significant progress to building a highly realistic complex
city environment in real-time.

4 Space for Freeways


Freeways are built between the centers of the city.
Centers include commercial centers, industrial centers,
airports and seaports. Additional ring freeways are built
outside of the downtown area. Simple path-finding is used
to create the freeways. There is an increase in cost for going
over water, and for going to a neighboring cell with a
different elevation. When the path of a freeway has been
found, it is denoted as a connection between cells in a
coarse grid. The coarse grid is used for fast path-finding for
freeways. The terrain height map, city centers, and general
land-use are all defined on the coarse grid. Each coarse grid Figure 2: A quadratic Bezier curve for a freeway
cell is defined to be 50 meters across.

Before building fine streets, a fine grid is set up. Each


grid cell size in the fine grid is set to be 10 meters across.
Each fine grid cell has a use type. First, the freeway is scan-
converted to the fine grid cells. The original representation
of a freeway is a connection between coarse grid cells.
When scan converting to a fine grid, the freeway is treated
as a piecewise continuous quadratic Bezier spline. In other
words, if any three consecutive freeway control points are
not in a straight line, these three control points are taken to
be the control points of a quadratic Bezier curve. This is
shown in Figure 2. In this way, the freeway (unlike local
streets) cannot have abrupt turns. This is because freeways
are designed for continuous fast-moving traffic with no
stops, and therefore they cannot have abrupt turns.

After the freeway has been scan-converted, for each Figure 3: Scan-Converting a freeway
fine grid cell that is assigned the freeway type, all fine grid
cells within four fine grid cells are assigned the ``freeway
reserved'' type, so that no minor street or building can be
built on these reserved cells. The scan-conversion process is
shown in Figure 3. An example of the final generated map
is shown in Figure 4, showing that fine grid cells are
undeveloped (green) around freeway cells. Minor roads and
building parcels are not allowed near freeways. Major roads
are allowed to intersect freeways via overpasses. Access
ramps can then be built from the major roads to the
freeways.

Figure 4: A freeway
5 Major Streets
In a city, there are major streets and minor streets.
Major streets are wider, carry more traffic, and have traffic
signal priority over minor streets. In a city, the total length
of minor streets is more than the length of major streets.
Our system first creates a network of major streets on the
coarse grid. First, the coarse grid is divided into a regular
grid of cells. Each cell has, say, 10 x 10 coarse grid points.
To create a regular pattern of major streets, the center point
of each cell is chosen as a seed point. To create an irregular
pattern, a random point is chosen within each cell. A path-
finding method is used to connect every chosen point with
its adjacent points. This algorithm is described in the
Autopolis [9] paper.

Before minor streets are created, the major streets, like


the freeways, are scan-converted into the fine grid. Each
cell that is adjacent to a major street cell is also marked as
``reserved''. Next, minor streets are created within each
area surrounded by major streets.

6 Grid Minor Streets


Figure 5: Grid Minor Streets: Diagonal, axis-aligned, and
For each fine grid cell, the possible roads out of the different frequencies
cell are to each of its eight adjacent cells. In other words,
only diagonal and axis-aligned roads are allowed. Each 7 Suburban Minor Streets
adjacent cell is assigned a number, from 0 through 7. Two
bits are allocated for each adjacent cell. The values possible The grid street patterns is suitable to imitate American
for the two bits are: 00 for no street, 01 for minor street, 10 urban centers, since many U.S. commercial centers have a
for major street, and 11 for freeway. general gridded pattern of streets. However, in the suburban
residential areas, particularly in more wealthy
Within each region R bounded by major streets, a grid neighborhoods, this pattern is not suitable. Therefore, we
of minor streets can be created, either axis-aligned, or have developed a method that generates more realistic
diagonal. First, all cells belonging to Region R is marked. suburban street patterns, where the roads are curved and
To find all the fine grid cells belonging to Region R, first not straight.
mark all the fine grid cells that belong to a freeway or a
main street. Then, for each unmarked fine grid cell, set it to
the current region R, and flood fill all surrounding cells
until no unmarked cell is found. After this, all fine grid
cells will be marked with their unique region number.

To set the grid minor streets, first determine the


frequencies MajorRes and MinorRes of the minor streets.
For example, the frequencies may be 10 cells in the major
direction, and 5 cells in the other perpendicular direction.
The abbreviated algorithm (ignoring special cases) to grow
diagonal fine streets is as follows: For each Cell (i,j), if
mod(i,MajorRes) = mod(j,MajorRes), grow street up and
right, and if mod(i,MinorRes) = mod(j,MinorRes), grow
street down and left The method to grow axis-aligned grid
streets is similar.

An example of grid minor streets is shown in Figure


5. This example contains both axis-aligned and diagonal
grid minor streets, as well as grids of different frequencies. Figure 6: Suburban Minor Streets
First, a region of residential land bounded by major After all the triangles have been reserved by all the
streets is set to have the curvy suburban minor street streets. The remaining contiguous triangles together form
pattern. Then, for every fine grid cell in the region, run the one parcel. This is shown in Figure 8.
GrowCurvyStreet method. The GrowCurvyStreet method
starts by finding a random adjacent existing street, and
connects to this street. Then, it repeatedly finds the next
cell to grow to, with the condition that the next cell must
not be adjacent to any existing street. When no more
candidate next cell can be found, it finds an existing street
one cell away and joins to this existing street. An example
of curvy minor streets generated by our algorithm is shown
in Figure 6.

8 Building Parcels
After all the streets, major and minor, have been
created, each piece of land bounded by streets is considered
one parcel on which a building can be built. We first
determine the geometry of the parcels, and then optionally
split each parcel into multiple plots. One building can be Figure 8: The colored triangles are the remaining triangles
built on each plot. of a parcel after all the street segments have reserved their
triangles. All contiguous un-reserved triangles form one
Streets are represented as zero-width lines. To create parcel where a building can be built.
parcels for buildings, it is necessary that the parcels be
receded from the streets so that the buildings do not grow The next step is to find the outline of a parcel. The
on top of any street. We have designed a fast algorithm to outline of a parcel is a subset of all the edges of the
quickly find the parcels. The diagrams in Figure 7 show the triangles belonging to the parcel. First, set all edges to
steps. First, each fine grid cell is divided into equal four unmarked. Then, for each triangle belonging to the parcel,
triangles that meet at the center of the grid cell. Each toggle all its edges (from unmarked to marked, or from
triangle can either be reserved by a street or else be part of a marked to unmarked). After this, all edges that are marked
parcel. Next, each street is scan-converted to the triangles. form the outline of the parcel. In other words, these are all
Figure 7 shows how to scan-convert an axis-aligned street the edges that belong to only one triangle belonging to the
and a diagonal street. In each case, the triangles parcel.
surrounding the street are reserved for the street.
Once the outline of a parcel is found, the parcel can be
split up into multiple plots. A building is built on each plot.
To split a parcel into two plots, find the longest straight
edge of the parcel. Then, find the midpoint of the straight
edge. At this midpoint, split the parcel along the
perpendicular direction. An example is shown in Figure 9.

Figure 7: Top: Dividing a fine grid cell into four triangles.


Middle: Scan-converting a horizontal street to reserve the
surrounding triangles. Bottom: Scan-converting a diagonal
street to reserve the surrounding triangles.
Figure 9: Split a parcel into two building plots 10 Future Work
The next step is to build more detailed models of
9 Performance buildings, streets and other landscape details. For example,
This program is run on an Intel Pentium 1.6GHz graphics models are needed for divided freeways, lanes,
processor, with 504 MB of RAM. It takes 5.25 seconds to ramps, and streets need to be modeled as well, with street
create minor streets on 2225 x 2225 (4,950,625) cells. It lamps, lanes, traffic signals. More varied building models
takes a further 9.64 seconds to define all the building and textures can be created. Currently, buildings are grown
parcels. It takes 0.19 seconds to split the parcels in 540 x straight up in their plots. We can next create circular
540 (291,600) of these cells into two building plots. Due to buildings, sloping buildings and other variations to make
memory constraints, we do not create minor streets and the city look more interesting. Models are also needed for
building parcels in the entire 100km $\times$ 100km city. suburban houses, shopping malls, schools and other
However, as the user moves through the scene, these can be buildings. Parks, open spaces and gardens also need to be
created on-demand. An overview of the city is shown in modeled.
Figure 10 and a close-up view of the city is shown in Figure
11. For the more basic creation of street networks and city
land-use, we can also enhance the algorithm. For example,
the curvy minor street pattern can be modified to take into
account the terrain, as streets sometimes follow the
contours of the terrain. Also, we can have more interesting
street patterns that are not restricted to the axis-aligned and
diagonal directions.

11 Conclusions
We have presented methods to quickly create streets
and building plots for a realistic procedurally-generated
virtual city.

We first use the Autopolis process to site commercial


centers, industrial centers, ports and airports according to
city-planning heuristics. Then, a network of freeways is
Figure 10: Overview of the city automatically generated to connect these centers.
Commercial and industrial regions are grown from their
respective centers, and residential centers are also grown
around them. Then, within the commercial area,
government and historical areas are allocated. This process
creates a realistic layout of the city, according to city-
planning principles. For example, airports tend to be on flat
land, industrial areas tend to be near airports and seaports.
Historical centers tend to be near the government civic
centers. Commercial centers with a high concentration of
skyscrapers are usually not far away. Urban areas also tend
to grow along coasts and on low land. Some scenic areas
along rivers are also reserved as parks and open spaces.

From the general layout of the various land-use types


of the city, our program begins to create streets. First,
freeways are created to connect the different centers of the
city. This is done using a simple path-finding method that
minimizes cost. There is cost for going over water and cost
for going to a cell of different height. Cells are then divided
Figure 11: Close-up view of the city center, showing a into fine grid cells and cells next to the freeways are
freeway, freeway overpasses, and office buildings built on reserved to take into account the width of the freeways so
plots of land. that no buildings and streets will be created over the
freeways. Major streets are allowed to go across and access
the freeways. The allocation of space for the freeways is the 12 References
first major contribution of this paper.
[1] P. DiLorenzo, V. Zordan, and D. Tran. “Interactive
Next, a network of main (major) streets is created. animation of cities over time.” In Proceedings of the 17th
This is done by setting a regular, irregular, or hybrid grid of International Conference on Computer Animation and
points on all built-up urban cells. Simple path-finding is Social Agents (CASA 2004), 2004.
used to connect each grid point with adjacent points. In this
way, main streets are created. The frequency of these streets [2] S. Greuter, J. Parker, N. Stewart, and G. Leach.
can be increased near urban centers to simulate increase in “Real-time procedural generation of ‘pseudo-infinite’
density. cities.” In Proceedings of the 1st International Conference
on Computer Graphics and Interactive Techniques in
The second major contribution of this paper is the Australasia and Southeast Asia, pages 87-95, 2003.
algorithm for the fast creation of grid minor streets. The
user sets the frequency of the minor streets in the major and [3] T. Lechner, B. Watson, U. Wilensky, and M. Felsen.
minor directions. The algorithm creates a grid of minor “Procedural city modeling.” In Proceedings of the 1st
streets in a region bounded by major streets. Each fine grid Midwestern Graphics Conference, 2003.
cell has eight possible streets to the eight adjacent fine grid
cells. A flag is set for each street going to an adjacent cell. [4] P. Muller, P. Wonka, S. Haegler, A. Ulmer, and L.V.
The grid can be in the axis-aligned direction or the Gool. “Procedural modeling of buildings.” In Proceedings
diagonal direction. of ACM Siggraph 2006/ACM Transactions on Graphics
(TOG), 25(3):614-623, 2006.
The third major contribution of this paper is the
algorithm for creating curvy suburban minor streets. For [5] Y. Parish and P. Muller. “Procedural modeling of
each suburban region bounded by major streets, seed points cities.” In Proceedings of ACM SIGGRAPH 2001, pages
are repeatedly chosen at random. From the seed point, a 301-308, 2001.
curvy minor street is repeatedly grown to a random
neighboring cell. A neighboring cell is only a candidate if it [6] P. Wonka, M. Wimmer, F. Sillion, and W. Ribarsky.
is not currently a street and it is not currently next to an “Instant Architecture.” ACM Transactions on Graphics,
existing street. In this way, a network of curvy streets is 22(3):669-677, July 2003.
grown to cover the entire region.
[7] W. Ribarsky, T. Wasilweski, and N. Faust. “From
Finally, we have described a fast algorithm to allocate urban terrain models to visible cities.” IEE Computer
building parcels. This is done by dividing each cell into Graphics and Applications, 22(4):231-238, July 2002.
four triangles. The streets first reserve the triangles that
they intersect. All unreserved triangles belong to buildings. [8] J. Sun, X. Yu, G. Baciu, and M. Green. “Template-
A set of contiguous unreserved triangles makes up a based generation of road networks for virtual city
building parcel. The boundary of the building parcel is modeling.” In Proceedings of the ACM Symposium on
found. Each building parcel can be further subdivided into Virtual Reality Software and Technology (VRST 2002),
multiple building plots. Then, a building can be built on pages 33-40, 2003.
each plot.
[9] S. Teoh, “Autopolis: Allowing user influence in the
We have thus presented methods to quickly create automatic creation of realistic cities.” In Proceedings of the
different types of urban street patterns: freeways, main 3rd International Symposium on Visual Computing (ISVC
streets, grid minor streets, and curvy suburban minor ’07), pages 118-129, 2007.
streets. In this way, a realistic pattern of streets can be
procedurally created very quickly. Next, we have also [10] G. Thomas and S. Donikian. “Modeling virtual cities
allocated parcels for buildings. Combined with the dedicated to behavioral animation.” Computer Graphics
Autopolis city-creation process, we can build a large layout Forum, 19(3):71-80, 2000.
model (100km x 100km) of a realistic city within a minute.
Graphics models of buildings, streets, trees, bridges, and
other landscape features can then be built according to this
layout, and a full virtual city environment is created, ready
to be interactively navigated and explored.

You might also like