Volume graphic

from Wikipedia, the free encyclopedia
Pictorial illustration of a voxel grid. Each voxel indicates the light transmission at a point on the object. Black stands for transparent, white for opaque (opaque).

The volume rendering is a field of 3D computer graphics . In volume graphics, objects are modeled using voxel grids .

meaning

The volume graphic is able to (partially) transparent objects - e.g. B. translucent skin tissue - and objects without sharp boundaries - such. B. Clouds - to be modeled and depicted with high accuracy and realism. It is of great importance for imaging processes , as these naturally generate voxel data, otherwise it is not very widespread. This is due to the fact that up to now there has been no device-based acceleration, as is common practice with graphics processors for surface graphics .

Physical basis

The volume graph is based on radiation transport , which describes how light behaves on its way through a volume and the quintessence of which is the radiation transport equation:

Since the calculation of the transport equation requires too much computational effort, the volume graphic initially makes three simplifications:

  • Voxels are only illuminated directly by light sources . Indirect lighting due to scattering and reflection from other voxels is not taken into account.
  • There are only direct light sources, no fluorescent or self-luminous objects within the scene.
  • The lighting is described by a simple lighting model; The Phong lighting model has proven itself .

With the scattering, the vectors of the equation can now also be ignored; vividly, one only follows a ray of light that never changes direction . This allows the transport equation to be converted into the simpler visualization equation:

This differential equation can be solved analytically. This solution is discretized and some smaller terms are estimated. The result is the following recursive formula used for rendering:

C out = C k α k + (1 - α k ) C in

which is usually given in shorthand with the over operator :

C out = C k over C in

Rendering

steps

There are four steps involved in rendering volume graphics:

The sequence of these steps is not mandatory, generally only the two rules apply: The classification must take place before the shading and the compositing comes last.

classification

During the classification, material properties are assigned to the voxels . When generating a voxel, only a single value is read off, for example the X-ray density in computed tomography and the content of protons or hydrogen atom nuclei in magnetic resonance tomography . This value does not provide enough information about the material, such as what color it is or whether it is highly reflective. During the classification, a whole series of values ​​is made from the individual value according to user specifications. If, for example, the high value of a voxel stands for a high water content , one could deduce from this that it is soft body tissue that is in turn slightly pink, somewhat transparent and not at all reflective. The material is usually characterized using the Phong lighting model .

Shading

When shading (engl. "Shading") is determined how much light is reflected from a voxel in the direction of the viewer and what color it is. Phong shading is usually used for this . In order to be able to use the Phong shading in its original definition, every voxel would need a normal. The normal is a vector that points perpendicularly away from the observed surface in the surface graphic. Since there are no surfaces in the volume graphic, a different approach has to be followed here. Instead of the normal, the gradient is therefore used in each voxel . The gradient always points in the direction of the greatest change in material and thus comes closest to the physical idea that light is only reflected at the transition between different material layers.

interpolation

During interpolation, also known as resampling , the material properties are approximated to points between the voxels from the surrounding voxels. Voxels are points and thus zero-dimensional objects, that is, they have neither length nor width nor height. As a result, it is extremely unlikely that a line of sight passing through the volume would hit a single voxel. The interpolation method defines how information about the space between them is obtained from the voxels. In volume graphics, linear interpolation is predominant; interpolation is linear between two voxels , bilinear between four voxels that form a rectangle, and trilinear interpolation between eight voxels that form a cuboid .

Compositing

In compositing ("mixing"), the light contributions supplied by voxels lying in a row are offset against each other in order to obtain a final image point . The compositing implements the actual summation of the visualization equation: light traverses a voxel and changes intensity and color in the process, then it traverses the next voxel and in turn changes intensity and color. This series is continued until the light falls on the image plane and colors a pixel there.

techniques

Volume raycasting

Over time, four techniques have been developed to render voxel data:

  • Volume raycasting . Similar to ray tracing , visual rays are thrown into the volume. After the interaction of the light with the volume has been calculated, the contributions along the line of sight are added up and thus result in a pixel in the image.
  • Splatting . The voxels are thrown one after the other onto the image surface, where they burst into a splat and distribute their color contribution to several adjacent pixels of the image.
  • Shear warp . The voxel grid itself is sheared and distorted according to the perspective, then a line of sight is sent into the volume for each pixel. Due to the shear and the distortion of the grating, the line of sight runs parallel to the axes within the volume and can therefore be calculated very easily.
  • 3D texture mapping . Instead of using a volume rendering technique, a primitive is created here and the voxel data is assigned to it as a 3D texture. The visualization of the volume then takes place via the texturing within the framework of the normal surface graphics.

A distinction is made between image-based and object-based techniques, depending on whether the calculation is based on the image or the volume, as well as mixed forms of the two. Volume raycasting is an image-based process, splatting is an object-based process, and shear warp and 3D texture mapping are mixed forms.

Extensions

Volume graphic of a mouse skull

Casting shadows in voxel graphics is not a trivial task. The shadow volume and Z-buffer shading techniques used in surface graphics are not applicable here because they require opaque surfaces. To date there are only two procedures that are reasonably simple:

Grant's technique calculates a shadow cast using a single light source that casts parallel light into the scene from an angle of 45 ° relative to the viewing direction of the observer, i.e. is infinitely far away. First a Z-buffer is set up for the foremost vertical slice of the volume, which is initialized with the value 1 everywhere. The shading is now calculated for this slice by calculating the radiation in the direction of the viewer as (luminous intensity of the incident light) * (value in the Z-buffer) for each voxel. Now the Z-buffer is shifted one voxel to the side away from the light source and backwards. The absorption by the voxel directly in front of it in the direction of the light source is subtracted from each value in the Z-buffer. The radiation calculation follows, followed by a further shift, etc.

Meinzer's technique works in a similar way to Grant's technique, but uses an additional light source behind the viewer himself, which is in the same plane as the oblique light source. This allows the required Z-buffer to be reduced to a row of voxels. The shadow is brightened by the additional light source.