In this technical report, we discuss several approaches to in-core rendering of large volumetric datasets in Unreal Engine 5 (UE5). We explore the following methods: the TBRayMarcher Plugin, the Niagara Fluids Plugin , and various approaches using Sparse Volume Textures (SVT), with a particular focus on Heterogeneous Volumes (HV). We found the HV approach to be the most promising. The biggest challenge we encountered with other approaches was the need to chunk datasets so that each fits into volume textures smaller than one gigavoxel. While this enables display of the entire dataset at reasonable frame rates, it introduces noticeable artifacts at chunk borders due to incorrect lighting, as each chunk lacks information about its neighbors. After addressing some (signed) int32 overflows in the Engine's SVT-related source code by converting them to to (unsigned) uint32 or int64, the SVT-based HV system allows us to render sparse datasets up to 32k x 32k x 16k voxels, provided the compressed tile data (including MIP data and padding for correct interpolation) does not exceed 4 gigavoxels. In the future, we intend to extend the existing SVT streaming functionality to support out-of-core rendering, in order to eventually overcome VRAM limitations, graphics API constraints, and the performance issues associated with 64-bit arithmetic in GPU shaders.
翻译:在本技术报告中,我们探讨了虚幻引擎5(UE5)中实现大规模体数据集内存内渲染的多种方法。我们研究了以下技术方案:TBRayMarcher插件、Niagara Fluids插件,以及多种基于稀疏体纹理(SVT)的渲染方法,其中重点分析了异构体(HV)方案。研究发现HV方案最具应用前景。其他方案面临的核心挑战在于需要对数据集进行分块处理,以确保每个子块能适配小于十亿体素的体纹理。虽然这种方法能以合理帧率完整显示数据集,但由于每个数据块缺乏相邻块的光照信息,会在块边界处产生因光照计算错误导致的明显伪影。通过将引擎SVT相关源代码中的有符号int32溢出值转换为无符号uint32或int64类型后,基于SVT的HV系统能够渲染高达32k×32k×16k体素的稀疏数据集,前提是压缩后的瓦片数据(包含MIP数据及用于正确插值的填充数据)不超过四十亿体素。未来我们将扩展现有SVT流式处理功能以支持核外渲染,从而最终突破显存限制、图形API约束以及GPU着色器中64位算术运算带来的性能瓶颈。