基于GPU的非结构化网格数据体光照计算与实现方法
收稿日期: 2010-05-12
修回日期: 2010-09-21
网络出版日期: 2011-01-25
基金资助
国家973计划资助项目(2009CB723803);国家自然科学基金资助项目(60873120)
GPUBased Computation and an Implementation Method of Volume Illumination for UnstructuredGrid Data
Received date: 2010-05-12
Revised date: 2010-09-21
Online published: 2011-01-25
光照在提高体绘制质量方面发挥重要作用,而梯度计算是实现体光照的关键。与结构化网格相比,非结构化网格拓扑关系复杂,使得顶点梯度估计困难,采样点梯度计算复杂度高,且不易采用GPU加速,阻碍了算法的实时性。因此,绝大多数非结构化网格体绘制尚未添加体光照。本文提出一种高精度的非结构化网格顶点梯度计算方法:先采用格林公式估计单元梯度,再通过体积加权外推和反转距离外推获得顶点梯度。同时,提出一种基于单元散度的高效采样点梯度计算方法,与目前的全线性插值方法相比,明显降低了计算开销。此外,精心设计了GPU数据结构,实现了基于GPU的实时采样点梯度与光照计算,对较大规模数据,绘制性能可满足实时交互。
马千里,徐华勋,岳凯,李思昆 . 基于GPU的非结构化网格数据体光照计算与实现方法[J]. 计算机工程与科学, 2011 , 33(1) : 82 -87 . DOI: 10.3969/j.issn.1007130X.2011.
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,realtime 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 unstructuredgrid volumes have not been lit. This paper presents a method to estimate the vertex gradient with high precision for unstructured grids. It employs the volumeweighted extrapolation and the inversedistance 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 fulllinear interpolation。The realtime performance of our algorithm even for the relative large data sets can be achieved by its GPU implementaion with the aid of a welldesigned data structure.
[1]Popinski T,Rezk C,Hadwiger M,et al.GPUBased Volume RayCasting with Advanced Illumination[EB/OL]. [20090921]. http://vis.computer.org/visweek 2008/session.
[2]Correa C D,Hero R, Ma KL.A Comparison of Gradient Estimation for Volume Rendering on Unstructured Meshes[J]. IEEE Trans on Visualization and Computer Graphics,2009,9(4):98106.
[3]Ledergerber C,Guennebaud G,Meyer M,et al.Volume Mls Ray Casting[J]. IEEE Trans on Visualization and Computer Graphics, 2008,14(6):15391546.
[4]Mavriplis J.Revisiting the LeastSquares Procedure for Gradient Reconstruction on Unstructured Meshes[C]∥ Proc of AIAA Computational Fluid Dynamics Conf,2003:20033986.
[5]Cignoni P,Montani C,Scopigno R.Tetrahedra Based Volume Visualization[M]∥Mathematical Visualization, 1998:318.
[6]Frink N T.Upwind Scheme for Solving the Euler Equations on Unstructured Tetrahedral Meshes[J]. AIAA Journal,1992, 30(1):7077.
[7]Phong B T.Illumination for Computer Generated Pictures[J]. Communications of the ACM, 1975, 18(6):311317.
[8]Weiler M,Kraus M,Merz M,et al.HardwareBased Ray Casting for Tetrahedral Meshes[C]∥ Proc of IEEE Visualization,2003:333340.
[9]Rottger S, Kraus M,Ertl T.HardwareAccelerated Volume and Isosurface Rendering Based on CellProjection[C]∥Proc of IEEE Visualization,2000:109116.
[10]刘儒勋, 舒其望. 计算流体力学的若干新方法[M]. 北京: 科学出版社, 2003.
[11]Ma Q,Xu H,Zeng L,et al.Direct Raycasting of Unstructured CellCentered Data By Discontinuity RoeAverage Computation[J]. The Visual Computer, 2010,6(8):546558.
[12]Mitchell C R.Improved Reconstruction Schemes for the NavierStokes Equations on Unstructured Meshes[C]∥Proc of AIAA Aerospace Sciences Meeting and Exhibit,1994:940642.
[13]Schneider P J,Eberly D H.Geometric Tools for Computer Graphics[M]. Morgan Kaufmann, 2003:916.
/
| 〈 |
|
〉 |