Volume Ray Casting - Basic Algorithm

Basic Algorithm

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

  1. 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.
  2. 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).
  3. Shading. For each sampling point, a gradient of illumination values is computed. These represent 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.
  4. 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. It works back-to-front, i.e. computation starts with the sample farthest from the viewer and ends with the one nearest to him. This work flow direction ensures that masked parts of the volume do not affect the resulting pixel.

Read more about this topic:  Volume Ray Casting

Famous quotes containing the word basic:

    We can’t nourish our children if we don’t nourish ourselves.... Parents who manage to stay married, sane, and connected to each other share one basic characteristic: The ability to protect even small amounts of time together no matter what else is going on in their lives.
    Ron Taffel (20th century)