为减少多分辨稀疏体素的存储空间并提高其绘制效率,提出一种基于小波的稀疏体素数据压缩与实时绘制算法。在稀疏体素生成阶段,基于小波的多分辨和稀疏体素的稀疏特性,利用多级三维 Haar 小波变换将高分辨率的稀疏体素转换为低分辨稀疏体素和多级细节信息,并采用紧凑的编码方式对小波系数进行编码,实现对多层级稀疏体素的数据压缩;在交互绘制阶段,结合稀疏体素八叉树光线投射算法,以低分辨体素节点为交互过程中的着色计算图元,交互过程终止后通过三维 Harr 小波逆变换逐级添加细节信息还原得到高分辨体素,进而实现多分辨绘制;最后充分利用多核 CPU 并行加速多分辨光线投射算法。对不同复杂度的面片模型进行压缩与绘制,实例计算表明,该算法高效且易于实现。%To reduce the storage size and improve the rendering efficiency of multi-resolution sparse voxels, a wavelet based compression and rendering algorithm is proposed. At the building stage of sparse voxels, according to the multi-resolution characteristic of wavelet and the sparsity of voxel structure, high-resolution sparse voxels were transformed into low-resolution sparse voxels and multi-level detail information by employing 3D Haar wavelet transform, and the wavelet coefficients were encoded with a compact encoding method. At the interactive rendering phase, in order to implement multi-resolution rendering, the low-resolution voxels were selected as shading primitives during the interaction. After the interaction process, the details were added to the coarse-grained voxels level by level through the inverse transform of 3D Haar wavelet to restore high-resolution voxels. Lastly, the rendering algorithm was accelerated in parallel by utilizing multi-core CPU. The experimental results show that the proposed algorithm provides an efficient and achievable way to render models with various com-plexity.
展开▼