激光与光电子学进展, 2021, 58 (4): 0410005, 网络出版: 2021-02-25
基于改进光线投射算法的室内烟雾可视化研究 下载: 839次
Indoor Smoke Visualization Based on the Improved Ray-Casting Algorithm
图像处理 光线投射 室内烟雾 采样频率 线性插值 image processing ray-casting indoor smoke sampling frequency linear interpolation
摘要
针对传统光线投射算法在三维场景中绘制大量烟雾数据时存在计算资源消耗大、绘制速度缓慢等一系列问题,提出一种基于改进光线投射算法的室内烟雾可视化方法。将三维数据场按照统一大小划分成均匀的数据块,求出光线穿越数据块时入射点和出射点的中点位置,利用视点和中点之间的距离比例来调整采样频率,从而获得重采样点的位置。再通过对光线上的重采样点进行分级分组操作,对处于不同级别的采样点采取不同的插值策略,最后使用图像合成算法完成光线上重采样点数据值的映射,得到室内烟雾的渲染效果。实验结果表明,该方法是可行且有效的,与现有的光线投射算法相比,在保证绘制图像真实性和稳定性的前提下,改进过后的光线投射算法极大地减少了渲染过程中重采样和线性插值时的计算量,同时帧率能够稳定保持在75 frame·s -1左右,可满足不同室内场景下烟雾的实时绘制要求。
Abstract
The traditional ray-casting algorithm demonstrates a range of drawbacks, such as large consumption of computing resources and a low draw speed, when drawing vast smoke data in a three-dimensional (3D) scene. Thus, a visualization method of indoor smoke based on the improved ray-casting algorithm is proposed. First, the 3D data field is divided into uniform blocks of data according to the uniform size, neutral positions of the incident and emission points are calculated when the ray travels through the blocks, and the sampling frequency is adjusted with the help of the distance ratio between the point of sight and midpoint to spot the resampling point. For sampling points at different levels, different interpolation strategies are followed by classifying the resampling points in the rays. Finally, a picture-synthesis algorithm is adopted to complete the mapping of the sampling sight data in each ray, realizing the rendering effect of indoor smoke. Experimental results show that the method is workable and effective. Compared with the existing ray-casting algorithm, the improved one considerably reduces the computing effort of resampling and linear interpolation in the rendering process on the premise of guaranteeing the authenticity and stability of the images. Moreover, the frame rate can stably maintain 75 frame·s -1, which can satisfy the real-time rendering requirements of smoke in different indoor scenes.
刘颖, 陆后军, 苌道方. 基于改进光线投射算法的室内烟雾可视化研究[J]. 激光与光电子学进展, 2021, 58(4): 0410005. Ying Liu, Houjun Lu, Daofang Chang. Indoor Smoke Visualization Based on the Improved Ray-Casting Algorithm[J]. Laser & Optoelectronics Progress, 2021, 58(4): 0410005.