ArticleslgStudy

science

Volume ray casting

Volume ray casting is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Volume ray casting rather than just read about it. In short: Volume ray casting, sometimes called volumetric ray casting, volumetric ray tracing, or volume ray marching, is an image-based volume rendering technique. It computes 2D images from 3D volumetric data sets (3D scalar fields).

Volume ray casting — main illustration
Volume ray casting — illustration

Key takeaways

  • Volume ray casting belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Volume ray casting to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Volume ray casting from memory before moving on to harder problems.

Reference excerpt

Volume ray casting, sometimes called volumetric ray casting, volumetric ray tracing, or volume ray marching, is an image-based volume rendering technique. It computes 2D images from 3D volumetric data sets (3D scalar fields). Volume ray casting, which processes volume data, must not be mistaken with ray casting in the sense used in ray tracing, which processes surface data. In the volumetric variant, the computation doesn't stop at the surface but "pushes through" the object, sampling the object along the ray. Unlike ray tracing, volume ray casting does not spawn secondary rays. When the context/application is clear, some authors simply call it ray casting. Because ray marching does not necessarily require an exact solution to ray intersection and collisions, it is suitable for real-time computing for many applications for which ray tracing is unsuitable.

Classification The technique of volume ray casting can be derived directly from the rendering equation. It provides results of very high quality rendering. Volume ray casting is classified as an image-based volume rendering technique, as the computation emanates from the output image and not the input volume data, as is the case with object-based techniques.

Basic algorithm

In its basic form, the volume ray casting algorithm comprises four steps:

Ray casting. For each pixel of the final image, a ray of sight is shot ("cast") through the volume. At this stage it is useful to consider the volume being touched and enclosed within a bounding primitive, a simple geometric object — usually a cuboid — that is used to intersect the ray of sight and the volume. Sampling. Along the part of the ray of sight that lies within the volume, equidistant sampling points or samples are selected. In general, the volume is not aligned with the ray of sight, and sampling points will usually be located in between voxels. Because of that, it is necessary to interpolate the values of the samples from its surrounding voxels (commonly using trilinear interpolation). Shading. For each sampling point, a transfer function retrieves an RGBA material colour and a gradient of illumination values is computed. The gradient represents the orientation of local surfaces within the volume. The samples are then shaded (i.e. coloured and lit) according to their surface orientation and the location of the light source in the scene. Compositing. After all sampling points have been shaded, they are composited along the ray of sight, resulting in the final colour value for the pixel that is currently being processed. The composition is derived directly from the rendering equation and is similar to blending acetate sheets on an overhead projector. Optimizations.

It may work back-to-front, i.e. computation starts with the sample farthest from the viewer and ends with the one nearest to the viewer. This work flow direction ensures that masked parts of the volume do not affect the resulting pixel. The front-to-back order could also be more computationally efficient since, the residual ray energy is getting down while ray travels away from camera; so, the contribution to the rendering integral is diminishing therefore more aggressive speed/quality compromise may be applied (increasing of distances between samples along ray is one of such speed/quality trade-offs).

Advanced adaptive algorithms The adaptive sampling strategy dramatically reduces the rendering time for high-quality rendering – the higher the quality and/or size of the data-set, the more significant the advantage over the regular/even sampling strategy. However, adaptive ray casting upon a projection plane and adaptive sampling along each individual ray do not map well to the SIMD architecture of modern GPU. Multi-core CPUs, however, are a perfect fit for this technique, making them suitable for interactive ultra-high quality volumetric rendering.

Examples of high quality volumetric ray casting

This gallery represents a collection of images rendered using high quality volume ray casting. Commonly the crisp appearance of volume ray casting images distinguishes them from output of texture mapping VR due to higher accuracy of volume ray casting renderings.

The CT scan of the crocodile mummy has resolution 3000×512×512 (16bit), the skull data-set has resolution 512×512×750 (16bit).

Ray marching

The term ray marching is more broad and refers to methods in which simulated rays are traversed iteratively, effectively dividing each ray into smaller ray segments, sampling some function at each step. These methods are often used in cases where creating explicit geometry, such as triangles, is not a good option.

Other examples of ray marching In SDF ray marching, or sphere tracing, an intersection point is approximated between the ray and a surface defined by a signed distance function (SDF). The SDF is evaluated for each iteration in order to be able take as large steps as possible without missing any part of the surface. A threshold is used to cancel further iteration when a point has reached that is close enough to the surface. This method is often used for 3D fractal rendering. When rendering screen space effects, such as screen space reflection (SSR) and screen space shadows, rays are traced using G-buffers, where depth and surface normal data is stored per each 2D pixel.

See also Amira – commercial 3D visualization and analysis software (for life sciences and biomedical) that uses a ray-casting volume rendering engine (based on Open Inventor) Avizo – commercial 3D visualization and analysis software that uses a ray-casting volume rendering engine (also based on Open Inventor) Shadertoy - online community and platform for Computer graphics professionals, academics and enthusiasts who share, learn and experiment with rendering techniques and procedural art through GLSL code Volumetric path tracing

References

External links Acceleration Techniques for GPU-based Volume Rendering (J. Krüger, R. Westermann, IEEE Visualization 2003) A single-pass GPU ray casting framework for interactive out-of-core rendering of massive volumetric datasets (E. Gobbetti, F. Marton, J.A. Iglesias Guitian, The Visual Computer 2008)

Illustrations

Volume ray casting: Crocodile mummy provided by the Phoebe A. Hearst Museum of Anthropology, UC Berkeley. CT data was acquired by Dr. Rebecca Fahrig, Department of Radiology, Stanford University, using a Siemens SOMATOM Definition, Siemens Healthcare. The image was rendered by Fovia's High Definition Volume Rendering® engine
Crocodile mummy provided by the Phoebe A. Hearst Museum of Anthropology, UC Berkeley. CT data was acquired by Dr. Rebecca Fahrig, Department of Radiology, Stanford University, using a Siemens SOMATOM Definition, Siemens Healthcare. The image was rendered by Fovia's High Definition Volume Rendering® engine
Volume ray casting illustration
Volume ray casting illustration
Volume ray casting illustration
Volume ray casting: Visualization of SDF ray marching algorithm
Visualization of SDF ray marching algorithm

Worked examples

Example 1 — a first encounter with Volume ray casting

Start with the simplest possible case. Write down what Volume ray casting claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Volume ray casting before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Volume ray casting ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Volume ray casting

In research
Volume ray casting appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Volume ray casting in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Volume ray casting is common in secondary-school and first-year university syllabi. It links to neighbouring topics 3D imaging, so understanding it makes those chapters shorter.
In everyday life
Look for Volume ray casting outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Volume ray casting” →

How to study Volume ray casting in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Volume ray casting means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Volume ray casting out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Volume ray casting in simple terms?

Volume ray casting, sometimes called volumetric ray casting, volumetric ray tracing, or volume ray marching, is an image-based volume rendering technique. It computes 2D images from 3D volumetric data sets (3D scalar fields).

Why does Volume ray casting matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Volume ray casting?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Volume ray casting.

Tags

  • 3D imaging

Keep exploring