Algorithm for the Automatic Generation of Urban Streets

7
 Algorithms for the Automatic Generation of Urban S treets a nd Buildings Soon Tee Teoh Department of Computer Science, San Jose State University San Jose, California, USA Abstract -  We describe the algorithms we have developed 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, such as the commercial center, historical center, and residential areas. Then, a network of freeway and main roads are built. Finally, a network of streets are built throughout the city. The main contribution described in this paper is the design of the freeways, main streets and minor streets, and the allocation of space for the roads and buildings in the city. Compared to existing methods, our system creates cities that more closely mimics real-world cities, and can also generate millions of streets in seconds. Keywords: procedural modeling, 3D graphics 1 Introduction Virtual graphical model of cities are frequently used as the setting of computer games and virtual movie sets. The automatic generation of realistic city models is therefore very useful. Furthermore, algorithms used in realistic computer-generated city plans can be used as instructional tools in city-planning and geography classes. In creating new virtual environments for a computer game level, the automatic city generation tool must (1) create a new unique city, (2) create a city that is ``realistic'', sharing common-sense similarities with real-world cities, and (3) generate the city within a few seconds. We have developed a system that creates a new city on an empty terrain, according to user preferences. Beginning with the city layout found by the Autopolis [9] procedural city creation process, we create freeways, major streets and minor streets. We then find the boundaries of building parcels, and split the parcels into multiple plots. The major contributio ns of thi s paper are: (1) the allocation of space to simulate the width of freew ays, (2) a fast algorithm to build grid minor streets, (3) a fast algorithm to build curvy suburban style minor streets, (4) a fast method to find building parcels, and (5) a fast method to split building parcels into multiple building plots. We first describe the existing work in procedural city generation, and then describe the novel features of our system. 2 Related Works Greuter et al. [2] presented a procedural method to generate ``pseudo-infinite'' virtual cities in real-time. They are able to generate buildings with different facades, using different textures, in real-time. As the user pans across, their program creates more random buildings in real-time, giving the illusion of an infinite city. In our work, we focus on more realistic cities, not only office buildings. We create residential areas, industrial areas, historical areas, and commercial areas, for example. Also, we create a more varied and realistic road network with freeways, main streets, and smaller streets. Lechner et al. [3] proposes using autonomous agents to grow a city. Urban land-use is classified into three types: commercial, residential and industrial. Different types have different preferences, for example, residential developers prefer regions where roads are less congested, are close to water, and are far away from industrial areas. This is similar to the process that we use to site commercial and industrial centers. However, we consider even more detailed land-use areas, such as airports, seaports, historical areas and government areas. Also, we have developed a sys tem to generate realistic streets. Parish and Mueller's [5] system, called CityEngine, uses L-sy stems to generate streets and buildings. The inputs to the system are height maps, land/water/vegetation maps, population density maps, zone maps, street patterns (such as regular grids or radial), and building-height maps. This method focuses on generating street patterns and does not determine the land-use type of different areas of the city. Therefore, this method can only generate the commercial (downtown) area of the city, but not the entire city, because the distribution of building heights and street density is uniform throughout the entire scene. Our work tries to mimic the complexity of different patterns of city streets and layouts.

Transcript of Algorithm for the Automatic Generation of Urban Streets

8/12/2019 Algorithm for the Automatic Generation of Urban Streets

http://slidepdf.com/reader/full/algorithm-for-the-automatic-generation-of-urban-streets 1/7

 

Algorithms for the Automatic Generation of Urban

Streets and Buildings

Soon Tee Teoh

Department of Computer Science, San Jose State UniversitySan Jose, California, USA

Abstract - We describe the algorithms we have developed

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,

such as the commercial center, historical center, and

residential areas. Then, a network of freeway and main

roads are built. Finally, a network of streets are built

throughout the city. The main contribution described in

this paper is the design of the freeways, main streets andminor streets, and the allocation of space for the roads and

buildings in the city. Compared to existing methods, our

system creates cities that more closely mimics real-world

cities, and can also generate millions of streets in seconds.

Keywords: procedural modeling, 3D graphics

1  Introduction

Virtual graphical model of cities are frequently used

as the setting of computer games and virtual movie sets.The automatic generation of realistic city models is

therefore very useful. Furthermore, algorithms used inrealistic computer-generated city plans can be used as

instructional tools in city-planning and geography classes.In creating new virtual environments for a computer gamelevel, the automatic city generation tool must (1) create a

new unique city, (2) create a city that is ``realistic'', sharingcommon-sense similarities with real-world cities, and (3)

generate the city within a few seconds.

We have developed a system that creates a new city onan empty terrain, according to user preferences. Beginning

with the city layout found by the Autopolis [9] proceduralcity creation process, we create freeways, major streets andminor streets. We then find the boundaries of building

parcels, and split the parcels into multiple plots. The majorcontributions of this paper are: (1) the allocation of space to

simulate the width of freeways, (2) a fast algorithm to buildgrid minor streets, (3) a fast algorithm to build curvy

suburban style minor streets, (4) a fast method to findbuilding parcels, and (5) a fast method to split buildingparcels into multiple building plots. We first describe the

existing work in procedural city generation, and thendescribe the novel features of our system.

2  Related Works

Greuter et al. [2] presented a procedural method to

generate ``pseudo-infinite'' virtual cities in real-time. Theyare able to generate buildings with different facades, using

different textures, in real-time. As the user pans across,their program creates more random buildings in real-time,

giving the illusion of an infinite city. In our work, we focuson more realistic cities, not only office buildings. We createresidential areas, industrial areas, historical areas, and

commercial areas, for example. Also, we create a morevaried and realistic road network with freeways, main

streets, and smaller streets.

Lechner et al. [3] proposes using autonomous agentsto grow a city. Urban land-use is classified into three types:

commercial, residential and industrial. Different types havedifferent preferences, for example, residential developers

prefer regions where roads are less congested, are close towater, and are far away from industrial areas. This issimilar to the process that we use to site commercial and

industrial centers. However, we consider even moredetailed land-use areas, such as airports, seaports, historical

areas and government areas. Also, we have developed asystem to generate realistic streets.

Parish and Mueller's [5] system, called CityEngine,uses L-systems to generate streets and buildings. The inputs

to the system are height maps, land/water/vegetation maps,population density maps, zone maps, street patterns (such

as regular grids or radial), and building-height maps. This

method focuses on generating street patterns and does notdetermine the land-use type of different areas of the city.

Therefore, this method can only generate the commercial(downtown) area of the city, but not the entire city, because

the distribution of building heights and street density isuniform throughout the entire scene. Our work tries to

mimic the complexity of different patterns of city streetsand layouts.

8/12/2019 Algorithm for the Automatic Generation of Urban Streets

http://slidepdf.com/reader/full/algorithm-for-the-automatic-generation-of-urban-streets 2/7

8/12/2019 Algorithm for the Automatic Generation of Urban Streets

http://slidepdf.com/reader/full/algorithm-for-the-automatic-generation-of-urban-streets 3/7

 

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 complexcity 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 builtoutside of the downtown area. Simple path-finding is used

to create the freeways. There is an increase in cost for goingover water, and for going to a neighboring cell with a

different elevation. When the path of a freeway has beenfound, it is denoted as a connection between cells in a

coarse grid. The coarse grid is used for fast path-finding forfreeways. The terrain height map, city centers, and generalland-use are all defined on the coarse grid. Each coarse grid

cell is defined to be 50 meters across.

Before building fine streets, a fine grid is set up. Eachgrid 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 representationof a freeway is a connection between coarse grid cells.

When scan converting to a fine grid, the freeway is treatedas a piecewise continuous quadratic Bezier spline. In other

words, if any three consecutive freeway control points arenot in a straight line, these three control points are taken to

be the control points of a quadratic Bezier curve. This isshown in Figure 2. In this way, the freeway (unlike local

streets) cannot have abrupt turns. This is because freewaysare 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

fine grid cell that is assigned the freeway type, all fine gridcells within four fine grid cells are assigned the ``freeway

reserved'' type, so that no minor street or building can bebuilt on these reserved cells. The scan-conversion process isshown in Figure 3. An example of the final generated map

is shown in Figure 4, showing that fine grid cells areundeveloped (green) around freeway cells. Minor roads and

building parcels are not allowed near freeways. Major roadsare allowed to intersect freeways via overpasses. Access

ramps can then be built from the major roads to the

freeways.

Figure 2: A quadratic Bezier curve for a freeway

Figure 3: Scan-Converting a freeway

Figure 4: A freeway

8/12/2019 Algorithm for the Automatic Generation of Urban Streets

http://slidepdf.com/reader/full/algorithm-for-the-automatic-generation-of-urban-streets 4/7

8/12/2019 Algorithm for the Automatic Generation of Urban Streets

http://slidepdf.com/reader/full/algorithm-for-the-automatic-generation-of-urban-streets 5/7

 

First, a region of residential land bounded by majorstreets is set to have the curvy suburban minor street

pattern. Then, for every fine grid cell in the region, run theGrowCurvyStreet method. The GrowCurvyStreet methodstarts by finding a random adjacent existing street, and

connects to this street. Then, it repeatedly finds the nextcell to grow to, with the condition that the next cell must

not be adjacent to any existing street. When no morecandidate next cell can be found, it finds an existing street

one cell away and joins to this existing street. An exampleof curvy minor streets generated by our algorithm is shownin Figure 6.

8  Building Parcels

After all the streets, major and minor, have beencreated, each piece of land bounded by streets is consideredone parcel on which a building can be built. We first

determine the geometry of the parcels, and then optionallysplit each parcel into multiple plots. One building can be

built on each plot.

Streets are represented as zero-width lines. To createparcels for buildings, it is necessary that the parcels bereceded from the streets so that the buildings do not grow

on top of any street. We have designed a fast algorithm toquickly find the parcels. The diagrams in Figure 7 show the

steps. First, each fine grid cell is divided into equal fourtriangles that meet at the center of the grid cell. Each

triangle can either be reserved by a street or else be part of aparcel. Next, each street is scan-converted to the triangles.

Figure 7 shows how to scan-convert an axis-aligned streetand a diagonal street. In each case, the triangles

surrounding the street are reserved for the street.

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.

After all the triangles have been reserved by all thestreets. The remaining contiguous triangles together form

one parcel. This is shown in Figure 8.

Figure 8: The colored triangles are the remaining triangles

of a parcel after all the street segments have reserved theirtriangles. All contiguous un-reserved triangles form oneparcel where a building can be built.

The next step is to find the outline of a parcel. The

outline of a parcel is a subset of all the edges of thetriangles belonging to the parcel. First, set all edges to

unmarked. Then, for each triangle belonging to the parcel,toggle all its edges (from unmarked to marked, or frommarked to unmarked). After this, all edges that are marked

form the outline of the parcel. In other words, these are allthe edges that belong to only one triangle belonging to the

parcel.

Once the outline of a parcel is found, the parcel can besplit up into multiple plots. A building is built on each plot.

To split a parcel into two plots, find the longest straightedge of the parcel. Then, find the midpoint of the straightedge. At this midpoint, split the parcel along the

perpendicular direction. An example is shown in Figure 9.

8/12/2019 Algorithm for the Automatic Generation of Urban Streets

http://slidepdf.com/reader/full/algorithm-for-the-automatic-generation-of-urban-streets 6/7

 

Figure 9: Split a parcel into two building plots

9  Performance

This program is run on an Intel Pentium 1.6GHzprocessor, with 504 MB of RAM. It takes 5.25 seconds to

create minor streets on 2225 x 2225 (4,950,625) cells. Ittakes a further 9.64 seconds to define all the building

parcels. It takes 0.19 seconds to split the parcels in 540 x540 (291,600) of these cells into two building plots. Due tomemory constraints, we do not create minor streets and

building parcels in the entire 100km $\times$ 100km city.However, as the user moves through the scene, these can be

created on-demand. An overview of the city is shown inFigure 10 and a close-up view of the city is shown in Figure

11.

Figure 10: Overview of the city

Figure 11: Close-up view of the city center, showing a

freeway, freeway overpasses, and office buildings built onplots of land.

10  Future Work

The next step is to build more detailed models ofbuildings, streets and other landscape details. For example,

graphics models are needed for divided freeways, lanes,ramps, and streets need to be modeled as well, with street

lamps, lanes, traffic signals. More varied building modelsand textures can be created. Currently, buildings are grown

straight up in their plots. We can next create circularbuildings, sloping buildings and other variations to makethe city look more interesting. Models are also needed for

suburban houses, shopping malls, schools and otherbuildings. Parks, open spaces and gardens also need to be

modeled.

For the more basic creation of street networks and cityland-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 thecontours of the terrain. Also, we can have more interesting

street patterns that are not restricted to the axis-aligned anddiagonal directions.

11  Conclusions

We have presented methods to quickly create streets

and building plots for a realistic procedurally-generatedvirtual city.

We first use the Autopolis process to site commercialcenters, industrial centers, ports and airports according to

city-planning heuristics. Then, a network of freeways isautomatically generated to connect these centers.

Commercial and industrial regions are grown from theirrespective centers, and residential centers are also grown

around them. Then, within the commercial area,government and historical areas are allocated. This processcreates a realistic layout of the city, according to city-

planning principles. For example, airports tend to be on flatland, industrial areas tend to be near airports and seaports.

Historical centers tend to be near the government civiccenters. Commercial centers with a high concentration of

skyscrapers are usually not far away. Urban areas also tendto 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 typesof 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 thatminimizes cost. There is cost for going over water and cost

for going to a cell of different height. Cells are then dividedinto fine grid cells and cells next to the freeways arereserved to take into account the width of the freeways so

that no buildings and streets will be created over thefreeways. Major streets are allowed to go across and access

8/12/2019 Algorithm for the Automatic Generation of Urban Streets

http://slidepdf.com/reader/full/algorithm-for-the-automatic-generation-of-urban-streets 7/7

 

the freeways. The allocation of space for the freeways is thefirst major contribution of this paper.

Next, a network of main (major) streets is created.This is done by setting a regular, irregular, or hybrid grid of

points on all built-up urban cells. Simple path-finding isused to connect each grid point with adjacent points. In this

way, main streets are created. The frequency of these streetscan be increased near urban centers to simulate increase in

density.

The second major contribution of this paper is the

algorithm for the fast creation of grid minor streets. Theuser sets the frequency of the minor streets in the major and

minor directions. The algorithm creates a grid of minorstreets in a region bounded by major streets. Each fine grid

cell has eight possible streets to the eight adjacent fine gridcells. A flag is set for each street going to an adjacent cell.

The grid can be in the axis-aligned direction or thediagonal direction.

The third major contribution of this paper is thealgorithm for creating curvy suburban minor streets. For

each suburban region bounded by major streets, seed pointsare repeatedly chosen at random. From the seed point, a

curvy minor street is repeatedly grown to a randomneighboring cell. A neighboring cell is only a candidate if itis not currently a street and it is not currently next to an

existing street. In this way, a network of curvy streets isgrown to cover the entire region.

Finally, we have described a fast algorithm to allocate

building parcels. This is done by dividing each cell into

four triangles. The streets first reserve the triangles thatthey intersect. All unreserved triangles belong to buildings.

A set of contiguous unreserved triangles makes up abuilding parcel. The boundary of the building parcel is

found. Each building parcel can be further subdivided intomultiple building plots. Then, a building can be built on

each plot.

We have thus presented methods to quickly create

different types of urban street patterns: freeways, mainstreets, grid minor streets, and curvy suburban minor

streets. In this way, a realistic pattern of streets can beprocedurally created very quickly. Next, we have also

allocated parcels for buildings. Combined with theAutopolis city-creation process, we can build a large layout

model (100km x 100km) of a realistic city within a minute.Graphics models of buildings, streets, trees, bridges, andother landscape features can then be built according to this

layout, and a full virtual city environment is created, readyto be interactively navigated and explored.

12  References

[1]  P. DiLorenzo, V. Zordan, and D. Tran. “Interactiveanimation of cities over time.” In Proceedings of the 17th 

International Conference on Computer Animation andSocial Agents (CASA 2004), 2004.

[2]  S. Greuter, J. Parker, N. Stewart, and G. Leach.

“Real-time procedural generation of ‘pseudo-infinite’cities.” In Proceedings of the 1st  International Conferenceon Computer Graphics and Interactive Techniques in

Australasia and Southeast Asia, pages 87-95, 2003.

[3]  T. Lechner, B. Watson, U. Wilensky, and M. Felsen.“Procedural city modeling.” In Proceedings of the 1st 

Midwestern Graphics Conference, 2003.

[4]  P. Muller, P. Wonka, S. Haegler, A. Ulmer, and L.V.

Gool. “Procedural modeling of buildings.” In Proceedingsof ACM Siggraph 2006/ACM Transactions on Graphics

(TOG), 25(3):614-623, 2006.

[5]  Y. Parish and P. Muller. “Procedural modeling ofcities.” In Proceedings of ACM SIGGRAPH 2001, pages301-308, 2001.

[6]  P. Wonka, M. Wimmer, F. Sillion, and W. Ribarsky.

“Instant Architecture.” ACM Transactions on Graphics,22(3):669-677, July 2003.

[7]  W. Ribarsky, T. Wasilweski, and N. Faust. “Fromurban terrain models to visible cities.” IEE Computer

Graphics and Applications, 22(4):231-238, July 2002.

[8]  J. Sun, X. Yu, G. Baciu, and M. Green. “Template-based generation of road networks for virtual city

modeling.” In Proceedings of the ACM Symposium onVirtual Reality Software and Technology (VRST 2002),

pages 33-40, 2003.

[9]  S. Teoh, “Autopolis: Allowing user influence in the

automatic creation of realistic cities.” In Proceedings of the3rd  International Symposium on Visual Computing (ISVC

’07), pages 118-129, 2007.

[10]  G. Thomas and S. Donikian. “Modeling virtual cities

dedicated to behavioral animation.” Computer GraphicsForum, 19(3):71-80, 2000.