发布时间: 2018-07-16 摘要点击次数: 全文下载次数: DOI: 10.11834/jig.170501 2018 | Volume 23 | Number 7 计算机图形学

1. 信息工程大学, 郑州 450001;
2. 61175部队, 武汉 430074
 收稿日期: 2017-08-31; 修回日期: 2017-12-15 基金项目: 国家自然科学基金项目（41701463）；河南省科技攻关计划基金项目（172102210020） 第一作者简介: 周杨, 1974年生, 男, 教授, 2009年于信息工程大学获摄影测量与遥感专业博士学位, 主要研究方向为虚拟现实、网络空间测绘等。E-mail:zhouyang3d@163.com;胡校飞, 男, 硕士, 研究方向为人工智能、3维仿真。E-mail:huxiaofeicn@163.com;靳彩娇, 女, 助理工程师, 研究方向为数字摄影测量。E-mail:1045496204@qq.com;张龙, 男, 硕士, 研究方向为网络空间测绘。E-mail:jagger_3d@126.com;陈安东, 男, 硕士, 研究方向为机器视觉目标检测。E-mail:594904811@qq.com. 中图法分类号: TP391.41 文献标识码: A 文章编号: 1006-8961(2018)07-1072-09

# 关键词

Graphic-image mixed method for large-scale building rendering
Zhou Yang1, Hu Xiaofei1, Jin Caijiao2, Zhang Long1, Chen Andong1
1. Institude of Surveying and Mapping, Information Engineering University, Zhengzhou 450001, China;
2. 61175 Troops, Wuhan 430074, China
Supported by: National Natural Science Foundation of China (41701463)

# Abstract

Objective Constructing a smart city is an effective approach to achieve sustainable development and enhance the comprehensive competitiveness of cities. A 3D city visualization system is an important part of smart city applications. The structure of a 3D city building model is complex and the data are exceedingly huge. One of the bottlenecks that restrict the dissemination of digital 3D city applications is lack of an efficient and mature visualization system. Level of detail (LOD) and out-of-core algorithms are the key points in many existing large-scale building scene rendering techniques. The algorithms can improve the rendering efficiency by reducing the amount of data drawn in each frame. When the scene is sufficiently large, even the complex optimization algorithm cannot achieve improved results. Thus, rendering of 3D city buildings is extremely slow. Method A novel idea was developed based on the traditional study. We present a graphic-and image-mixed method for large-scale building scene rendering. First, the view frustum is split into three regions along the z axis, as follows:interesting region, less interesting region, and uninteresting region from near to far. We adopt the different rending methods in each region. The building models are drawn in the interesting region on the screen by the traditional graphics method. In the less interesting and uninteresting regions, the image-based rendering and off-screen rendering technology is used by applying the frame buffer object and render-to-texture technology and then drawing the building models on a texture image, where the render buffer is attached. At the end of each frame, the texture image is blended with the screen in consideration of the depth information to obtain the final rendering result. We design a 3D building tile model to improve the efficiency of data load and rendering. The city extent is split with grids. The buildings in the same grid cell compose a tile, and R-Tree index is used to search these tiles. The geo database 3Dcitydb is used in data processing. Result The algorithm is tested on a huge public CityGML model data in urban areas of New York, which includes 188195 building models at LOD0 and LOD1 levels. Several groups of experiments are conducted to compute the scene drawing frame rate. The amount of building model data varies in each experiment. The frame rate is better than 20 frame/s in each scene drawing experiment. We also compared the visualization result with Cesium platform. The LOD algorithm used in Cesium extracts only some distant buildings to improve the rendering efficiency. Some models are lost in the scene. However, this technology can draw the entire scene without any loss. The experimental result is acceptable and shows that the system is operating smoothly. Conclusion The graphic-image mixed scene rendering method maintained the continuity of scene roaming, and at the same time, has the advantage of image-based rendering technology, where the rendering frame rate is independent of the scene scale. The experimental results demonstrate that the algorithm can improve the data-bearing capacity of the visualization system, especially the large-scale low-resolution building scene. It can roam the huge building data smoothly under conditions of relatively low hardware performance and finally render the scene without vision loss.

# Key words

city 3D; graphics and image mixed; large-scale scene; huge data; ubran building

# 2.1 海量建筑数据模型

CityGML是一种用于虚拟3维城市模型存储和交换的标准数据格式，很多学者都采用该格式数据作为研究的实验数据[10-11, 15]。但是CityGML的设计初衷是用来表示和存储3维城市模型数据的，难以直接用于有效率的绘制，因此需要对数据进行处理。R树为海量城市3维建筑模型应用最广泛的空间索引结构之一，但是直接利用R树构建整个城市的建筑索引，生成的R-Tree层次过深，并且在渲染时需要生成过多的绘制指令，造成图形显卡的效率损失。Cesium是一款优秀的基于网络的开源全球可视化仿真平台，Cesium团队提出了一种3D Tiles Streaming方法[16-17]实现了全球地形、影像、建筑、点云和矢量数据等海量多源数据的集成。本文借鉴3D Tiles方法构建3D Building Tile，首先在2维平面上将城市空间划分为合适大小的格网，剔除空的网格，落入同一个网格中的建筑构成一个Tile。将每个Tile中的建筑物合并为一个几何体，这样每个Tile在渲染时只用调用一次绘制函数。为了便于视椎体剔除计算，对生成的Tile集合构建基于BVH的3维R树索引。R树索引的相关算法已经比较成熟，这里不再详细介绍。

# 3 实验结果与分析

Table 1 FPS statistics

 方法 建筑数量 10 000 20 000 40 000 100 000 传统 23 12 7 — 本文 21 20 22 20

Cesium3维平台提供了实验数据的公开访问服务，将本文方法与Cesium平台进行对比实验，选取两个相同视点对比绘制结果。如图 7所示，其中图 7(a)为本文方法绘制效果，图 7(b)为Cesium目前的实现效果。从图 7中可以看出，Cesium采用LOD算法，剔除掉了视点距离相对较远的部分模型，造成了视觉上的缺失。本文方法虽然需要一些绘制时间，但是最终实现了视觉无损失的场景完整渲染。

# 参考文献

• [1] Li S J, Yang H J, Huang Y H, et al. Geo-spatial big data storage based on NoSQL database[J]. Geomatics and Information Science of Wuhan University, 2017, 42(2): 163-169. [杨海军, 黄耀欢, 等. 基于NoSQL数据库的空间大数据分布式存储策略[J]. 武汉大学学报·信息科学版, 2017, 42(2): 163-169. [DOI:10.13203/j.whugis20140774]]
• [2] Jung M G, Youn S A, Bae J, et al. A study on data input and output performance comparison of MongoDB and PostgreSQL in the big data environment[C]//Proceedings of the 8th International Conference on Database Theory and Application. Jeju, South Korea: IEEE, 2015: 14-17. [DOI:10.1109/DTA.2015.14]
• [3] He Z W, Kraak M J, Huisman O, et al. Parallel indexing technique for spatio-temporal data[J]. ISPRS Journal of Photogrammetry and Remote Sensing, 2013, 78: 116–128. [DOI:10.1016/j.isprsjprs.2013.01.014]
• [4] Gong J, Zhu Q, Zhang H W, et al. An adaptive control method of LODs for 3D scene based on R-tree index[J]. Acta Geodaetica et Cartographica Sinica, 2011, 40(4): 531-534. [朱庆, 章汉武, 等. 基于R树索引的三维场景细节层次自适应控制方法[J]. 测绘学报, 2011, 40(4): 531-534.]
• [5] Leite F, Akcamete A, Akinci B, et al. Analysis of modeling effort and impact of different levels of detail in building information models[J]. Automation in Construction, 2011, 20(5): 601–609. [DOI:10.1016/j.autcon.2010.11.027]
• [6] Li X, Wan W G, Zhu M Y, et al. A fast real-time rendering method of 3D terrain using out-of-core visualization[C]//Proceedings of IET International Conference on Smart and Sustainable City. Shanghai, China: IEEE, 2011: 1-5. [DOI:10.1049/cp.2011.0297]
• [7] Peng C, Cao Y. A GPU-based approach for massive model rendering with frame-to-frame coherence[J]. Computer Graphics Forum, 2012, 31(2): 393–402. [DOI:10.1111/j.1467-8659.2012.03018.x]
• [8] HuaJ, Xing T Y, Rui X P, et al. LOD methods of large-scale urban building models by GPU accelerating[C]//Proceedings of the 2nd International Conference on Computer Science and Network Technology. Changchun, China: IEEE, 2012: 853-858. [DOI:10.1109/ICCSNT.2012.6526063]
• [9] Zhou S C, Yoo I, Benes B, et al. A hybrid level-of-detail representation for large-scale urban scenes rendering[J]. Computer Animation & Virtual Worlds, 2014, 25(3-4): 243–253. [DOI:10.1002/cav.1582]
• [10] Prandi F, Devigili F, Soave M, et al. 3D web visualization of huge CityGML models[J]. The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, 2015: XL-3/W3:601-605. [DOI:10.5194/isprsarchives-XL-3-W3-601-2015]
• [11] Pispidikis I, Dimopoulou E. Development of a 3d webgis system for retrieving and visualizing citygml data based on their geometric and semantic characteristics by using free and open source technology[J]. ISPRS Annals of the Photogrammetry, Remote Sensing and Spatial Information Sciences, 2016: Ⅳ-2/W1:47-53. [DOI:10.5194/isprs-annals-Ⅳ-2-W1-47-2016]
• [12] Li L Y, Shen H W. Image-based streamline generation and rendering[J]. IEEE Transactions on Visualization and Computer Graphics, 2017, 13(3): 630–640. [DOI:10.1109/TVCG.2007.8093671]
• [13] Kang S B, Li Y, Tong X, et al. Image-based rendering[J]. Foundations and Trends® in Computer Graphics and Vision, 2006, 2(3): 173–258. [DOI:10.1561/0600000012]
• [14] Chan S C. Image-based rendering[J]. Computer Vision, 2014, 23(3): 392–399. [DOI:10.1007/978-0-387-31439-6_4]
• [15] Baig S U, Rahman A A. Generalization and visualization of 3D building models in CityGML[M]//Pouliot J, Daniel S, Hubert F, et al. Progress and New Trends in 3D Geoinformation Sciences. Berlin, Heidelberg: Springer, 2013: 63-77. [DOI10. 1007/978-3-642-29793-9_4]
• [16] Cozzi P. Introducing 3D tiles[EB/OL]. (2015-08-10). https://cesium.com/blog/2015/08/10/introducing-3d-tiles/.
• [17] Schilling A, Bolling J, Nagel C. Using glTF for streaming CityGML 3D city models[C]//Proceedings of the 21st International Conference on Web3D Technology. Anaheim, California: ACM, 2016: 109-116. [DOI:10.1145/2945292.2945312]
• [18] Zhang F, Sun H Q, Xu L L, et al. Parallel-split shadow maps for large-scale virtual environments[C]//Proceedings of ACM International Conference on Virtual Reality Continuum and ITS Applications. Hong Kong, China: ACM, 2006: 311-318. [DOI:10.1145/1128923.1128975]