 |
vlgradient_shade
NAME
vlgradient_shade - Calculate the gradient
vectors and shade the volume
SYNOPSIS
#include <parvox.h>
void vlgradient_shade(vlvolume *vol, vlvariable
*variable, int time_step)
DESCRIPTION
vlgradient_shade()
shade the data volume of a specific variable
at a given time_step with the
light sources and the material properties previously defined in vllight()
and vlmaterial(). The Torrance-Sparrow
reflection model introduced by Blinn ("Models of Light Reflection for Computer
Synthesized Pictures", Proceedings of SIGGRAPH 1997) is used in ParVox.
Blinn's shading model is less expensive in computation comparing to Phong's
model, but has comparable image quality. The shading
process requires the calculation of a normalized gradient vector for each
voxel. The magnitude of the gradient vector is also required
for classification. vlgradient_shade() will calculate
the gradient vectors, save the maginitudes of the gradient vectors in vlvariable
data structure, but discard the normalized vector after shading is done.
Isosurface classification can be done seperately by calling vliso_surface().
ParVox also provides an API vliso_shade()
which combines the shading and classification in one function.
Shading is only needed for isosurface rendering; direct volume and slice
rendering do not need shading. The volume needs to be reshaded when
the light source is changed or the material setting is changed.
SEE ALSO
vlgradient_shade,
vliso_surface , vllight,
vlmaterial
BACK TO INDEX
|
 |