Graphics Reference
In-Depth Information
Figure 10.4.
Shooting nine rays for distributed ray tracing.
In the end we have values for a collection of rays and the last step is to determine an
appropriate weighted average of all these ray values, which is then assigned to the
pixel. A simple scheme for doing this is to recursively average the four subquadrant
values for every quadrant.
Stochastic Sampling. Here, rather than sending out extra rays in a uniform pattern
as is done in supersampling, we sample in a nonuniform manner. One pattern, sug-
gested by [Cook86], is referred to as a minimum-distance Poisson distribution, where
one rejects points from a Poisson pattern that are closer than some minimum dis-
tance. This method is very expensive because it requires a very large lookup table.
Another method, which turns out to be an approximation to the one just mentioned,
is called jittering , where we start with a uniformly spaced pattern of points and then
displace them by a small amount. This is much easier to implement. From a theo-
retical point of view, what we are doing is replacing aliasing with noise, something
that the human eye finds less bothersome.
Distributed Ray Tracing ([CoPL84], [Cook89]) . This is a special case of the jitter-
ing approach. The area of a pixel is uniformly subdivided and a ray sent out through
a randomly chosen point in each subdivided area. Cook found that 16 rays per pixel
was adequate. See Figure 10.4 for the case of nine rays. The method was not used just
for visibility computations, but also for other properties, providing a uniform
approach to achieving
(1) blurry reflections,
(2) blurry transparency,
(3) soft shadows,
(4) depth of field, and
(5) motion blur.
Only the initial ray was sampled stochastically. All subsequent reflected rays used a
precomputed Monte Carlo method via lookup tables.
Other stochastic sampling methods were developed to cut down on unnecessary
rays by establishing criteria for “important” areas.
10.2.2
Ray Intersection Formulas
In this section we shall derive formulas for the intersection of a ray in R n with various
standard surfaces. Before we begin we should again point out the obvious. No matter
Search WWH ::




Custom Search