计算机应用 ›› 2012, Vol. 32 ›› Issue (09): 2548-2552.DOI: 10.3724/SP.J.1087.2012.02548

• 图形图像技术 • 上一篇    下一篇

基于二叉树和GPU的无缝地形场景渲染方法

曹巍1*,段光耀2   

  1. 1.中国科学院 地理科学与资源研究所,北京 100101;
    2.首都师范大学 资源环境与旅游学院,北京 100048
  • 收稿日期:2012-04-09 修回日期:2012-05-24 发布日期:2012-09-01 出版日期:2012-09-01
  • 通讯作者: 曹巍
  • 作者简介:曹巍(1982-),男,湖北武汉人,助理研究员,博士,主要研究方向:地形渲染算法、三维地理信息系统; 段光耀(1986-),男,河南叶县人,硕士研究生,主要研究方向:地理信息系统。
  • 基金资助:

    国家自然科学基金资助项目(41001300)

Seamlessly terrain rendering method based on binary tree and GPU

CAO Wei1*,DUAN Guang-yao2   

  1. 1.Institute of Geographic Sciences and Natural Resources Research,Chinese Academy of Sciences,Beijing 100101,China;
    2.College of Resource Environment and Tourism,Capital Normal University,Beijing 100048,China
  • Received:2012-04-09 Revised:2012-05-24 Online:2012-09-01 Published:2012-09-01

摘要: 设计了一种基于图形处理器(GPU)的无缝地形渲染方法。该方法基于二叉树构建多层次地形网格,该网格用基于行、列号的地形模板表示。在设计过程中,将高程数据转化为适于GPU读取的高程纹理图,再通过顶点纹理提取(VTF)技术从纹理图中采样出高程值用于渲染,整个过程在GPU端完成,提升了地形数据访问效率。同时,采用实时优化自适应网格(ROAM)算法的强制拆分法,通过控制相邻地形块的等级来消除裂缝。最后,采用TriangleStrip方式进行渲染,避免了相邻三角形中顶点坐标数据的重复传递,减少了传递到GPU的数据量。用两块地形数据对算法渲染效率进行了检验,并将算法与Clipmap算法进行了帧率对比。结果表明,该算法有效解决了分块数据的裂缝问题,达到了交互式地形渲染的要求。

关键词: 地形渲染, 二叉树, 图形处理器, 高程纹理, 地形裂缝

Abstract: In this paper a Graphic Processing Unit (GPU)-based and seamless method for terrain rendering was proposed. The method utilized binary tree to construct the terrain Level Of Detail (LOD) which was represented by row-column templates. In this method, the elevation data was transformed to elevation-texture and then the elevation-texture was used to extract elevation for rendering by Vertex Texture Fetch (VTF). And the whole process was handled by GPU so that the data accessing efficiency was greatly improved. The force-split method in Real-time Optimally Adapting Meshes (ROAM) was used in this method which solved terrain cracks by limiting the level of adjacent terrain blocks. The TriangleStrip primitive was used for terrain rendering which avoided transferring the same vertices' coordinates of adjacent triangles to GPU. Finally the paper tested the efficiency of the new method by two terrain datasets, and compared the frame rates between Clipmap and the new method. The results show that the new proposed method solves the terrain crack effectively and fulfills the demand of interactive terrain rendering.

Key words: terrain rendering, binary tree, Graphic Processing Unit (GPU), elevation-texture, terrain crack

中图分类号: