next up previous contents
Next: 16.4.5 Maximizing Contrast Up: 16.4 Line Integral Convolution Previous: 16.4.3 Line Integral Convolution   Contents

16.4.4 Details

Since the most of the work goes into updating the texture coordinates, it makes sense to use vertex arrays to represent the textured surface. Using a vertex array provides two benefits; it simplifies the representation of the texture coordinates (they can be kept in a 2D array), and it potentially increases rendering performance since using glDrawElements() has an index array that can eliminate the need for sending shared texture and vertex coordinates multiple times, and reduces function call overhead.

Scaling each accumulation uniformly is not optimal. The displacement of the texture coordinates is most accurate close to the grid vector; so each image contribution can be scaled as an inverse function of distance from from the vector. The farther the displacement from the original flow field vector, the less accurate the advection can potentially be, and the smaller accumulation scale factor is. Obviously more sophisticated algorithms can be implemented that adjust scale based on a computed, rather than assumed, accuracy. Any scaling algorithm should take into account the maximum and minimum possible color values after accumulating to avoid pixel color overflow or underflow.

In many implementations, the performance of this algorithm will be limited by the speed of the convolution operation. For some applications, a blend operation can be substituted with a loss of resolution accuracy; the scaling operation can be provided by changing the intensity of the base polygon. Watch out for overflow and underflow of the blended color values.


next up previous contents
Next: 16.4.5 Maximizing Contrast Up: 16.4 Line Integral Convolution Previous: 16.4.3 Line Integral Convolution   Contents
2001-01-10