摘要
数字孪生城市场景中,传统的绘制方法难以生成大量静态、动态的绘制对象(如路灯、移动车辆等)。通常做法是在每条样条线上生成多个独立的场景对象,这样就会造成整个场景中的每个对象都使用不同的网格体,随着绘制对象规模的不断增加,绘制调用(DC)会越来越高。本文提出了全局实例化的方法管理所有大规模场景对象的绘制,降低DC数量(n_(DC)),提高绘制性能。首先,全局实例化整个场景中所布设样条线上相同的绘制对象,即场景中相同的绘制对象共享同一个网格体;其次,在每条样条线上以一定规则分配全局实例化对象的实例;最后,根据唯一标识符对更新样条线上的动态实例,可实现车辆的移动。针对传统方法、局部实例化方法、层级实例化方法和全局实例化方法分别根据车辆长度和样条线长度随机在29条样条线上生成605辆移动车辆,整体性能提升了28.4%;针对静态对象的绘制实验中将1976个路灯实例化前后n_(DC)进行了对比,发现实例化减少96%的n_(DC)。实验表明,采用全局实例化方法能够大幅减少n_(DC),并且在实际数字孪生城市场景中能够提升18%~43%的整体绘制性能。因此,本文通过全局实例化的绘制方法能够提升平均30%的绘制性能,可更好地满足数字孪生城市场景的应用要求。
Traditional rendering methods are not competent for rendering a large number of static and dynamic large-scale scene objects of digital twin cities such as streetlights and moving vehicles.The reason lies in that generating multiple independent scene objects on each spline causes objects of the entire scene use different meshes,resulting in a higher number of draw calls(DCs)and performance degradation.In this paper,a method based on global instance management for rendering all large-scale scene objects was proposed,which reduces the number of DCs(n_(DC))and improves rendering performance.First,all the same rendering objects on each spline laid out in the entire scene were globally instanced,indicating that the same rendering objects in the scene shared a same mesh.Then,the dynamic instances on each spline were updated based on the unique identifier pair,allowing for the movement of vehicles.For the traditional methods,including the localized instance method,hierarchical instance method,and the proposed global instance method,605 moving vehicles were randomly generated on 29 splines according to vehicle length and spline length,respectively,and the overall performance of the proposed global instance method was improved by 28.4%on average.Meanwhile,in the rendering experiment of static objects,n_(DC)before and after the instantiation of 1976 streetlights was compared,and n_(DC)was reduced by more than 96%.Experiments showed that the global instance method greatly reduces n_(DC)and improves the overall rendering performance by 18%~43%in the actual digital twin city scene.Therefore,compared with the traditional methods,the rendering performance of the proposed global instance rendering method can improved by about 30%,which can better meet the application requirements of the digital twin cities.
作者
郭德全
罗德宁
杨强
谭敏尧
杨莉
GUO Dequan;LUO Dening;YANG Qiang;TAN Minyao;YANG Li(School of Automation,Chengdu Univ.of Info.Technol.,Chengdu 610255,China)
出处
《工程科学与技术》
EI
CAS
CSCD
北大核心
2023年第6期31-38,共8页
Advanced Engineering Sciences
基金
四川省科技项目(2023YFN0009,2022YFN0020,2023YFG0122)
成都市科技项目(2022–YF05–01134–SN)
成都信息工程大学基金项目(KYTZ202141)。