• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2011, Vol. 33 ›› Issue (1): 82-87.doi: 10.3969/j.issn.1007130X.2011.

• 论文 • 上一篇    下一篇

基于GPU的非结构化网格数据体光照计算与实现方法

马千里,徐华勋,岳凯,李思昆   

  1. (国防科学技术大学计算机学院,湖南 长沙 410073)
  • 收稿日期:2010-05-12 修回日期:2010-09-21 出版日期:2011-01-25 发布日期:2011-01-25
  • 通讯作者: 马千里 E-mail:maqianliemail@gmail.com
  • 作者简介:马千里(1983),女,辽宁鞍山人,博士生,研究方向为虚拟现实与可视化技术。徐华勋(1977),男,河北平乡人,博士生,研究方向为虚拟现实与可视化技术。岳凯(1983),男,黑龙江虎林人,硕士生,研究方向为虚拟现实与可视化技术。李思昆(1941),男,山东青岛人,教授,研究方向为虚拟现实与可视化技术、CAD、VLSI设计方法学等。
  • 基金资助:

    国家973计划资助项目(2009CB723803);国家自然科学基金资助项目(60873120)

GPUBased Computation and an Implementation Method of Volume Illumination for UnstructuredGrid Data

MA Qianli,XU Huaxun,YUE Kai,LI Sikun   

  1. (School of Computer Science,National University of Defense Technology,Changsha 410073,China)
  • Received:2010-05-12 Revised:2010-09-21 Online:2011-01-25 Published:2011-01-25

摘要:

光照在提高体绘制质量方面发挥重要作用,而梯度计算是实现体光照的关键。与结构化网格相比,非结构化网格拓扑关系复杂,使得顶点梯度估计困难,采样点梯度计算复杂度高,且不易采用GPU加速,阻碍了算法的实时性。因此,绝大多数非结构化网格体绘制尚未添加体光照。本文提出一种高精度的非结构化网格顶点梯度计算方法:先采用格林公式估计单元梯度,再通过体积加权外推和反转距离外推获得顶点梯度。同时,提出一种基于单元散度的高效采样点梯度计算方法,与目前的全线性插值方法相比,明显降低了计算开销。此外,精心设计了GPU数据结构,实现了基于GPU的实时采样点梯度与光照计算,对较大规模数据,绘制性能可满足实时交互。

关键词: GPU, 非结构化网格, 光照, 梯度估计, 体绘制

Abstract:

Gradient estimation is necessary for illumination effects which play an important role in volume rendering. Compared with the structured grids, it is difficult to estimate the vertex gradient for unstructured grids due to the complicated topology. Futhermore,realtime rendering can be hardly achieved due to the computation complexity of the resampled point gradient and the difficultity of implemention on GPUs. As a result, most of the unstructuredgrid volumes have not been lit. This paper presents a method to estimate the vertex gradient with high precision for unstructured grids. It employs the volumeweighted extrapolation and the inversedistance extrapolation to compute a vertex gradient using a group of cell gradients estimated by the Green theorem. Meanwhile, to compute the gradient at a resampled point, we present an efficient method based on the cell divergence which makes the cost much lower than the recent method of fulllinear interpolation。The realtime performance of our algorithm even for the relative large data sets can be achieved by its GPU implementaion with the aid of a welldesigned data structure.

Key words: GPU, unstructured grids;illumination;gradient estimation;volume rendering