Fact-checked by Grok 2 weeks ago

Volume ray casting

Volume ray casting is an image-order volume rendering technique in computer graphics that visualizes three-dimensional scalar or vector data by casting rays from the viewpoint through a volumetric dataset, sampling scalar values at regular intervals along each ray, and compositing the resulting colors and opacities to form a two-dimensional projection image. This method avoids the need for explicit geometric surface extraction, enabling the direct display of semitransparent volumes such as those encountered in medical imaging or scientific simulations. Developed in the late 1980s, volume ray casting builds on foundational work in optical modeling and ray tracing, with Marc Levoy's 1988 paper introducing a practical for displaying surfaces from volume data without intermediate geometric primitives. Levoy's approach uses to estimate scalar values at sample points along rays, assigns colors and partial opacities via classification functions, and composites these values back-to-front using the transparency equation C_{out} = C_{in}(1 - \alpha) + c \alpha, where c is the sample color and \alpha is its opacity. Subsequent refinements, such as the 1990 efficient ray tracing , incorporated hierarchical spatial enumeration (e.g., pyramids) and adaptive termination based on accumulated opacity thresholds to accelerate rendering by factors of 2–10 times, making it feasible for larger datasets. The core algorithm operates in image order: for each in the output image, a is traced through the , typically sampling at evenly spaced intervals to capture gradient-based for surface normals and handle partial in materials like fluids or tissues. Front-to-back or back-to-front schemes ensure correct accumulation, with modern implementations leveraging graphics processing units (GPUs) for real-time performance through texture-based and fragment shaders. Key advantages include high-fidelity visualization of fuzzy or weak boundaries, reduced via , and flexibility in viewpoint and , though it demands significant computational resources proportional to size and . Applications of volume ray casting span for rendering or MRI scans to reveal internal structures, molecular graphics for maps, and scientific in fields like and . In contemporary systems, such as GPU-accelerated tools, it supports interactive exploration of volumetric effects like , , or clouds in and .

Fundamentals

Overview and Definition

Volume ray casting is an image-based technique that generates two-dimensional projections from three-dimensional scalar volumetric data by casting rays through the volume and accumulating color and opacity samples along each ray. This method enables the direct visualization of voxel-based data without the need for intermediate geometric representations, allowing for the rendering of complex internal structures and semi-transparent materials. At its core, volume ray casting operates on principles of sampling scalar fields stored in voxels—discrete three-dimensional grid points representing measured or simulated data values—and projecting them onto an to form a coherent view. It excels in handling volumes with varying densities and opacities, such as those simulating , clouds, or medical scans, by assigning partial to individual voxels and contributions accumulatively along ray paths. Understanding this technique requires familiarity with basic concepts like voxels as the fundamental units of volumetric data, scalar fields defining property values across space, and as the virtual projection surfaces from which rays originate. Unlike surface ray tracing, which traces rays that intersect and terminate at explicit geometric surfaces while generating secondary rays for effects like reflections and refractions, volume ray casting samples continuously throughout the entire volume extent without predefined boundaries or recursive ray spawning. This approach is grounded in the , which models light transport through participating media as the theoretical foundation for accumulating radiance along rays.

Historical Development

The origins of volume ray casting lie in extensions of traditional ray tracing to handle volumetric data in . In 1984, James T. Kajiya and Brian P. Von Herzen developed algorithms for tracing rays through volume densities, allowing the rendering of semi-transparent phenomena such as clouds, , and stored in spatial grids. This work laid foundational principles for integrating volumetric elements into ray-based rendering pipelines, bridging surface-oriented ray tracing with density-based representations. The formal establishment of volume rendering, including ray casting as a core method, occurred in 1988 through independent seminal contributions. Marc Levoy introduced techniques for displaying surfaces extracted from volume data using to sample and classify scalar fields, emphasizing direct visualization without intermediate geometric models. Simultaneously, Craig Upson and Michael Keeler proposed the V-buffer approach, an efficient framework for projecting and compositing volumetric data directly onto the , enabling interactive rendering of complex volume projections. During the , volume advanced toward practical implementation with hardware and software support. The 1999 release of the VolumePro board by Electric Research Laboratories marked a milestone in real-time , delivering hardware-accelerated at interactive frame rates on consumer PCs through parallel ray traversal and . Concurrently, the technique was integrated into prominent software toolkits, including the Visualization Toolkit (), which supported ray-casting mappers from its early versions in the mid-, and Open Inventor, where nodes facilitated scene-graph-based implementations by the late . The saw a pivotal shift toward (GPU) acceleration for , enhancing performance for larger datasets. Daniel Weiskopf's 2006 exploration of GPU-based techniques enabled programmable and high-speed ray traversal on commodity hardware, expanding accessibility for applications. Reflecting on these developments, a 2006 overview marking the 20th anniversary of underscored its transformative role in and scientific visualization, crediting for enabling detailed exploration of volumetric scans like CT and MRI data.

Algorithmic Foundations

Mathematical Formulation

The volume rendering equation provides the theoretical foundation for computing the radiance along a in a participating medium, such as a volumetric . In its continuous form, the outgoing radiance I at a point along the is given by I = \int_0^D c(t) \, \alpha(t) \, \exp\left( -\int_0^t \alpha(s) \, ds \right) dt, where D is the 's length through the volume, t parameterizes position along the , c(t) represents the color (or emission) at parameter t, and \alpha(t) denotes the opacity (or ) at t. This accounts for and due to along the path. The exponential term in the equation is the transmission function T(t), defined as T(t) = \exp\left( -\int_0^t \sigma(s) \, ds \right), where \sigma(s) is the density or optical thickness at s, related to opacity by \alpha(t) \approx \sigma(t) \Delta t for small step sizes \Delta t. The transmission T(t) quantifies the fraction of radiance that survives attenuation from the ray origin to t. Substituting T(t) yields an equivalent form I = \int_0^D c(t) \, \alpha(t) \, T(t) \, dt, emphasizing the balance between emission and surviving light. To apply this in ray casting, the continuous integral is discretized using Riemann sums, assuming a constant step size \Delta t along the ray with n samples where D = n \Delta t. The integral approximates to a over sampled points, transforming the emission-absorption model into iterative . Under the of constant properties between samples, the front-to-back composited color C becomes C = \sum_{i=1}^n c_i \, \alpha_i \, \prod_{j=1}^{i-1} (1 - \alpha_j), where c_i and \alpha_i are the interpolated color and opacity at the i-th sample, and the product represents accumulated up to the previous sample. This formulation accumulates contributions from front to back, early-terminating when transmittance falls below a for efficiency. The derivation follows from partitioning the into n segments, approximating each \int_{(i-1)\Delta t}^{i\Delta t} \cdots dt \approx c_i \alpha_i T(i\Delta t) \Delta t, with T(i\Delta t) = \prod_{j=1}^{i-1} (1 - \alpha_j), and \alpha_i \approx 1 - \exp(-\sigma_i \Delta t). As \Delta t \to 0, the sum converges to the continuous . For shading in volume ray casting, surface normals are derived from gradients of the to compute local illumination via models like Phong. Gradients \nabla f at positions are approximated using central differences on the discrete data f: \nabla f(x_i, y_j, z_k) \approx \left( \frac{f(x_i, y_j, z_{k+1}) - f(x_i, y_j, z_{k-1})}{2\Delta z}, \frac{f(x_i, y_{j+1}, z_k) - f(x_i, y_{j-1}, z_k)}{2\Delta y}, \frac{f(x_{i+1}, y_j, z_k) - f(x_{i-1}, y_j, z_k)}{2\Delta x} \right), then normalized as N = \nabla f / \|\nabla f\| for use as normals. This provides orientation cues for specular and diffuse lighting without explicit surface extraction. Sobel operators offer an alternative finite-difference approximation, convolving the volume with 3x3x3 kernels to estimate gradients while suppressing noise, though central differences suffice for uniform grids.

Classification and Variants

Volume ray casting is classified as a direct technique, which samples and integrates data directly to produce images without intermediate geometric representations, in contrast to indirect methods that extract surfaces such as isosurfaces via algorithms like before rendering. Within direct , volume ray casting falls under image-based or image-order approaches, where rendering proceeds from the output image by casting rays through each into the volume, differing from object-based or object-order methods that project voxels or volume elements onto the , such as in splatting. Key variants of volume ray casting include image-space implementations, which generate rays per in screen coordinates for flexible viewpoint handling, and object-space variants, which align rays with the volume's grid or process slices parallel to the viewing plane for hardware efficiency, as seen in systems like VolumePro. along rays can follow front-to-back order, accumulating opacity to enable early ray termination when transparency thresholds are met, or back-to-front order, which blends all samples without termination for full traversal. Volume ray casting typically employs fixed-step sampling along rays at uniform intervals to approximate the volume integral, distinguishing it from ray marching variants that use variable-step or adaptive sampling to adjust based on data density or gradients for improved efficiency and accuracy.

Basic Pipeline

Ray Generation and Traversal

In volume ray casting, rays are generated for each pixel (u, v) on the image plane to simulate the viewing direction through the volumetric data. The ray origin is placed at the eye point E, and the direction D is computed as the normalized vector from E to the projected pixel position P on the near plane, given by D = \frac{P - E}{\|P - E\|}. This setup supports perspective projection, allowing for realistic depth cues in the rendered image. To efficiently traverse the volumetric data, the ray is first intersected with the axis-aligned bounding box (AABB) enclosing the volume, determining the entry and exit points along the ray path. The slab method is employed for this intersection, treating the AABB as three pairs of parallel planes (slabs) aligned with the coordinate axes. For a ray parameterized as X(t) = E + t D, the intersection parameters for each axis i \in \{x, y, z\} are calculated as t_{i,\min} = \frac{\min_i - E_i}{D_i} and t_{i,\max} = \frac{\max_i - E_i}{D_i} if D_i \neq 0, with adjustments for ray direction sign and division by zero cases handled by setting infinite values. The overall entry parameter is then t_{\min} = \max(0, \max(t_{x,\min}, t_{y,\min}, t_{z,\min})), and the exit parameter is t_{\max} = \min(t_{x,\max}, t_{y,\max}, t_{z,\max}); if t_{\min} > t_{\max}, the ray misses the volume. This method ensures traversal is confined to the relevant segment, avoiding unnecessary computations outside the data bounds. Within the intersected segment, the ray is advanced using a fixed step size \Delta t, determined by the voxel resolution or a desired sampling rate to balance accuracy and performance. Typically, \Delta t is set proportional to the average voxel edge length, such as \Delta t = \frac{voxel_{size}}{n} where n is the number of samples per voxel traversal, ensuring uniform sampling density across the volume. The traversal loop increments the parameter as t \leftarrow t + \Delta t and updates the position X(t) = E + t D until t > t_{\max}, resampling the volume at each step. For optimization, early termination of the ray traversal occurs when the accumulated opacity exceeds a predefined threshold, such as 0.95, beyond which additional samples contribute minimally to the final value due to the falloff in the . This technique significantly reduces computational cost for opaque or semi-opaque regions without compromising visual fidelity.

Sampling and Interpolation

In volume ray casting, scalar values are extracted from the discrete grid at predefined sample points along each ray to approximate the continuous volumetric field. These sample points are typically positioned equidistantly along the ray at fixed intervals \Delta t, ensuring uniform spacing to facilitate consistent accumulation during . To locate the relevant voxels, the world coordinates of each sample point (x, y, z) are mapped to discrete voxel indices through floor division, identifying the enclosing . Since sample points rarely align exactly with voxel centers, interpolation is essential to estimate the scalar value at non-grid locations. The standard approach is trilinear interpolation, which computes a weighted average from the eight surrounding voxels within the unit cube defined by the floor indices. For a point (x, y, z), let dx = x - \lfloor x \rfloor, dy = y - \lfloor y \rfloor, and dz = z - \lfloor z \rfloor. The interpolated scalar s is given by: \begin{aligned} s = &\ (1 - dx)(1 - dy)(1 - dz) \cdot v_{000} \\ &+ dx(1 - dy)(1 - dz) \cdot v_{100} \\ &+ (1 - dx)dy(1 - dz) \cdot v_{010} \\ &+ dx\ dy(1 - dz) \cdot v_{110} \\ &+ (1 - dx)(1 - dy)dz \cdot v_{001} \\ &+ dx(1 - dy)dz \cdot v_{101} \\ &+ (1 - dx)dy\ dz \cdot v_{011} \\ &+ dx\ dy\ dz \cdot v_{111}, \end{aligned} where v_{ijk} denotes the scalar value at the voxel offset by i in x, j in y, and k in z from the base . This method provides a by linearly interpolating along each edge, face, and finally the volume. Nearest-neighbor sampling offers a simpler alternative but introduces blocky artifacts, making trilinear the preferred basic technique for most applications. The interpolated scalar s is then classified using a transfer function to assign optical properties, mapping it to red, green, blue, and alpha (RGBA) values. A one-dimensional transfer function c(s) yields color, while \alpha(s) determines opacity, often via lookup tables for efficiency; two-dimensional variants incorporate additional data like gradient magnitude to distinguish material boundaries. This classification step reveals internal structures by emphasizing specific scalar ranges, such as tissue densities in medical imaging. To mitigate artifacts from or sharp transitions in the grid, pre-filtering techniques can be applied prior to . Basic assumes linear variation, but higher-order filters, such as Gaussian kernels, convolve the volume data to band-limit frequencies and reduce jagged edges at silhouettes. These methods preserve detail while ensuring the rendered image aligns with the Nyquist sampling theorem, though they increase computational cost compared to unfiltered nearest or trilinear approaches.

Shading and Local Illumination

In volume ray casting, shading enhances the visual perception of volumetric structures by estimating surface normals from scalar field gradients and applying local illumination models at sampled points along each ray. Gradient estimation is typically performed using finite differences on the interpolated scalar values, with the central difference method being common for its balance of accuracy and computational efficiency: for the x-component, G_x = \frac{s(x+1) - s(x-1)}{2}, and similarly for y and z components, where s denotes the scalar field. The surface normal is then derived as \mathbf{N} = \normalize(-\nabla s), providing directionality for lighting computations. This approach, foundational to early volume rendering techniques, enables the simulation of surface-like reflections and depth cues in translucent media. Local illumination is computed using models adapted from surface rendering, such as the equation, which decomposes light interaction into ambient, diffuse, and specular terms: I = I_a k_a + I_d k_d (\mathbf{N} \cdot \mathbf{L}) + I_s k_s (\mathbf{R} \cdot \mathbf{V})^n, where \mathbf{L} is the light direction, \mathbf{V} the view direction, \mathbf{R} the reflection vector, and k_a, k_d, k_s, n are material coefficients. Here, I_a, I_d, I_s represent ambient, diffuse, and specular light intensities, respectively. This model approximates photon scattering at each sample point, assigning color based on the estimated normal without requiring explicit geometry. Variants like Blinn-Phong offer computational alternatives for specular highlights while maintaining similar perceptual effects. Support for multiple light sources extends local shading by summing contributions from each: I_{\total} = \sum_i I_i, where each I_i follows the Phong formulation for light i. Additionally, the gradient magnitude |\nabla s| modulates opacity in or models, increasing transparency in low-gradient regions (e.g., interiors) and emphasizing boundaries, which integrates seamlessly with transfer functions for refined visual emphasis. This modulation enhances feature detection in complex datasets, such as scans. For non-photorealistic rendering, gradient-free shading options prioritize illustrative clarity over realism, such as maximum intensity projection (MIP), which selects the highest scalar value along the without normal-based lighting, yielding X-ray-like views ideal for or feature highlighting. This approach avoids computations entirely, reducing artifacts in noisy data while focusing on structural silhouettes.

Compositing and Accumulation

In volume ray casting, compositing involves blending the shaded samples collected along each to compute the final color and opacity, accounting for the partial of volumetric data. This process approximates the rendering by accumulating contributions from multiple samples in a specific order, typically front-to-back or back-to-front, to simulate light transmission through the medium. Front-to-back compositing traverses samples from the viewpoint toward the back of the volume, maintaining an accumulated color C initialized to zero and a transmittance T initialized to 1. For each sample with color c_s and opacity \alpha_s, the updates are given by C \leftarrow C + T \cdot c_s \cdot \alpha_s, \quad T \leftarrow T \cdot (1 - \alpha_s). This weighted accumulation reflects the remaining transmittance after each sample, enabling early ray termination when T falls below a small threshold \epsilon (e.g., 0.01) to improve without significant loss in image quality. An alternative back-to-front compositing accumulates samples in reverse order, starting from the farthest sample and proceeding toward the viewpoint, akin to the painter's algorithm for opaque surfaces. The final color is computed as C = \sum_i c_i \alpha_i \prod_{j > i} (1 - \alpha_j), where the product term represents the cumulative of all samples behind the current one; this method does not support early termination but can leverage hardware alpha blending for implementation. Both approaches rely on the general over operator for alpha blending between successive (color, opacity) pairs (C_a, \alpha_a) and (C_b, \alpha_b): (C_a, \alpha_a) \circ (C_b, \alpha_b) = \left( C_a + (1 - \alpha_a) C_b, \ \alpha_a + (1 - \alpha_a) \alpha_b \right). This ensures correct handling of overlapping transparent contributions, treating the current accumulation as the background for the next sample. To address under- or over-sampling artifacts that can lead to in the final image, techniques such as —casting multiple rays per and averaging results—or adaptive step sizes along rays are employed, though these increase computational cost.

Advanced Techniques

Adaptive Sampling

Adaptive sampling in volume ray casting adjusts the and of samples along rays to optimize computational while preserving rendering , contrasting with fixed-step methods that sample uniformly regardless of local data characteristics. This approach reduces the number of samples in regions where fine detail is unnecessary, such as homogeneous or low-contribution areas, thereby accelerating rendering without significant loss in visual fidelity. Opacity-based adaptation modulates step sizes based on local or accumulated opacity values, allowing larger steps in low-opacity regions where contributions to the final image are minimal. For instance, step sizes can be increased inversely with local opacity to ensure denser sampling only where opacity is high, such as near occluding structures. Additionally, rays can terminate early when accumulated opacity exceeds $1 - \epsilon (typically \epsilon = 0.01 to $0.05), skipping remaining low-contribution segments entirely. This technique, integral to front-to-back compositing pipelines, can reduce rendering time by factors of 1.3 to 2.2 in datasets with sparse opaque features, like medical scans. Gradient-driven sampling refines step sizes according to the magnitude of the |\nabla s|, which indicates local ; smaller steps are taken near high- regions resembling surfaces to capture transitions accurately. The step size is dynamically adjusted based on the direction and a , bounded by minimum and maximum distances to prevent under- or over-sampling. This enhances detail preservation in boundary-heavy volumes, such as data, while coarsening traversal in smooth interiors, achieving efficiency gains of 2-3x over sampling without artifacts. Hierarchical sampling employs a coarse-to-fine strategy, beginning with sparse samples along rays and progressively subdividing those exhibiting high variance or exceeding a . Initial low-resolution passes identify uncertain rays—e.g., via variance in interpolated scalar values—and refine them by casting additional sub-rays or increasing local density. This progressive refinement enables interactive previews with gradual quality improvement. Multi-resolution volumes facilitate level-of-detail (LOD) adaptation by selecting resolution based on ray distance from the viewer, using lower LODs for distant or peripheral rays to minimize samples. Hierarchical representations, such as octree-based MIP-map pyramids, precompute multi-resolution structures where each level reduces resolution; during traversal, the LOD is chosen such that projected size matches screen footprint. This distance-driven approach suits large-scale datasets, like geophysical simulations, cutting memory and sample requirements significantly while maintaining perceptual quality.

Acceleration Structures

Acceleration structures in volume ray casting are designed to expedite ray traversal by identifying and skipping regions of where scalar values fall below an isovalue or opacity , thereby reducing the number of sampling operations required for rendering. These techniques leverage precomputed hierarchical or compressed representations of the volume data to enable large leaps along rays, significantly improving for sparse datasets without compromising image quality. By avoiding unnecessary computations in homogeneous or transparent areas, acceleration structures can achieve substantial speedups, particularly in and scientific visualization applications where volumes often contain substantial empty regions. Empty space leaping (ESL) employs hierarchical data structures, such as octrees or k-d trees, to precompute minimum and maximum scalar values within segments, allowing rays to skip over intervals where the maximum value is less than the specified isovalue or opacity . In this approach, the is recursively subdivided into a tree where each stores the scalar range of its subtree; during traversal, a intersects the tree to find the largest empty segment it can leap, updating the ray's entry and exit points accordingly. This , introduced for accelerating , exploits ray coherence between frames to further optimize leaping decisions, resulting in interactive rendering rates for moderately sized . Octree-based ESL has been shown to provide speedups of up to 10x in sparse datasets like scans. Distance fields provide another effective mechanism for empty space skipping by precomputing signed distance functions (SDFs) that represent the minimum distance from each to the nearest surface defined by an isovalue or opacity boundary. During , the step size along the ray is set to the minimum of the remaining distance to the volume boundary and the safe distance provided by the at the current position, ensuring the ray jumps directly to the next potential intersection without missing opaque regions. This technique, adapted from rendering, enables conservative leaps that maintain accuracy while accelerating traversal in volumes with isolated structures, such as anatomical models, where empty space constitutes a large portion of the data. Adaptively sampled distance fields (ADFs) extend this by hierarchically refining the near surfaces, achieving rendering speedups of up to 20 times compared to uniform sampling in complex scenes. Voxel traversal algorithms facilitate efficient grid walking in uniform or adaptive voxel grids by systematically advancing rays through cells, prioritizing the major axis of movement to minimize computations. The seminal algorithm by Amanatides and Woo advances the ray by calculating parametric distances to the next voxel boundaries in each dimension, stepping along the axis with the smallest delta t and updating only the necessary coordinates, requiring just two comparisons and one addition per voxel crossed. This approach eliminates redundant ray-plane intersections, making it ideal for structured volumes where empty cells can be quickly skipped via simple tests on voxel occupancy. In practice, it supports real-time traversal for 512^3 grids on modern hardware, forming the basis for many GPU-accelerated ray casters. Run-length encoding (RLE) compresses sparse volumes by representing consecutive uniform voxels—particularly empty runs—as compact lists of start positions, lengths, and values, enabling rays to skip entire homogeneous regions in a single operation. In , the volume is encoded into one-dimensional runs along scanlines or hierarchical blocks, and traversal proceeds by decoding runs intersected by the ray to jump over transparent sequences until an opaque run is encountered. This method excels in datasets with long empty stretches, such as simulated volumes, where ratios exceed 10:1 and rendering times are reduced by 5-15 times relative to naive traversal. Hardware implementations, like the VolumePro ASIC, integrate RLE directly into the pipeline for performance on commodity systems.

Ray Marching Approaches

Ray marching approaches represent iterative variants of volume ray casting that advance rays through the volume using variable step sizes guided by distance estimators, enabling efficient handling of sparse, implicit, or procedural data without uniform sampling across the entire domain. These methods differ from fixed-step traversal by adapting steps based on local or , reducing unnecessary computations in while ensuring accurate accumulation of volumetric contributions. The core algorithm for ray marching initializes the ray parameter t = 0 and accumulated opacity \alpha = 0; it then iterates while t < t_{\max} and \alpha < 1, advancing t by \Delta t = \max(\Delta t_{\min}, f(\mathbf{p})), where \mathbf{p} is the current position along the ray and f estimates the distance to the next significant feature, such as a surface or boundary; at each step, the volume is sampled for and color, which are composited into the accumulated result. This framework supports both surface and volumetric rendering by terminating or continuing based on opacity thresholds, with \Delta t_{\min} preventing numerical instability from excessively small steps. Sphere tracing, a prominent ray marching technique for implicit surfaces within volumes, sets the step size to the estimated distance to the surface, \Delta t = |f(\mathbf{p})|, where f is a defining the implicit f(\mathbf{x}) = 0. Introduced for antialiased rendering of height fields and extended to general implicit volumes, the method guarantees that rays do not miss intersections if f is continuous with constant K, as steps are conservatively bounded by |f(\mathbf{p})| / K to avoid overshooting; convergence is linear in the number of steps, typically requiring fewer iterations than fixed-step methods for complex, non-intersecting surfaces like fractals. This approach excels in procedural volumes where explicit voxelization is infeasible, ensuring watertight traversal without precomputation. Signed distance field (SDF) adapts sphere tracing principles to volumetric SDFs, which encode both interior and exterior in a single , marching the ray until |f(\mathbf{p})| < [\epsilon](/page/Epsilon) for a small \epsilon, at which point surface or volume contributions are evaluated and accumulated. This enables compact representation and rendering of intricate procedural volumes, such as fractals or noise-based densities, by evaluating f on-the-fly without storing a full ; for example, in neural , SDF marching integrates with equations to accumulate and along the ray, supporting differentiable optimization for scene fitting. Applications include procedural or volumes, where the method avoids in thin features by refining steps near boundaries. Other variants include constant step marching for uniform media, where \Delta t is fixed proportional to the medium's optical thickness or voxel resolution to ensure consistent sampling in homogeneous densities like fog or isotropic scattering. Hybrids integrate ray marching with distance-based empty space leaping for complex scenes, using coarse SDFs to compute large skips in low-density regions before switching to fine-grained tracing near features, balancing speed and accuracy in multi-material volumes.

Implementations and Applications

Hardware Acceleration

Volume ray casting on central processing units (CPUs) leverages multi-threading to parallelize the processing of ray bundles across multiple cores, enabling efficient handling of large datasets in offline rendering scenarios. SIMD instructions, such as and AVX, are employed to vectorize parallel sample computations along rays, improving throughput for coherent ray sets. However, the inherently serial nature of limits performance on CPUs, making them more suitable for adaptive sampling strategies where computational effort varies per ray. Graphics processing units (GPUs) provide foundational acceleration for volume ray casting through programmable in APIs like with GLSL, , and , where volumetric data is stored as textures and ray integration occurs within fragment . This approach maps screen-space pixels to , through the texture to sample and composite values, achieving interactive frame rates for moderately sized volumes. Early implementations integrated optimizations like empty space skipping and early ray termination directly into code to reduce unnecessary computations. In the , ray-guided volumetrics advanced GPU acceleration by employing hierarchical data structures, such as sparse octrees, to enable efficient skipping during traversal. These methods partition the volume into bricks or nodes, allowing rays to leap over transparent regions, significantly reducing sampling overhead for large-scale datasets while maintaining performance on commodity GPUs. Techniques like SparseLeap further refined this by combining object-order rasterization with image-order , achieving up to 10x speedups over naive implementations through adaptive traversal. Post-2018 hardware ray tracing cores, introduced in NVIDIA's Turing architecture (2018) and AMD's architecture (2020), support hybrid volume casting by accelerating intersection tests with hierarchies for sparse volumes. Subsequent generations, including NVIDIA's (2020), (2022), and Blackwell (2024) architectures with 3rd- and 4th-generation RT cores, and AMD's (2022) and RDNA 4 (2025) with redesigned , further enhance performance for volumetric ray traversal, enabling faster empty space skipping and reduced memory accesses in heterogeneous volumes by factors of 5-20x compared to software-only methods. NVIDIA's OptiX framework utilizes RT cores for ray generation and traversal in programmable pipelines, adaptable to volume primitives via custom hit programs, though primarily optimized for surface geometry. On AMD GPUs, block walking integrates with a traversal algorithm for sparse data. Established frameworks facilitate GPU-accelerated volume ray casting through specialized mappers and kernels. The Visualization Toolkit (VTK) employs its vtkGPUVolumeRayCastMapper, which implements ray casting via OpenGL fragment shaders supporting multi-volume compositing and transfer functions for datasets up to 512^3 voxels at interactive rates. Custom implementations often use OpenCL or CUDA kernels for greater flexibility; comparative studies show CUDA achieving up to 2x faster rendering than OpenGL fragment shaders for 256^3 volumes due to explicit memory management and compute unification. In game engines, plugins extend Unity and Unreal Engine 5 (UE5) with ray marching support, such as Unity's Volume Rendering package for direct volume rendering via compute shaders and UE5's TBRaymarcher for volumetric data visualization. Recent 2020s integrations incorporate denoising techniques for noisy Monte Carlo volume ray casting, where stochastic sampling simulates global effects like scattering; frameworks combine CUDA kernels with neural denoisers to reduce variance, enabling real-time previews from as few as 1 sample per pixel by leveraging spatiotemporal networks for up to 100x noise reduction.

Real-World Examples and Use Cases

Volume ray casting plays a pivotal role in medical imaging, enabling the visualization of complex volumetric data from computed tomography (CT) and magnetic resonance imaging (MRI) scans to support diagnosis and surgical planning. Transfer functions are employed to map scalar values, such as tissue density or intensity, to optical properties like color and opacity, facilitating the differentiation of anatomical structures such as bones, soft tissues, and organs. For instance, GPU-accelerated ray casting has been applied to render CT scans of skulls, MRI scans of brains, and CT scans of jaws, producing high-fidelity 3D views that highlight internal features for clinical analysis. In a specific application, ray casting-based volume rendering has been used to localize abnormalities in human abdomen MRI data, achieving accurate segmentation and visualization of pathological regions through ray traversal and compositing along sampled paths. In scientific visualization, volume ray casting supports the exploration of large-scale datasets from simulations and observations, providing immersive insights into physical phenomena. It is commonly used for rendering fluid dynamics simulations, where ray casting integrates scalar fields like velocity magnitude or vorticity to visualize flow patterns, vortices, and shock waves in computational fluid dynamics (CFD) results from datasets spanning 10–100 MB per time step. For seismic data analysis, the technique generates realistic 3D models of subsurface structures, integrating reflectivity, faults, and stratigraphic features to aid geophysical interpretation and resource exploration. High-quality renders of astrophysical volumes, such as emission nebulae, leverage ray casting to simulate light emission from ionized gases, sampling densities of hydrogen, oxygen, and dust along rays to produce interactive visualizations at approximately 55 frames per second (FPS) on modern GPUs for resolutions up to 1024×768. In games and (VFX), volume ray casting variants enable rendering of atmospheric and procedural elements, enhancing immersion in interactive environments. implements —a form of —for volumetric clouds and fog, allowing dynamic lighting interactions like god rays and shadows cast onto , integrated via shader-based traversal for performance on consumer hardware. Similarly, employs for procedural and volumetric effects, including clouds, by sampling signed fields along rays to construct planetary landscapes with seamless transitions between surface and atmosphere. These approaches support rendering of volumes, contributing to the game's expansive, explorable universe. Performance benchmarks demonstrate the practicality of volume ray casting in demanding scenarios, with GPU implementations achieving interactive rates for substantial datasets. On a Tesla C2070 GPU, multi-volume ray casting of two 512³ datasets at 600×600 exceeds 15 , scalable to higher frame rates on modern hardware for single-volume rendering. Adaptive techniques further enable deployment in resource-constrained settings, such as mobile , where progressive ray casting on devices like the delivers interactive visualization of 512³ datasets at 720×1280 within sub-second completion times per frame, using tiled sampling to balance quality and speed.

References

  1. [1]
    [PDF] Display of Surfaces from Volume Data
    The application of volume rendering techniques to the display of surfaces from sampled scalar func- tions of three spatial dimensions is explored.Missing: original | Show results with:original
  2. [2]
    Volume Rendering With Ray Casting
    Volume rendering is a technique for visualizing sampled functions of three spatial dimensions by computing 2-D projections of a colored semitransparent volume.What is Volume Rendering? · Ray Casting
  3. [3]
    [PDF] Efficient Ray Tracing of Volume Data
    This paper presents a front-to-back image-order volume-rendering algorithm and discusses two techniques for improving its performance. The first technique ...
  4. [4]
    Chapter 39. Volume Rendering Techniques - NVIDIA Developer
    This chapter presents texture-based volume rendering techniques that are used for visualizing three-dimensional data sets and for creating high-quality special ...
  5. [5]
    [PDF] Direct Volume Rendering | CGL @ ETHZ
    Ray Casting is a natural image order technique. Since we have no surfaces in DVR we have to carefully step through the volume. A ray is cast into the volume, ...
  6. [6]
    [PDF] Optical Models for Direct Volume Rendering - Duke Computer Science
    This tutorial survey paper reviews several different models for light interaction with volume densities of absorbing, glowing, reflecting, and/or scattering ...
  7. [7]
    Ray tracing volume densities | ACM SIGGRAPH Computer Graphics
    This paper presents new algorithms to trace objects represented by densities within a volume grid, e.g. clouds, fog, flames, dust, particle systems.
  8. [8]
    V-buffer: visible volume rendering - ACM Digital Library
    This paper presents rendering techniques that use volumes as the basic geometric primitives. It defines data structures composed of numerous subvolumes, ...
  9. [9]
    [PDF] The VolumePro Real-Time Ray-Casting System
    Abstract. This paper describes VolumePro, the worlds first single-chip real-time volume rendering system for PC class computers.
  10. [10]
    [PDF] The Visualization Toolkit An Object-Oriented Approach To 3D ...
    Volume rendering is now extensively supported, including the ability to combine opaque surface graphics with volumes. We have added an extensive image ...<|separator|>
  11. [11]
    [PDF] Volume Visualization and Volume Rendering Techniques - LaBRI
    The ray casting algorithm casts a ray from each pixel on the screen into the volume data along the viewing vector un- til it accumulates an opaque value 4 99 ...
  12. [12]
    [PDF] Different Ray-Casting Algorithm Implementations for Volume ...
    May 20, 2020 · In volume rendering techniques, direct volume rendering techniques (DVR) can be divided into image order and object order. Image order technique ...
  13. [13]
    [PDF] Ray-Guided Streaming for Efficient and Detailed Voxel Rendering
    ... ray-casting solution. Basically, the volume is only used at the ... Display- ing data with pure fixed-step ray marching can lead to alias artifacts.
  14. [14]
  15. [15]
    Ray tracing complex scenes | ACM SIGGRAPH Computer Graphics
    Ray tracing complex scenes. SIGGRAPH '86: Proceedings of the 13th annual conference on Computer graphics and interactive techniques.
  16. [16]
  17. [17]
    [PDF] A Comparison of Gradient Estimation Methods for Volume ...
    Gradient estimation is necessary for rendering shaded isosurfaces and specular highlights, which provide important cues for shape and depth. Gradient ...
  18. [18]
    [PDF] Ray Casting
    Ray casting is a rendering method that. ➢ Creates rays from the eye toward world objects. ➢ Determines the color of the ray using light transport ...<|control11|><|separator|>
  19. [19]
    [PDF] Multi-Dimensional Transfer Functions for Interactive Volume ...
    There are an upper and lower threshold for the gradient magnitude, as well as a shear. Color is constant across the widget; opacity is maximal along the center.
  20. [20]
  21. [21]
    [PDF] Non-Photorealistic Volume Visualization
    Then the maximum intensity projection is used for composit- ing so that all contours are visualized regardless of opacity. Figure 12: Volumetric contour of a ...
  22. [22]
    [PDF] Computer Graphics Volume 18, Number 3 July 1984 - keithp.com
    Computer Graphics Volume 18, Number 3 July 1984. Compositing. Digital Images. Thomas Porter. Tom Duff 'f. Computer Graphics Project. Lucasfilm Ltd. ABSTRACT.
  23. [23]
    Anti-aliasing on deformed area using adaptive super sampling ...
    Sep 14, 2011 · To reduce this artifact, we apply the adaptive super sampling method to deformed area. We divide view plane into several areas and applied ...
  24. [24]
    [PDF] Hierarchically Accelerated Ray Casting for Volume Rendering with ...
    Mar 31, 1995 · Abstract. Ray casting for volume rendering can be accelerated by taking large steps over regions where data.
  25. [25]
    A Novel Ray‐Casting Algorithm Using Dynamic Adaptive Sampling
    Oct 14, 2020 · Ray-casting algorithm is an important volume rendering algorithm, which is widely used in medical image processing.Missing: seminal | Show results with:seminal
  26. [26]
    Volume rendering by adaptive refinement | The Visual Computer
    This paper presents a volume-rendering algorithm, in which image quality is adaptively refined over time. An initial image is generated by casting a small ...
  27. [27]
    [PDF] Adaptively Sampled Distance Fields: A General Representation of ...
    We use a ray casting volume renderer to demonstrate some of these effects. Colors and opacities are accumulated at equally spaced samples along each ray using a ...<|separator|>
  28. [28]
    [PDF] A Fast Voxel Traversal Algorithm for Ray Tracing
    In this paper, we introduce a fast and simple incremental grid traversal algorithm. Like Fujimoto et. al.,7, 8 it is a variant of the DDA line algorithm.
  29. [29]
  30. [30]
    None
    ### Key Points on Ray Marching with SDFs for Volume Rendering
  31. [31]
    [PDF] A Geometric Method for the Antialiased Ray Tracing of Implicit ...
    Jul 28, 2015 · Sphere tracing is a new technique for rendering implicit surfaces using geometric distance. Distance-based models are common in ...
  32. [32]
    [PDF] VolRecon: Volume Rendering of Signed Ray Distance Functions for ...
    In this paper, we propose VolRecon, a novel framework for generalizable neural implicit reconstruction using the. Signed Ray Distance Function (SRDF). Unlike ...
  33. [33]
    Embree ray tracing kernels for CPUs and the Xeon Phi architecture
    Modern CPUs achieve high computational throughput by implementing increasingly wide SIMD vector units (such as 8-wide AVX or 16-wide SIMD for the Xeon Phi ...Missing: casting | Show results with:casting
  34. [34]
    [PDF] Acceleration Techniques for GPU-based Volume Rendering
    In this paper, we address the integration of early ray termination and empty-space skipping into texture based volume rendering on graphical processing units ( ...Missing: run seminal
  35. [35]
    An Analysis of Scalable GPU-Based Ray-Guided Volume Rendering
    As an example, empty space skipping works considerably better with smaller bricks sizes, but disk throughput drops sharply with small requests. Compression can ...
  36. [36]
    [PDF] Efficient Empty Space Skipping for Large-Scale Volume Rendering
    The ray-casting stage then leaps over empty space without hierarchy traversal. Ray segment lists are created by rasterizing a set of fine-grained, view- ...
  37. [37]
    NVIDIA Turing Architecture In-Depth | NVIDIA Technical Blog
    Sep 14, 2018 · Turing GPUs introduce new RT Cores, accelerator units that are dedicated to performing ray tracing operations with extraordinary efficiency, ...
  38. [38]
    [PDF] NVIDIA TURING GPU ARCHITECTURE
    introduction of RT Cores and Tensor Cores, Turing hardware enables real-time ray tracing for lighting and the use of AI for image enhancement and other ...
  39. [39]
    [PDF] Sparse Volume Rendering using Hardware Ray Tracing and Block ...
    Dec 14, 2021 · The method uses ray-tracing hardware, a novel data structure, and block walking to efficiently render sparse volumetric data, avoiding repeated ...
  40. [40]
    vtkGPUVolumeRayCastMapper Class Reference - VTK
    vtkGPUVolumeRayCastMapper is a volume mapper that performs ray casting on the GPU using fragment programs. This mapper supports connections in multiple ports of ...Missing: integration history
  41. [41]
    (PDF) A Comparison between GPU-based Volume Ray Casting ...
    Aug 6, 2025 · The main used method nowadays for volume rendering is ray casting. Nevertheless, there are a variety of parallel APIs that can be used to ...Missing: variants | Show results with:variants
  42. [42]
    Real-Time Volume-Rendering Image Denoising Based on ... - NIH
    Apr 21, 2025 · A spatiotemporal lightweight neural network is proposed to enhance the denoising performance of VPT-rendered images with low samples per pixel.Missing: casting 2020s
  43. [43]
    Medical images rendered with the GPU-based raycasting: a CT skull ...
    The main core of this algorithm is to generate a single ray per screen pixel and to trace this ray through the volume on a GPU fragment shader.
  44. [44]
    [PDF] Ray Casting Based Volume Rendering of Medical Images
    Mar 6, 2021 · This paper proposes a ray casting algorithm for accurate allocation and localization of human abdomen abnormalities using magnetic resonance ...
  45. [45]
    [PDF] State of the Art in Transfer Functions for Direct Volume Rendering
    Abstract. A central topic in scientific visualization is the transfer function (TF) for volume rendering. The TF serves a fundamental role.<|control11|><|separator|>
  46. [46]
    [PDF] Volume Rendering for Computational Fluid Dynamics: Initial Results
    Sep 9, 1991 · 1.0 Abstract. This work describes a direct volume rendering technique adapted for visualization of results from Computational Fluid Dynamics ...
  47. [47]
    Study of 3-D seismic volume visualization with Ray Casting
    In this paper, 3- D seismic volume visualization with Ray Casting Algorithm is mainly studied and realized. Software has been applied to real data. This ...
  48. [48]
    [PDF] A rendering method for simulated emission nebulae - DiVA portal
    An appropriate technique for volume rendering is ray casting [10]. Ray casting works by casting rays through the data set (volume) and sampling the volume ...
  49. [49]
    Clouds via ray marching - Unreal Engine Forums
    Dec 16, 2014 · I am porting a shader to render clouds in UE4. It is still in progress about detail lighting. The method is based on ray marching, and it's source code is ...Missing: Sky terrain
  50. [50]
    No Man's Sky Patch 5.0 Adds Volumetric Clouds, Detailed Shadows ...
    Jul 17, 2024 · Terrain generation has been rewritten to incorporate dual marching cubes voxel meshing, increasing loading speed, improving framerate and saving ...
  51. [51]
    GPU-based multi-volume ray casting within VTK for medical ...
    The proposed multi-volume GPU-based ray caster for VTK provided high-quality images at reasonable frame rates. The MVRC was effective when used in a ...Missing: history | Show results with:history
  52. [52]
    [PDF] Progressive Ray Casting for Volumetric Models on Mobile Devices
    To do so, we present a progressive ray casting method that is able to obtain interactive frame rates and high quality results for models that not long ago were ...