Stefan Zellmann, M. Hoevels, U. Lang
{"title":"使用多命中BVH遍历的光线跟踪体裁剪","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":"{\"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}","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
Ray Traced Volume Clipping Using Multi-Hit BVH Traversal
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