Go to AVS Home Page
 Recent Releases
OpenViz 2.8 Released
AVS/Express 7.2 Released
Toolmaster 7.5.3 Released
AVS 5.7 Released
 Contact Support
 Licensing
Information on licensing AVS 
products
 
Interact with the AVS Developer 
community. Takes you out of 
the support web site

 


AVS Technote

Volume Rendering in AVS5


Introduction

Volume Rendering has become a critical visualization technique for much of the AVS community. AVS5 has several enhancements in it which make volume rendering more efficient and broaden the range of available techniques. These enhancements include: more efficient memory usage enabling the rendering of larger volumes; rendering 8-bit volumes directly rather than pre-colorizing them; and the addition of the SunVision cube volume renderer as an AVS module.

Volume rendering is the creation of images directly from three-dimensional arrays of data without converting to an intermediate, polygon-based data format. In general, volume rendering can be performed more quickly than traditional polygon rendering (approaching 750,000 voxels per second for most software-based renderers) but has the reputation for being somewhat slower since the data sets tend to be Megabytes to tens of Megabytes in size. AVS customers use volume rendering regularly in fields such as Medical Imaging, Seismology and Non-destructive Evaluation. Volumes typically come from three-dimensional scanning systems such as CAT (Computed Axial Tomography), MRI (Magnetic Resonance Imaging), or LCM (Laser Confocal Microscopy) or some directly from three-dimensional simulations.

Volume Rendering and AVS

AVS5 provides four volume renderers each with different performance characteristics. It is the intent of this article to discuss each renderer, point out their strengths and weaknesses, and provide clues of how to most effectively use these tools. The volume renderers supported by AVS5 are: tracer, ucd tracer, volume render, and cube.

In previous versions of AVS, volume rendering was often inefficient due to unnecessary data magnification for functions such as gradient shading and voxel colorizing. Large (10 MByte) data sets would get multiplied up to 21 times prior to rendering. This number breaks down into: the original 1 byte per voxel plus 4 bytes for colorizing, 12 bytes for the gradient information, and 4 bytes for the gradient shaded voxels. The allocation of unnecessarily large amounts of data frequently caused memory paging problems which limited the performance of the rendering modules.

AVS5 solves most of these problems by:

  1. allowing all volume rendering techniques to accept raw, 8-bit data (so there is no data multiplication prior to rendering)
  2. not allocating and replicating the data within within the modules.

Now, it is readily possible to render a 16 Mbyte data set on a 32Mbyte workstation.

A session involving volume rendering should be a process of refinement: start off with the data set decimated to a low resolution and the output window fairly small. A new tool, average down, is provided as an alternative to the downsize module for this purpose. After you have selected your positioning and rendering parameters at low resolution, begin increasing both the data set size as well as the output image size. Most of the AVS5 rendering tools will provide you with low-resolution images in a couple of seconds, but may take between three and five minutes to compute a high resolution image.

Discussion of Tools

Here is a break-down of the volume rendering tools available in AVS5 along with information regarding their advantages, disadvantages, and suitability for certain tasks.

TRACER

METHOD

tracer is a software renderer which does ray-tracing on semi-transparent voxels. When not in interpolate mode, each voxel is assumed to be a constant opacity. In interpolate mode, the distance the ray travels through each voxel is computed and the opacity is determined based on surrounding data nodes.

ADVANTAGES
  1. Very high quality. interpolate mode produces some of the best images of any commercial volume renderer.
  2. Takes in 8-bit or 32-bit data.
  3. Can do perspective rendering.
DISADVANTAGES
  1. gradient shading is computed externally, effectively multiplying the data size by 4.
  2. Geometries cannot be rendered in the same image as the volume.
MEMORY CONSUMPTION
  1. On the Stellar-GS, it is very bad since it converts the data to floating point for fast rendering speeds.
  2. On other systems, there is no overhead other than possibly colorizing or gradient shading external to the module.
PERFORMANCE:
  1. is based on the size of the output window
  2. interpolate mode is approximately 4x slower than not using interpolation
  3. can achieve rates of up to 700,000 VPS (Voxels/Second)
  4. has a bad reputation because earlier versions needed colorized, 32-bit data (especially for gradient shading) but these days is quite efficient.
TYPES OF DATA BEST SUITED FOR:
  1. Data where voxels are considered to be semi-transparent gels.
  2. Continuous density volumes like temperature, density, which may come from CFD type problems.
  3. Can be used for medical, seismic, but other tools may be better.
USAGE HINTS:

Shading is accomplished by shading the voxels external to the module. This used to be a complicated, memory inefficient process involving colorizer, compute gradient, and gradient shade. In AVS5, it is recommended that the compute shade module be used. This will create a new dataset four times the size of the original one.

UCD TRACER

METHOD

ucd tracer is a version of the tracer module which traces tetrahedra rather than cubic cells. As a result, it can be used for creating volume renderings of UCD structures (converted to tetrahedra) and rectilinear and irregular field structures (once converted to UCD).

ADVANTAGES
  1. Very high quality.
  2. The only supported AVS technique for directly rendering irregular data. (The International AVS Center has other irregular field volume rendering techniques available as public domain modules.)
DISADVANTAGES
  1. Converting irregular fields into a UCD structure and then converting that to tetrahedra consumes a large amount of memory. This is only advised for small or downsized data sets.
  2. Gradient shading is computed externally effectively multiplying the data size by 4.
  3. Geometries cannot be rendered in the same image as the volume.
MEMORY CONSUMPTION
  1. This technique does consume a lot of memory and is not recommended for large data sets.
PERFORMANCE
  1. is based on the size of the output window
TYPES OF DATA BEST SUITED FOR
  1. Irregular field data and UCD structures where the data varies continuously from cell to cell (rather than data which has specific "surfaces").
USAGE HINTS

A typical network for rendering irregular fields is:

                       READ FIELD                GENERATE COLORMAP
                           |                            |

                        DOWNSIZE                        |
                           |                            |

                      FIELD TO UCD                      |
                           |                            |

                     UCD HEX TO TET                     |
                           |                            |
                              --------------------------
                           |  |
                       UCD TRACER
                           |

                     DISPLAY TRACKER

CUBE

METHOD

cube is the SunVision CUBEtool and is essentially a semitransparent isosurface ray tracer. In the ray-trace mode, a ray travels until it hits a surface (threshold) it cares about, computes the local gradient, shades it, and stops if the accumulated opacity is greater than 1.0. It is fast, memory efficient, and has some novel rendering modes.

ADVANTAGES
  1. Several rendering modes: texture mapping, maximum projection (x-ray), ray-tracing, and create-surfaces.
  2. An arbitrary (oblique) slice plane which affects all modes.
  3. Create surface mode allows for: (a) instant opacity, color, and slice plane modifications, (b) certain number of surface intersections to be ignored.
  4. Very memory efficient and handles large volumes well.
DISADVANTAGES
  1. Geometries cannot be intermingled.
  2. Images take more work (fine adjustment of parameters) to look as good as other techniques.
MEMORY CONSUMPTION
  1. uses no additional memory (except in create surfaces mode - in which case an additional memory segment the size of the window but several levels deep is also allocated) and therefore works well for large volumes.
PERFORMANCE:
  1. texture map mode is instantaneous, maximum is also very good.
  2. trilinear mode is approximately 4 times slower than not.
  3. create surfaces mode is approximately 4 times slower than ray-cast mode.
  4. generally comparable to tracer.
TYPES OF DATA BEST SUITED FOR
  1. Data which has distinct surfaces in it and known values. Medical data and Seismic data are good examples.

VOLUME RENDER

METHOD

volume render uses 3D alpha-texture maps in the geometry viewer to composite each slice of the volume as an alpha-texture mapped plane. This requires the software renderer on all platforms which do not have 3D alpha texture mapping.

ADVANTAGES
  1. Geometries can be mixed into the rendered image.
  2. It can now take in either 32-bit data or 8-bit data and colorize on the fly.
DISADVANTAGES
  1. There is no interpolate mode: when the size of the image exceeds the size of the volume, voxel artifacts become visible
  2. It has a reputation for being very slow. This is probably due to the fact that the default geometry viewer window size is 512x512 and in general, smaller windows are used for initial viewings. If the window size is reduced to typical cube or tracer window sizes (64x64, 200x200), then the performance is com parable to that of the other volume renderers.
  3. Shading is difficult since, like tracer, the gradient shading must be done externally (which uses lots of memory), and also since it is difficult to get the light direction from the geometry viewer up to the gradient shade module. This results in different light directions for the volume than the other objects in the scene.
  4. Not useful if you want to put up a volume with isosurfaces and slice planes and move a probe around in it. Right now, every time the probe moves, the volume has to get re-rendered.
MEMORY CONSUMPTION
  1. Good if it is not pre-colorized before coming to the geometry viewer.
PERFORMANCE
  1. See #2 above in disadvantages. It is perceived as being very slow, but that could mostly be due to unrealistic expectations.
TYPES OF DATA BEST SUITED FOR
  1. Data with the slice planes close together. You will see slice plane artifacts under certain opacity and transformation conditions.
USAGE HINTS:

Use bounding box mode in the geometry viewer to position the object. Start off with small windows and pump the output to the image viewer to scale the image up.

3D texture-mapping: brick, excavate brick, etc.

METHOD

This is not volume rendering per se, but is included since you can do very fast slices at data resolu tion (unlike arbitrary slice whose mesh-size is variable or orthoslice which produces large amounts of polygons for high-resolution data sets.) This is only valid in hardware rendering on machines with 3D textures but available under software rendering on all platforms.

ADVANTAGES
  1. very fast, even with the software renderer.
  2. can be intermingled with other geometries
  3. can now take in either 32-bit data or 8-bit data and colorize on the fly.
  4. can use alpha-textures
DISADVANTAGES
  1. no interpolated mode.
  2. the use of alpha-textures is not currently easy.
  3. not true volume rendering. Only applies to surfaces you provide (slice planes, etc.)
MEMORY CONSUMPTION
  1. Like volume render, good if the data is not pre-colorized prior to coming to the geometry viewer.
PERFORMANCE
  1. Extremely good.
  2. Near-interactive rendering rates even with the software renderer on most systems.
TYPES OF DATA BEST SUITED FOR
  1. Does not matter.

Feature Summary Table

Here is a table of the techniques with a general overview of how well that technique performs in each category. 'E' means Excellent, 'G' means Good, 'P' means Poor.

Technique Quality Memory Usage Performance Merged Geoms
cube-texture maps G E E no
cube-maximum G E E no
cube-ray trace E E G no
cube-create surfaces E G P,E no
tracer E G G no
ucd tracer G P P no
volume render G G G yes
3D texture mapping G G E yes

The create surfaces mode gets a P and an E for performance because it takes a while to create the initial picture, but after that, you can modify the substance opacities, colors, and oblique slice plane within a second or two.

Performance Benchmarks

Here is a series of timing tests run on a SUN Sparc-2 with 32 Mbytes of memory. The test data set is 128x128x128 voxels (2.1 Mbytes). Tests were done at various output image resolutions.

Technique 128x128 256x256 512x512
Cube - Texture Mapping .5 1.0 2.0
Cube - Maximum 4.0 13.0 57.0
Cube - Ray Casting No Features 8.0 32.0 153.0
Cube - Ray Casting Fully Featured 19.0 73.0 303.0
Tracer - No Features 6.2 19.2 95.0
Tracer - Fully Featured 73.0 139.0 425.0
Volume Renderer 15.6 60.2 221.0

Note: Fully Featured means "gradient shaded and with trilinear interpolation turned on". No features means "point sampling and no shading".