Graphics Reference
In-Depth Information
The critical feature of this expression, for our current discussion, is that L appears
in the integral.
Note that if we solve Equation 31.27 for the unknown L , we don't yet have
a picture! We have a function, L , which can be evaluated at a bunch of places to
build a picture. In particular, we might evaluate L ( P ,
) for each pixel-center P
v
and the corresponding vector
from the pinhole of a pinhole camera through P
(assuming a physical camera, in which the film plane is behind the pinhole).
v
Inline Exercise 31.2: What are the domain and codomain of T ? In other words,
what sort of object does T operate on, and what sort of result does it produce?
The answer to the latter question is not “It produces real numbers.”
The function T is a higher-order function: It takes in functions and
produces new functions. You've seen other such higher-order functions, like
the derivative, in calculus class, and perhaps have encountered programming
languages like ML, Lisp, and Scheme, in which such higher-order functions are
commonplace.
Let's consider this integral from the computer science point of view. We
have a well-defined problem we want to solve (“find L ”), and we can examine
how difficult a problem this is. First, for even fairly trivial scenes, it's provable
that there's no simple closed-form solution. Second, observe that the domain of
L is not discrete, like most of the things we see in computer science, but instead
is a rather large continuum—there are three spatial coordinates and two direction
coordinates in the arguments to L , so it's a function of five real variables. (Note:
In graphics, it's common to call this a “five-dimensional function,” but it's more
accurate to say that it's a function whose domain is five-dimensional.) In computer
science terminology, we'd call a classic problem like a traveling salesman problem
or 3-SAT “difficult,” because the only known way to solve such a problem is no
simpler, in big-O terms, than enumerating all potential solutions. By comparison,
because of the continuous domain, the rendering equation is even harder, because
it's infeasible even to enumerate all potential solutions. Your next thought may be
to develop a nondeterministic approach to approximate the solution. That's a good
intuition, and it's what most rendering algorithms do. But unlike many of the non-
deterministic algorithms you've studied, while we can characterize the runtime
of these randomized graphics algorithms, that in itself isn't meaningful, because
the errors in the approximation are unbounded in the general case: Because the
domain is continuous, and we can only work with finitely many samples, it's
always possible to construct a scene in which all the light is carried by a few
sparse paths that our samples miss.
One strategy for generating approximate solutions is to discretize the
domain in some way so that we can bound the error. That's also a good idea,
because we might then be able to enumerate some sizable portion of the solution
space. I can't look at light transport for every point on a curved surface, but I
can look at it for every vertex of a triangle-mesh approximation of that surface.
Graphics isn't unique in this. The moment you take computer science out of pure
theory and start applying it to physics, you'll find that problems are often of more
than exponential complexity, and you often need to find good approximations that
work well on the general case, even if you can't bound the error in all cases.
 
Search WWH ::




Custom Search