计算机应用 ›› 2015, Vol. 35 ›› Issue (6): 1716-1719.DOI: 10.11772/j.issn.1001-9081.2015.06.1716

• 虚拟现实与数字媒体 • 上一篇    下一篇

基于硬件细分的层次细节地形渲染算法

王文博, 殷宏, 解文彬, 王家腾   

  1. 解放军理工大学 指挥信息系统学院, 南京 210007
  • 收稿日期:2014-12-22 修回日期:2015-04-01 发布日期:2015-06-12
  • 通讯作者: 王文博(1992-),男,河南驻马店人,硕士研究生,主要研究方向:虚拟现实;13057530882@163.com
  • 作者简介:殷宏(1968-),男,安徽黄山人,教授,博士,主要研究方向:虚拟现实、三维可视化;解文彬(1980-),男,江苏镇江人,讲师,博士,主要研究方向:军事仿真;王家腾(1991-),男,河北沧州人,硕士研究生,主要研究方向:虚拟现实。
  • 基金资助:

    国家自然科学基金资助项目(70971137);国家科技部"十二五"支撑项目(2001BAK07B04)。

Terrain rendering for level of detail based on hardware tessellation

WANG Wenbo, YIN Hong, XIE Wenbin, WANG Jiateng   

  1. Institute of Command Information and System, PLA University of Science and Technology, Nanjing Jiangsu 210007, China
  • Received:2014-12-22 Revised:2015-04-01 Published:2015-06-12

摘要:

针对顶点着色器细分地形网格需要额外生成模板、计算细分层次复杂的不足,提出了一种利用细分着色器进行地形网格细分的层次细节(LOD)地形渲染算法。利用分块四叉树组织建立地形粗糙网格的分层结构,以LOD判别函数对活动地形块进行筛选;提出了在细分控制着色器中基于视点三维连续距离的细分因子计算方法,并针对外部细分因子进行处理消除了裂缝;实现在细分计算着色器上的置换贴图,对精细网格的高度分量进行位移。而且将四叉树结构存储至顶点缓冲区,减少中央处理器(CPU)与图形处理器(GPU)的资源交换;引入细分队列加速细分过程。实验证明,该算法具有平滑的细节层次过渡和良好的细分效果,能够有效提高GPU利用率和地形渲染效率。

关键词: 细分着色器, 分块四叉树, 置换贴图, 细分队列, 图形处理器

Abstract:

The vertex shader needs an extra generating pattern and the calculation of subdivision level is complicated when subdividing terrain grid. A Level of Detail (LOD) terrain rendering algorithm using subdivision shader was put forward for the insufficiency. The proposed method used block quad tree organization to build a rough terrain grid hierarchical structure, and filtrated the activity terrain blocks by LOD discrimination function. A subdivision factor calculation method was proposed based on viewpoint in a three-dimensional continuous distance in tessellation control shader and cracks of the external factor segment was eliminated. As a result, displacement mapping on tessellation evaluation shader and displacement of height component in fine grid blocks were achieved. Meanwhile, the quadtree was saved to vertex buffer, and the exchange of resource between Central Processing Unit (CPU) and Graphic Processing Unit (GPU) was decreased. The subdivision process was accelerated by bringing in subdivision queue. The experimental results show that the proposed algorithm has a smooth detail level transition and good subdivision effect, and it can increase the utilization ratio of GPU and terrain rendering efficiency.

Key words: tessellation shader, block quad tree, displacement mapping, subdivision queue, Graphic Processing Unit (GPU)

中图分类号: