目的 体绘制是3维数据可视化的主要方法之一.用于体绘制的数据体中包含有大量的空体素,导致光线投射算法进行没有意义的重采样计算,必然降低绘制算法效率.针对全空子数据体体绘制低效问题,提出基于GPU体高效绘制方法.方法 利用八叉树数据结构组织数据,有效管理包含许多空体素的子数据体.通过绘制八叉树非全空叶子节点子数据体表面,使光线投射算法中起始和终止重采样位置更接近数据体中的可视部分,同时根据八叉树全空节点子数据体判定纹理查询结果,计算合适的跳跃步长,快速跳过八叉树中全空节点子数据体.结果 当数据体中空体素较多时,确定合适的八叉树深度,有效地跳过数据体中的空体素,减少体绘制运算量,实现对原基于体包围盒表面绘制的GPU光线投射算法的加速.结论 设计不透明度函数,凸显数据体中层位面,并将算法成功应用于地震数据可视化,取得很好应用效果.
Objective Volume rendering is one important method for 3D data visualization. Volume data for volume render- ing often includes a lot of empty voxels, resulting in decreasing the rendering efficiency for ray-casting algorithms, because meaningless resampling positions may be computed. This paper presents a GPU-based volume rendering method for full- empty sub-data blocks to efficiently improve the rendering speed. Method The sub-data blocks with a lot of empty space are effectively managed with an octree structure. By rendering surfaces of the non-full-empty sub-data blocks of leaf nodes in the octree, the start and end resampling positions of the ray-casting algorithm are closer to the visible part in the data volume. Meanwhile, the appropriate leaping steps are calculated to quickly skip the full-empty sub-data blocks according to the lookup result of the full-empty subdata blocks confirming texture. Result As a result, the meaningless resampling points are greatly reduced and the new algorithm, which is based on the selection of the depth of octree and effectively ski- pping full-empty subdata blocks, shows better performance than the original GPU ray-casting algorithm with bounding box surface rendering when the data volume contains a lot of empty voxel. Conclusion The new improved algorithm is successfully applied in seismic data visualization, with an opacity function designed to highlight the layer surfaces in the data vol- ume, which shows favorable practical effect.