Procedural Approach for 3D Modeling of City Buildings

. Large-scale 3D city building models have been widely used in urban planning, intelligent transportation, military simulation and other fields. The traditional ways of modeling generally have common problems such as low efficiency, waste of manpower and time consumption. How to find a rapid approach to automatically complete large-scale 3D modeling is a very hot research topic. In this paper we propose a novel approach of procedural modeling of buildings with CityEngine, which is combined with ArcGIS technology for the geographic information. This approach produces extensive architectural 3D models with high visual quality and geometric details at low cost. It includes following two contents concretely. At first, directly writing computer generated architecture (CGA) shape grammar to complete procedural modeling of building and other objects. Secondly, using facade modeling based on two-dimensional images to generate architectural model as well as creating high geometry details. It is validated that this novel approach of procedural modeling is a significant step forward that reduces a lot of modeling times by CGA shape grammars.


Introduction
The creation of building models is a crucial task in the development of successful three-dimensional (3D) virtual city.However, a large amount of blurry models in city construction have been done with few details, the viewing experiences are often particularly disappointing and the costs of create process are also very expensive.Consequently, In this paper a procedural approach is proposed which is based on the parametric modeling, CGA modeling rules with high geometric detail and up to a billion polygons in CityEngine.The key innovation of our approach is the introduction of procedural modeling by CGA shape grammar [Stiny 1982;Wonka et al. 2003] and facade modeling based on images for both analysis and construction.Lastly the approach is combined with ArcGIS technology for the geographic information to make the city building models more realistic.In this paper we consider the campus buildings of Shanghai University as an example for all the discussions and illustrations.

Related Work
The traditional modeling methods based on the CAD technology, such as AutoCAD, 3DS Max, Sketchup, [Xu H et al. 2009 1968].After that, more and more scholars get involved in it.As a result, procedural modeling methods have been developed from L system.Extension division syntax [Muller et al. 2006], with a new shape grammar syntax CGA can produce high quality architectural model of the geometric details, interact and shape the rules, and perform continuous block modeling for the volume of arbitrary orientation shape.Muller et al. [2007] proposes a 3D model algorithm with high visual quality, derived from any resolution facade image of the building.The algorithm will shape grammar type modeling process and the process of building facade combination of image analysis to derive a sense of layered facade segmentation.Watson et al. [2008] make a comprehensive review and pointed out that the CityEngine software is a procedural modeling tool.And setting up random parameters can produce all kinds of stochastic model, which generated a massive model of the city.Whiting et al. [2009] put forward a procedural modeling method of stable masonry building, which plays an important role in the analysis of the historical architecture.Vanegas et al. [2010] proposed a passive computer vision method with existing maps and aerial data, which can automatically generate3D building model.By using multiple aerial images, the method can generate single coherent whole building geometric model.Jerry et al.
[2011] put forward a procedural modeling algorithm based on syntax, which by optimizing the possible space to generate the corresponding construction.The algorithm has been used to generate the procedural models, such as trees, buildings, etc. Su et al. [2012] studied the technologies of procedural modeling of city, interactive procedural modeling of streets, large-scale urban environment based on bottom of buildings in procedural modeling method, which provides a new direction for procedural modeling in city design.Xie Nian et al. [2013] introduce 3D modeling method based on rules in CityEngine platform.The method takes advantage of GIS data and rules to automatically and rapidly generate models, improving the efficiency of modeling.S. Lienhard et al. [2014] proposed a thumbnail system that can automatically generate, gather, arrange and select a series of representative from rule set.The system allows the same set of rules to derive different models for comparing, so as to find the best view of the procedural models.

Overview
For the construction of building models, we first need to prepare high-resolution satellite image data of building, height information data, textures mapping data, and facade images data and so on.Then, we should import the high-resolution satellite image data of building to ArcGIS for the geographic information.Finally, we use CityEngine software to establish three-dimensional model of the building.The specific processes are shown on Fig. 1. as follow.

Fig. 1. Flow chart of construction 3D virtual campus
Rest of the paper is structured as follows: In Section 2 we will discuss how to acquire high quality campus spatial data.In section 3 we will introduce procedural modeling by CGA shape grammar and facade modeling based on images.In section 4 we will discuss our contribution and disadvantages of the approach.Conclusions and future work will be given in section 5.

Acquisition of Building Spatial Data
Spatial data of building refers to the ground photographic image data: the height information of buildings, texture mapping data and facade images data.Those basic data of campus mainly comes from satellite imagery in Google Earth or images taken with a digital camera.

Ground Photographic Image Data
Google Earth provides the user a virtual earth, which integrates satellite images with aerial data.Satellite images, mainly comes from the United States Digital Globe Quick Bird commercial satellite and Earth Sat company.The aerial data results from the Blue Sky Company and Sanborn Company.Using Google Earth, we can acquire the remote sensing images containing coordinates and elevation information through plug-ins.We should firstly find out the location of Shanghai University in Google Earth, and display the map in its whole window (Fig. 2).Then we grab the view, and record the corresponding coordinates of several appropriate points.There are four key points in the image.Those coordinates showed in Universal Transverse Mercator respectively are as following in Table 1.

Height Information of Buildings
Height information of the building is very important to the modeling of 3D building models.Combined with the graphic data, using the height information of the building can support the 3D modeling.There exist many methods for specification of building height information.Using electronic total station to measure height information of buildings is relatively simple and provides high precision.Therefore, how to achieve the measurement?Measure horizontal distance and inclination angle by the use of electronic total station, and then according to the mathematical formula calculate the height of the building.
In the above mathematical formula, H is the height data of building, L is the measured horizontal distance, and α is defined to the inclination angle measured by electronic total station.

Texture Mapping Data and Facade Images Data
Texture mapping data and facade images data are acquired as pictures, these pictures are taken by the high resolution digital camera from the different direction of each building, and will be used as the texture maps of 3D modeling or the facade images for facade modeling.At the same time, the roof texture maps can also be captured in Google Earth to represent or express it successfully.
In order to get high quality pictures, it is better to take by the high resolution digital camera.The better choice will be sunny day either morning or evening, or in cloudy weather without rain.Under these weather conditions, pictures are not influenced by the light to ensure that the clarity of pictures.
For the roof texture maps, we acquire them in Google Earth.Target extraction from images has become the important means of the space information updating.It has been used extensively in the Chinese economic production and martial target detection.3 Procedural Modeling of Building

Generation of the Geographic Base Map
ArcGIS Desktop is a complete set of GIS platform product developed by Esri Company (www.esri.com).It provides the ability of powerful map production, spatial data management, spatial analysis and spatial information integration, as well as publishing and sharing.ArcGIS Desktop includes a set of application: the ArcMap and ArcCatalog, ArcGlobe and ArcScene, ArcToolbox and model builder.Through the use of these applications and interface, you can perform any GIS from simple to advanced tasks.The high resolution spatial image of Shanghai University containing coordinates and elevation information acquired in Google Earth is seen as the geographic base map of procedural modeling.First of all, we should import the image into the software of ArcMap with Spatial Reference Systems of PCS_WGS_1984_UTM_Zone_51N.Then, we can match them up after we have finished entering the spatial coordinates of the four points mentioned above.

3D Modeling Based on CGA Rules
Esri CityEngine is a new member in 3D modeling software, which can create virtual scene quickly based on 2D data.In addition, because of the fully support of ArcGIS， the basis of the existing GIS data can be used without transformation.It allows not only performing 3D modeling quickly and shorten the time for designing virtual citybut it also enables reducing the cost of investment in the system.CGA (Computer Generated Architecture) is a custom modeling rule of CityEngine platform which defines a series of rules to create the 3D models creation automatically.All models in CityEngine software are created by CGA rules.The benefits of rule-based modeling are to define the rules with the repeated optimization, in order to create more detailed data and to save as a rules file for information reuse.Especially, when there is a lot of building model creation and design, rule-based modeling can have greater advantages than the traditional modeling of labor intensive, with saving a lot of time and cost.
The program code of CGA shape grammar is introduced here after Fig. 5 presents the virtual model of building from Shanghai University campus created with CityEngine using shape grammar of CGA rules.

Facade Modeling Based on Images
The facade wizard is a handy tool which allows the user to create complex CGA facade rule templates.The great advantage is that no actual CGA code has to be written by the user, but it is automatically produced in the background by the CityEngine.Very complex structures can be generated very efficiently and easily.The beauty of the process is that new CGA rules are resulting, which can adapt to any given facade geometries.With the facade wizard, it is easy to create large pools of facade templates that can always be reused.This model can be utilized in upcoming projects.
At this point, it is possible to separate the face by using the Separate Faces tool.You can first start blocking out the main building masses into ground floor, upper floors and roof part.In this facade tile, you can continue with horizontal and vertical splits to isolate the every area (Fig. 7).The final facade rule generated on its original mass model face is then reused to generate the simple mass model buildings (Fig. 8).

Texture Mapping
The main goal of texture mapping is to apply as much as appropriate color definition to the object and the environment according to the colors they really have.Some of these color definition can be landscape's grassy texture and vegetation, roads and parking lots, as well as object walls and roofs.Texture mapping can use the pictures already in the platform of CityEngine, or use the texture image of acquisition, which only need to change the texture rules of the CGA.Of course, these images of acquisition are pre-processed.Here we present an image that result as the output from the CityEngine system as shown on Fig. 9.

Discussion
In this section we will compare our approach with the previous work, and determine the advantages and characteristics of our procedural approach.a. Combine with the geographic information General building modeling methods often only focus on the architectural outline of the buildings, which neglect the geographic data information of the real buildings, such as geographic spatial coordinate and terrain elevation information.
In this paper we proposed the procedural modeling approach that combined with Google Earth to acquire kinds of geographic data information, and processed the data information in ArcGIS.The perfect combination of Geographic data information and building models in CityEngine effectively guarantee the authenticity of building models.

b. Intelligent facade modeling based on images
For large-scale three-dimensional city building modeling, the traditional CAD modeling techniques (Maya, AutoCAD, 3DS Max) will cost too much manpower and time.The procedural modeling method in this paper, with the help of intelligent facade modeling based on images, improve modeling efficiency and model quality, and reduce the cost of modeling.

c. Useful for large-scale buildings modeling tasks
There are many 3D modeling software for buildings, such as Sketchup, 3DS MAX, AutoCAD, Maya, etc., the software have a comparative advantage for a single building, but for large-scale complex city buildings, such problems as low efficiency, insufficient data update will appear.So the procedural modeling approach is proposed in this paper.Through repeated use of CGA rules and structural parts (such as door, window and ledge), the approach can effectively implement the rapid modeling of large-scale city buildings, and can guarantee the quality of building models.Taking a 3D virtual campus as an application example to validate the approach of procedural modeling, it shows the approach can take good advantage of existing GIS data, can rapidly modeling based on CGA rule for the large-scale campus, and can facade modeling to create complex building.The characteristics of the procedural approach are high modeling efficiency, high degree of intelligence and good quality of modeling.

Conclusion and Future Work
This paper has introduced the procedural 3D modeling method applied to design of virtual city with CityEngine.It includes the modeling by CGA rules and the facade modeling to create massive city models that have significantly more geometric details.We believe that this work is a powerful adaption of shape grammar concept for computer graphics and provides related people a new thought of 3D and virtual modeling.Furthermore, our work will be combined with laser scanning for reverse 3D modeling in the future.

Fig. 3 .
Fig. 3. Texture pictures of building in campus of Shanghai University.

Fig. 4 .
Fig. 4. Facade image of building in campus of Shanghai University.

Fig. 6 .
Fig. 6. 3D model of building created in CityEngine based on CGA rules.

Fig. 8 .
Fig. 8. 3D model of building created by using facade wizard in CityEngine
; Lorenz W.E et al. 2012; Jinli Chen.2012] perform 3D models that consist of one or more polygons model so as to express building geometric feature in details.Those methods are of low efficiency, and difficult to appropriate to large-scale rapid modeling.Hungary biologist Aristid LinderMayer in 1968 proposed L-System [LinderMayer A.

Table 1 .
The coordinates of four key points showed in Universal Transverse Mercator.