new abuffer - ray tracing volume renderer

Name

     new abuffer - ray tracing volume renderer

Summary

     Name	   new abuffer

Type

  mapper

Inputs

   Volume Data; field uniform 3D 4-vector byte (REQUIRED)

Outputs

   Image Data; field uniform 2D 4-vector float

Parameters

   
     Name              Type        Default       Min       Max
     X Rotation        float       0.0           -360.0    360.0
     Y Rotation        float       0.0           -360.0    360.0
     Z Rotation        float       0.0           -360.0    360.0
     Scale             float       1.0           0.0       4.0
     Image Size        integer     128           32        1024
     Antialias         choice      off           off,on
     Projection        choice      parallel      parallel,perspective
     Rendering Style   choice      volume only   volume only,hull only,
                                                     volume & hull

Description

     The new abuffer module is a ray tracing volume renderer.  Volumes
     of three dimensional color information are composited on a pixel
     by pixel basis, resulting in an image of a translucent solid,
     the signature of volume rendering.   
     The module will compute a set of faces which bound the rectangular
     shaped volume hull, and perform ray intersections with this volume
     at each pixel location.  For those pixels in which an intersection
     occurs, the "volume function" is integrated through the volume, the
     the resulting color information is stored at that pixel location.
     The module passes the vertices defining the volume hull (boundary)
     through a viewing transformation, taking the vertices from their
     native data space into one defined by a canonical view volume.
     Further, the center of the volume is placed into the center of the
     resulting image.  The user can control the orientation of the
     volume, as well as specify isometric volume scaling.
INPUTS
     Volume Data ; field uniform 3D 4-vector byte
	The input data consists of a three dimensional "image".  The
	image is interpreted as consisting of points of color information
	consisting of red, green, blue and opacity information.  The
        red, green, and blue components of that data indicate the
        color of the "voxel", while the opacity component indicates
        how "opaqe" the voxel is.  Voxels which are more opaque will
        occlude other voxels, while voxels which are more transparent
        can be "seen through."
PARAMETERS
     X,Y,Z Rotation  (float)
	These dials are provided so that the volume may be arbitrarily
        oriented.  As of 25 Apr 1991, the Z rotation dial is ignored.
     Scale (float)
        This dial controls the isometric scaling of the hull which
        bounds the volume data.  Increasing the value of this parameter
        will make the volume appear uniformly larger.
     Image Size (integer)
        This dial controls the size of the resulting image.  The image
        is always square (could be easily changed in the code to allow
        for rectangular images).  Note that the run time of this
        algorithm is proportional to the image size.  Increasing the
        size of the image will slow the module down by a factor of 4
        for each doubling of image size.
     Antialias Control (choice)
        These buttons control whether or not to antialias.  When antialiasing
        is "off", integration of the volume function occurs by stepping
        through the voxels along the intersecting ray.  At each sample
        step, the voxel color and opacity information is accumulated
        using a compositing operator.  When antialias is selected, the
        voxels are treated more as a "volume function", rather than
        as an array of colors.  When integrating a the "volume function",
        all surrounding voxels are taken into account (by use of a
        3-d box filter) when computing the volume function at each sample
        step along the integrating ray.  Turning antialiasing on
        generally (depends on the data, and its resolution) results
        in noticeably better images, at the expense of increased 
        execution time.
     Projection Type (choice)
        The user may select between parallel and perspective projeciton.
        In perpspective projection, parallel lines meet at infinity.  This
        means that the part of the volume which is "further away" from
        the viewer will appear smaller than that part of the volume
        which is closer to the viewer.  There is no effect on run time
        when switching from one to the other.  Some scaling adjustment
        may be necessary, however, when swiching between projection
        modes.
     Rendering Options (choice)
        The user can choose to have only the volume data displayed, only
        the bounding hull, or both.  The hull of the volume is simply the
        faces which bound the data.  The hull renderer is crude, and looks
        terrible at low resolution.
OUTPUTS
     Image Data (field uniform 2D 4-vector float)
        The module produces a floating point image as a result.  All
        components of each pixel are in the range 0..1.  Some kind of
        post-processing is generally required in order to display the
        data (like field to byte, or the more appropriate 
        "float image to byte" module written especially for this
        purpose).

Example

     A typical network using this module looks like this:
        READ VOLUME           GENERATE COLORMAP
            |                         |
            +--------+    +-----------+
                    COLORIZER
                        |
                    NEW ABUFFER
                        |
                FLOAT IMAGE TO BYTE
                        |
                   DISPLAY IMAGE
RELATED	MODULES
     bezier volume
         This module, also written at LBL, renders volume data which
         comes from irregular grids.
     abuffer (on GS machines)

See also

     float image to byte (for converting the output of this module
           to something AVS can display).  If one uses "field to byte",
           the resulting image will not be correct when "byte normalize"
           is selected, since that transformation is applied seperately
           to each of the r,b,g,a channels.     

Limitations

     The size of the image is limited internally (by array sizes) to
     1024 by 1024 pixels.
Lawrence Berkeley Laboratory				       new abuffer
Wes Bethel  ewbethel@lbl.gov                                   25 Apr 1991