摘要
针对飞行仿真中大地形数据量大、细节丰富导致的渲染负载重、帧率不稳定问题,提出一种基于细分着色的地形建模方法。该方法以几何裁剪图为框架构建视点相关的多分辨率地形结构。首先,在CPU中生成若干个细分控制点并存入顶点缓存。每层几何裁剪图根据顶点缓存中的细分控制点在索引缓存中生成能够表示几何裁剪图结构框架和状态的索引点,经CPU传至GPU。其次,在GPU读取索引点后通过细分着色器生成自适应三角形面片。在渲染循环的更新阶段,仅需对几何裁剪图的变化区域进行索引点替换,可完成几何裁剪图的状态切换。最后,按照自内向外的顺序,依次对每层(最内层除外)几何裁剪图的内侧边(与下一层的共享边)进行增加细分着色控制点的操作,从而增加内侧边三角形面片,使其与内层几何裁剪图相对应,消除几何裁剪图相邻层次间因分辨率不同引起的"裂缝"现象。实验证明,该方法能充分利用显卡硬件的最新特性,在实时渲染中减少CPU向GPU传输的顶点数量,使渲染负载相对平衡,提升渲染效率和地形实时漫游的帧率稳定性,并提供一种简单有效的"裂缝"消除方法,在保证大地形细节真实程度的同时,满足飞行仿真中对大地形绘制实时性与稳定性的要求。
In order to solve problems of heavy rendering loads and unstable frame rates caused by huge data and rich details of large terrain in flight simulation,a terrain modeling method based on Tessellation was proposed.The key idea of the method is to build a view-dependent multiresolution LOD structure of terrain based on geometry clipmaps.Firstly,several Tessellation control points,which are able to express structures and all states of geometry clipmaps by index groups,were generated in CPU and stored in vertex cache.Then,index points were generated in index cache by each level of geometry clipmaps according to Tessellation control points in vertex cache and transferred from CPU to GPU.Secondly,adaptive triangle patches were generated by GPU tessellation shader according to index points in GPU.In update phase of rendering cycle,states switching of geometry clipmaps was did by simply replacing index points in changing regions.Finally,'cracks'caused by different resolutions between adjacent levels were eliminated by modifying outer tessellation level factor of shared edges between levels,which can generate triangle patches from inside to outside at shared edges of outer level corresponding to the inner level.The experimental results showed the proposed method can make full use of new features of the latest graphics cards.It is able to decrease data transmission from CPU to GPU while achieves the balance of rendering loads,and improves the rendering efficiency and real-time frame rate stability during terrain navigation.The proposed method of crack eliminating is simple and effective,which ensures the real degree of details of large terrain and meets the requirements of stable real-time terrain rendering in flight simulation.
作者
宋歌
潘卫军
季玉龙
SONG Ge;PAN Weijun;JI Yulong(College of Air Traffic Management,Civil Aviation Flight Univ.of China,Guanghan 618300,China;School of Aeronautics & Astronautics,Sichuan Univ.,Chengdu 610065,China)
出处
《工程科学与技术》
EI
CAS
CSCD
北大核心
2019年第1期197-204,共8页
Advanced Engineering Sciences
基金
国家自然科学基金委员会民航联合研究基金资助项目(U1733203)