Graphics Reference
In-Depth Information
Figure 2.14.
Supersampling with scaling factor 3.
Supersampling. Here we sample at more points than will actually be displayed.
More precisely, we sample at n uniformly situated points within the region associated
to each pixel and then assign the average of these values to the pixel. One usually over-
samples the same amount in each direction so that n = s 2 for some scaling factor s.
For example, to create a 512 ¥ 512 image we would sample at 1536 ¥ 1536 points if
s is 3. The samples would be taken 1/3 of a pixel width apart. In Figure 2.14, each
square corresponds to a pixel in the final image and the dots show the location of the
nine samples per pixel.
Postfiltering. In supersampling the sample values for each pixel are averaged . This
gives each sample the same weight. Postfiltering uses the same approach but allows
each sample to have a different weight. Supersampling is therefore a special case of
postfiltering. Different weighting or “window” functions can be used. For example,
if we represent the weighting operation in matrix form with the ij'th entry being
the weighting factor for the ij'th sample, then rather than using the supersampling
matrix
111
111
111
Ê
ˆ
()
Á
Á
˜
19
˜ ,
Ë
¯
we could use
010
141
010
121
242
121
Ê
ˆ
Ê
ˆ
()
Á
Á
˜
˜
(
)
Á
Á
˜
˜
18
or
116
.
Ë
¯
Ë
¯
Mathematically, postfiltering corresponds to a convolution and filtering operation on
the samples. The cost of generating an image with supersampling and postfiltering is
proportional to the number of scan lines. The cost of calculations involving shading
is proportional to the square of the number of scan lines. This means that the algo-
rithm is particularly expensive for visible surface determination algorithms.
In conclusion, antialiasing techniques add a large amount of computation time to
any algorithm that uses them. To minimize this extra work, one tries to do it only for
areas where problems occur and makes no special computations for the rest. Of
course, this assumes that one knows all about the picture, say a jar defined via many
polygons. For lots more about antialiasing techniques see [FVFH90].
Search WWH ::




Custom Search