Ray Traced Volume Clipping Using Multi-Hit BVH Traversal
Stefan Zellmann, M. Hoevels, U. Lang
{"title":"Ray Traced Volume Clipping Using Multi-Hit BVH Traversal","authors":"Stefan Zellmann, M. Hoevels, U. Lang","doi":"10.2352/ISSN.2470-1173.2017.1.VDA-392","DOIUrl":null,"url":null,"abstract":"Clipping is an important operation in the context of direct volume rendering to gain an understanding of the inner structures of scientific datasets. Rendering systems often only support volume clipping with geometry types that can be described in a parametric form, or they employ costly multi-pass GPU approaches. We present a SIMD-friendly clipping algorithm for ray traced direct volume rendering that is compatible with arbitrary geometric surface primitives ranging from mere planes over quadric surfaces such as spheres to general triangle meshes. By using a generic programming approach, our algorithm is in general not even limited to triangle or quadric primitives. Ray tracing complex geometric objects with a high primitive count requires the use of acceleration data structures. Our algorithm is based on the multi-hit query for traversing bounding volume hierarchies with rays. We provide efficient CPU and GPU implementations and present performance results. Introduction Clipping for 3-D direct volume rendering (DVR) plays an important role in many scientific visualization contexts. Clipping with spheres and planes can be a helpful tool in interactive scenarios as they occur in virtual reality (VR) applications with tracking devices. In such cases, volumetric datasets can be interactively explored by navigating through the rendered volumetric region and using the clip geometry as a virtual shield. In medical imaging contexts, static clipping with a nonmoving geometry is important e.g. in cases where neurologists have identified 3-D regions of interest in a magnetic resonance imaging (MRI) dataset and desire to suppress rendering for all content but that inside of those regions. Engineering applications often rely on DVR to display scalar or higher-order fields obtained from a simulation. For visualizations of this type it may be helpful to perform sub-voxel accurate clipping with the bounding geometry that was used during the simulation, especially if the volume dataset is blended and then displayed together with the bounding geometry. Traditional DVR applications, especially if they are intended to be used in VR scenarios and if low latency is crucial, typically employ hardware accelerated texture-based rendering with rasterization and a planar proxy geometry. Using this traditional pipeline, sub-voxel accurate clipping is hard to achieve with geometry that exposes irregular concavities. When using ray casting for volume integration, clipping with an arbitrarily shaped geometry can however elegantly be described in terms of a simple two-pass algorithm: in the first pass, intersect each primary viewing ray with all opaque geometry that is set up for clipping and identify visible volume regions. In the second rendering pass, cast primary rays through the volume density and consider only those voxels that are not clipped. A ray tracing-based algorithm lends itself well to this approach because intersecting rays with 3-D geometry can be efficiently implemented in a GPGPU program. In order to determine the intersection information with a traditional rasterization pipeline, one would have to employ multiple render passes just to identify the visible and invisible regions one would have to peel away consecutive depth layers as it is e.g. done to render translucent surfaces in viewing order [3] and then construct the visibility information from multiple render targets. On top of being hard to implement elegantly and being potentially inefficient, this approach would also require that parametric surfaces such as quadrics were rasterized and thus converted to polygon meshes in advance. Real-time surface ray tracing has in recent years been successfully ported to GPUs using general purpose GPU programming (GPGPU). Because of its inherent inefficiency the time complexity of ray tracing grows with the product of the number of primitives and the number of image pixels a divide and conquer strategy is mandatory for real-time ray tracing. This strategy is typically implemented by a priori calculating a hierarchical spatial or object subdivision to reduce the number of necessary ray / geometric object interactions in favor of testing the ray against bounding objects surrounding a whole set of primitives. With this kind of data structure it is possible to reduce the asymptotic behavior of surface ray tracing so that it is on average logarithmic in the number of geometric primitives. In order to combine DVR and clipping with an arbitrary surface geometry, it is necessary to integrate a ray tracing acceleration data structure into the DVR application. In this paper we present an efficient approach for DVR and clipping with an arbitrary surface geometry. Our technique allows, amongst others, for clipping with triangle meshes that exhibit multiple concavities. For this and in order to be able to manage large triangle meshes efficiently, we employ a bounding volume hierarchy (BVH) and the multi-hit ray traversal query to efficiently identify volume regions that are supposed to be clipped. We provide an implementation that is optimized for both SIMD x86 instructions and for NVIDIA GPUs and that is available as part of an open source DVR software. The paper is organized as follows. In the following section we motivate the benefit of sub-voxel accurate clipping for neurosurgical visualization. In the section after that we review related work from the fields of ray tracing and volume rendering with clipping. Then we present a general framework to efficiently implement clipping with possibly concave geometric objects in a volume ray caster. We extend this approach by explicitly specializing it for triangle meshes and then present an implementation that can run on both CPUs and GPUs. In the section after that we propose a neurosurgical visualization aided by our method and present performance results that we discuss afterwards. The last IS&T International Symposium on Electronic Imaging 2017 Visualization and Data Analysis 2017 89 https://doi.org/10.2352/ISSN.2470-1173.2017.1.VDA-392 © 2017, Society for Imaging Science and Technology","PeriodicalId":89305,"journal":{"name":"Visualization and data analysis","volume":"160 1","pages":"89-98"},"PeriodicalIF":0.0000,"publicationDate":"2017-01-29","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"7","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Visualization and data analysis","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.2352/ISSN.2470-1173.2017.1.VDA-392","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 7
Abstract
Clipping is an important operation in the context of direct volume rendering to gain an understanding of the inner structures of scientific datasets. Rendering systems often only support volume clipping with geometry types that can be described in a parametric form, or they employ costly multi-pass GPU approaches. We present a SIMD-friendly clipping algorithm for ray traced direct volume rendering that is compatible with arbitrary geometric surface primitives ranging from mere planes over quadric surfaces such as spheres to general triangle meshes. By using a generic programming approach, our algorithm is in general not even limited to triangle or quadric primitives. Ray tracing complex geometric objects with a high primitive count requires the use of acceleration data structures. Our algorithm is based on the multi-hit query for traversing bounding volume hierarchies with rays. We provide efficient CPU and GPU implementations and present performance results. Introduction Clipping for 3-D direct volume rendering (DVR) plays an important role in many scientific visualization contexts. Clipping with spheres and planes can be a helpful tool in interactive scenarios as they occur in virtual reality (VR) applications with tracking devices. In such cases, volumetric datasets can be interactively explored by navigating through the rendered volumetric region and using the clip geometry as a virtual shield. In medical imaging contexts, static clipping with a nonmoving geometry is important e.g. in cases where neurologists have identified 3-D regions of interest in a magnetic resonance imaging (MRI) dataset and desire to suppress rendering for all content but that inside of those regions. Engineering applications often rely on DVR to display scalar or higher-order fields obtained from a simulation. For visualizations of this type it may be helpful to perform sub-voxel accurate clipping with the bounding geometry that was used during the simulation, especially if the volume dataset is blended and then displayed together with the bounding geometry. Traditional DVR applications, especially if they are intended to be used in VR scenarios and if low latency is crucial, typically employ hardware accelerated texture-based rendering with rasterization and a planar proxy geometry. Using this traditional pipeline, sub-voxel accurate clipping is hard to achieve with geometry that exposes irregular concavities. When using ray casting for volume integration, clipping with an arbitrarily shaped geometry can however elegantly be described in terms of a simple two-pass algorithm: in the first pass, intersect each primary viewing ray with all opaque geometry that is set up for clipping and identify visible volume regions. In the second rendering pass, cast primary rays through the volume density and consider only those voxels that are not clipped. A ray tracing-based algorithm lends itself well to this approach because intersecting rays with 3-D geometry can be efficiently implemented in a GPGPU program. In order to determine the intersection information with a traditional rasterization pipeline, one would have to employ multiple render passes just to identify the visible and invisible regions one would have to peel away consecutive depth layers as it is e.g. done to render translucent surfaces in viewing order [3] and then construct the visibility information from multiple render targets. On top of being hard to implement elegantly and being potentially inefficient, this approach would also require that parametric surfaces such as quadrics were rasterized and thus converted to polygon meshes in advance. Real-time surface ray tracing has in recent years been successfully ported to GPUs using general purpose GPU programming (GPGPU). Because of its inherent inefficiency the time complexity of ray tracing grows with the product of the number of primitives and the number of image pixels a divide and conquer strategy is mandatory for real-time ray tracing. This strategy is typically implemented by a priori calculating a hierarchical spatial or object subdivision to reduce the number of necessary ray / geometric object interactions in favor of testing the ray against bounding objects surrounding a whole set of primitives. With this kind of data structure it is possible to reduce the asymptotic behavior of surface ray tracing so that it is on average logarithmic in the number of geometric primitives. In order to combine DVR and clipping with an arbitrary surface geometry, it is necessary to integrate a ray tracing acceleration data structure into the DVR application. In this paper we present an efficient approach for DVR and clipping with an arbitrary surface geometry. Our technique allows, amongst others, for clipping with triangle meshes that exhibit multiple concavities. For this and in order to be able to manage large triangle meshes efficiently, we employ a bounding volume hierarchy (BVH) and the multi-hit ray traversal query to efficiently identify volume regions that are supposed to be clipped. We provide an implementation that is optimized for both SIMD x86 instructions and for NVIDIA GPUs and that is available as part of an open source DVR software. The paper is organized as follows. In the following section we motivate the benefit of sub-voxel accurate clipping for neurosurgical visualization. In the section after that we review related work from the fields of ray tracing and volume rendering with clipping. Then we present a general framework to efficiently implement clipping with possibly concave geometric objects in a volume ray caster. We extend this approach by explicitly specializing it for triangle meshes and then present an implementation that can run on both CPUs and GPUs. In the section after that we propose a neurosurgical visualization aided by our method and present performance results that we discuss afterwards. The last IS&T International Symposium on Electronic Imaging 2017 Visualization and Data Analysis 2017 89 https://doi.org/10.2352/ISSN.2470-1173.2017.1.VDA-392 © 2017, Society for Imaging Science and Technology
使用多命中BVH遍历的光线跟踪体裁剪
在直接体绘制中,裁剪是理解科学数据集内部结构的一项重要操作。渲染系统通常只支持可以用参数形式描述的几何类型的体积裁剪,或者它们使用昂贵的多通道GPU方法。我们提出了一种simd友好的剪切算法,用于光线跟踪直接体渲染,该算法兼容任意几何表面基元,从二次曲面(如球体)上的单纯平面到一般三角形网格。通过使用泛型编程方法,我们的算法通常甚至不局限于三角形或二次基元。光线追踪具有高原始计数的复杂几何对象需要使用加速数据结构。我们的算法是基于用射线遍历边界体层次结构的多命中查询。我们提供高效的CPU和GPU实现,并呈现性能结果。三维直接体绘制(DVR)中的裁剪在许多科学可视化环境中起着重要的作用。在带有跟踪设备的虚拟现实(VR)应用程序中,球体和平面的剪切可以成为交互式场景中的有用工具。在这种情况下,可以通过导航呈现的体积区域并使用剪辑几何形状作为虚拟屏蔽来交互式地探索体积数据集。在医学成像环境中,具有不移动几何形状的静态剪切非常重要,例如,当神经科医生在磁共振成像(MRI)数据集中识别出感兴趣的3d区域,并希望抑制除这些区域内的所有内容的渲染时。工程应用通常依赖于DVR来显示从模拟中获得的标量或高阶场。对于这种类型的可视化,使用模拟过程中使用的边界几何来执行子体素精确剪裁可能会有所帮助,特别是当体积数据集混合并与边界几何一起显示时。传统的DVR应用程序,特别是如果它们打算用于VR场景,并且如果低延迟是至关重要的,通常采用硬件加速的基于纹理的渲染,带有栅格化和平面代理几何。使用这种传统的管道,对于暴露不规则凹陷的几何图形,很难实现亚体素精确的裁剪。当使用光线投射进行体积分时,任意形状几何体的裁剪可以用简单的两步算法来描述:在第一步中,将每个主观察光线与所有设置为裁剪的不透明几何体相交,并识别可见的体区域。在第二个渲染通道中,通过体密度投射主射线,只考虑那些没有被裁剪的体素。基于光线跟踪的算法非常适合这种方法,因为与三维几何图形相交的光线可以在GPGPU程序中有效地实现。为了用传统的栅格化管道确定交叉信息,必须使用多个渲染通道来识别可见和不可见区域,必须剥离连续的深度层,例如,按照查看顺序渲染半透明表面[3],然后从多个渲染目标构建可见性信息。除了难以优雅地实现和潜在的低效率之外,这种方法还需要对参数曲面(如二次曲面)进行栅格化,从而提前转换为多边形网格。近年来,利用通用GPU编程技术(GPGPU),实时表面光线追踪技术已经成功地移植到图形处理器上。由于光线跟踪固有的低效率,其时间复杂度随原语数和图像像素数的乘积而增长,因此在实时光线跟踪中必须采用分而治之的策略。该策略通常通过先验地计算分层空间或对象细分来实现,以减少必要的射线/几何对象相互作用的数量,从而有利于对围绕一整套原语的边界对象进行射线测试。有了这种数据结构,就有可能减少表面射线追踪的渐近行为,使其在几何基元的数量上平均为对数。为了将DVR和任意曲面的裁剪结合起来,有必要在DVR应用程序中集成光线追踪加速数据结构。在本文中,我们提出了一种有效的对任意几何曲面进行DVR和裁剪的方法。我们的技术允许,除其他外,剪辑与三角形网格,表现出多个凹陷。
本文章由计算机程序翻译,如有差异,请以英文原文为准。