# Procedural Approach for 3D Modeling of City Buildings

Wenhua Zhu, Dexian Wang, Benoit Eynard, Matthieu Bricogne, Sébastien Remy

► To cite this version:

Wenhua Zhu, Dexian Wang, Benoit Eynard, Matthieu Bricogne, Sébastien Remy. Procedural Approach for 3D Modeling of City Buildings. 12th IFIP International Conference on Product Lifecycle Management (PLM), Oct 2015, Doha, Qatar. pp.137-148, 10.1007/978-3-319-33111-9_13. hal-01377437

HAL Id: hal-01377437

https://inria.hal.science/hal-01377437

Submitted on 7 Oct 2016

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>
Procedural Approach for 3D Modeling of City
Buildings

Wenhua Zhu<sup>1,2</sup>, Dexian Wang<sup>2</sup>, Benoit Eynard<sup>1</sup>, Matthieu Bricogne<sup>1</sup>, Sebastien Remy<sup>3</sup>

¹Sorbonne Universités, Université de Technologie de Compiègne, Department of
Mechanical Systems Engineering, CNRS UMR 7337 Roberval, France
{wenhua.zhu, benoit.eynard, matthieu.bricogne}@utc.fr

²Shanghai University, Institute of Smart City (sino-France), China,
{toney_wh_zhu, kangjiayiren}@shu.edu.cn

³Université de Technologie de Troyes, CNRS UMR 6281 Charles Delaunay,
France. sebastien.remy@utt.fr

**Abstract.** 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.

**Keywords:** Procedural Modeling, CGA, Facade Modeling, CityEngine, ArcGIS

# 1 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.

1.1 Related Work

The traditional modeling methods based on the CAD technology, such as AutoCAD, 3DS Max, Sketchup, [Xu H et al. 2009; 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. 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.
## 1.2 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.

<figure><img src="image_2.png" /><figcaption>Fig. 1. Flow chart of construction 3D virtual campus</figcaption></figure>

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.

# 2 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.

## 2.1 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.

<figure><img src="image_3.png" /><figcaption>Fig. 2. The satellite image of Shanghai University in Google Earth</figcaption></figure>

<table><caption>**Table 1.** The coordinates of four key points showed in Universal Transverse Mercator.</caption><thead><tr><th>Name</th><th>A</th><th>B</th><th>C</th><th>D</th></tr></thead><tbody><tr><td>Zone</td><td>51 R</td><td>51 R</td><td>51 R</td><td>51 R</td></tr><tr><td>Easting</td><td>346064.11 m</td><td>347058.08 m</td><td>347111.88 m</td><td>346127.99 m</td></tr><tr><td>Northing</td><td>3466319.63 m</td><td>3466524.51 m</td><td>3465459.98 m</td><td>3465408.36 m</td></tr></tbody></table>

## 2.2 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.
$$H = L \times \tan \alpha. \qquad (1)$$

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.

## 2.3 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.

<figure><img src="image_4.png" /><figcaption>Fig. 3. Texture pictures of building in campus of Shanghai University.</figcaption></figure>
<figure><img src="image_5.png" /><figcaption>Fig. 4. Facade image of building in campus of Shanghai University.</figcaption></figure>

# 3 Procedural Modeling of Building

## 3.1 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.
<figure><img src="image_6.png" /><figcaption>Fig. 5. Geographic base map generates in ArcMap.</figcaption></figure>

## 3.2 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 city but 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.

```
Lot --> extrude (Height) Building
Building --> comp (f) {front: FrontFacade | back :
BackFacade | side: SideFacade | top: Roof}
BackFacade --> split (y) {groundfloor_height :
Groundfloor | {~floor_height: Floor}*}
FrontFacade --> split (y) {groundfloor_height: Floor |
{~floor_height: Floor}*}
SideFacade --> split (y) {groundfloor_height: Floor |
```
```pascal
{~floor_height : Floor}*
Roof --> setupProjection (0,scope.xy,'1,'1)
        projectUV (0)
        texture ("roofs/flatroof4_day.jpg")
...
        texture ("walls/stone/wall_stone_2.jpg")
SolidWall --> color (wallColor)
            s ('1,'1,0.4)
            t (0,0,-0.4)
            i ("builtin:cube:notex")
            setupProjection (0,scope.xy,'1,'1)
            projectUV (0)
            texture ("walls/stone/wall_stone_2.jpg")
```

<figure><img src="image_7.png" /><figcaption>Fig. 6. 3D model of building created in CityEngine based on CGA rules.</figcaption></figure>

## 3.3 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).
<figure><img src="image_8.png" /><figcaption>**Fig. 7.** Horizontal and vertical splits separate the face with CityEngine.</figcaption></figure>

The final facade rule generated on its original mass model face is then reused to generate the simple mass model buildings (Fig. 8).

<figure><img src="image_9.png" /><figcaption>**Fig. 8.** 3D model of building created by using facade wizard in CityEngine</figcaption></figure>

## 3.4 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.
<figure><img src="image_10.png" /><figcaption>Fig. 9. Buildings of Shanghai University created in CityEngine.</figcaption></figure>

# 4 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.

# 5 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.

# Acknowledgments

The authors gratefully acknowledge the project support from Sino-French Joint Complex City Laboratory, the authors also thank Professor Benoit Eynard for the constructive comments on the research project.

The authors gratefully acknowledge the support of colleagues in Université de Technologie de Compiègne and Shanghai University.

# References

1. STINY, G. Spatial relations and grammars. Environment and Planning B 9, 313--314 (1982).

2. WONKA, P., WIMMER, M., SILLION, F., AND RIBARSKY, W. Instant architecture. ACM Transactions on Graphics 22, 3, 669--677 (2003).

3. Xu H, Badawi R, Fan X, et al. Research for 3D visualization of Digital City based on SketchUp and ArcGIS. International Symposium on Spatial Analysis, Spatial-temporal Data Modeling, and Data Mining. International Society for Optics and Photonics, 74920Z-74920Z-6 (2009).

4. Lorenz W.E. Estimating the Fractal Dimension of Architecture: Using two Measurement Methods implemented in AutoCAD by VBA. Proceedings of the 30th eCAADE Conference, 9:505--513 (2012).

5. Jinli Chen. Research on modeling approach for city building based on 3DS Max. Geomatics Technology and Equipment. 01:7--9 (2012).
6. Lindenmayer A. Mathematical models for cellular interactions in development I. Filaments with one-sided inputs. Journal of theoretical biology, 18(3): 280--299 (1968).

7. ParishY I H, Müller P. Procedural modeling of cities. Proceedings of the 28th annual conference on Computer graphics and interactive techniques. ACM, 301--308 (2001).

8. Aliaga D.G, Vanegas C.A, Beneš B. Interactive example-based urban layout synthesis. ACM Transactions on Graphics (TOG). ACM, 27 (5): 160--169 (2008).

9. Chen G, Esch G, Wonka P, Muller P. Interactive procedural street modeling. ACM Transactions on Graphics (TOG), 27 (3):103--112 (2008).

10. Weber B, Müller P, Wonka P, GROSS. Interactive geometric simulation of 4d cities. Computer Graphics Forum. Blackwell Publishing Ltd, 28 (2): 481--492 (2009).

11. Su P, Xiong L. Procedural Modeling Technology in Urban Design. Advanced Materials Research, 482, 2481--2484 (2012).

12. Beneš J, Wilkie A, Křivánek J. Procedural Modelling of Urban Road Networks. Computer Graphics Forum. 33(6), 132--142 (2014).

13. Peter Wonka, Michael Wimmer, François Sillion, and William Ribarsky. Instant architecture. ACM Trans. Graph.22 (3) 669--677 (2003).

14. Marvie J E, Perret J, Bouatouch K. The FL-system: a functional L-system for procedural geometric modeling. The Visual Computer, 21(5), 329--339 (2005).

15. Pascal Müller, Peter Wonka, Simon Haegler, Andreas Ulmer, Luc Van Gool. Procedural modeling of buildings. ACM Trans. Graph. 25(3), 614--623 (2006).

16. Pascal Müller, Gang Zeng, Peter Wonka, Luc Van Gool. Image-based procedural modeling of facades. ACM Trans. Graph.26, 3, Article 85.

17. Watson B, Müller P, Veryovka O, Fuller A, Wonka P, Sexton C. Procedural Urban Modeling in Practice. IEEE Computer Graphics and Applications, 28(3), 18--26 (2008).

18. Su P, Xiong L. Procedural Modeling Technology in Urban Design. Advanced Materials Research, 482: 2481--2484 (2012).

19. Xie Nian, Xiang Yu, Xu Tingwei. Research on Rapid 3D Modeling Technology Based on Rules. Urban Geotechnical Investigation & Surveying, 04, 5--8 (2013).

20. Remy S., Ducellier G., Charles S., Eynard B., Advanced STEP Parameterized and Constrained Features for Reverse Engineering, International Journal of Computer Applications in Technology, 32, 1--11 (2008).