In computer graphics, a computer is used to generate digital data that represents the projection of surfaces of objects in, for example, a three-dimensional scene, illuminated by one or more light sources, onto a two-dimensional image plane, to simulate the recording of the scene by, for example, a camera. The camera may include a lens for projecting the image of the scene onto the image plane, or it may comprise a pinhole camera in which case no lens is used. The two dimensional image is in the form of an array of picture elements (which are variable termed “pixels” or “pels”), and the digital data generated for each pixel represents the color and luminance of the scene as projected onto the image plane at the point of the respective pixel in the image plane. The surfaces of the objects may have any of a number of characteristics, including shape, color, secularity, texture, and so forth, which are preferably rends in the image as closely as possible, to provide a realistic-looking image.
Generally, the contributions of the light reflected from the various points in the scene to the pixel value representing the color and intensity of a particular pixel are expressed in the form of the one or more integrals of relatively complicated functions. Since the integrals used in computer graphics generally will not have a closed-form solution, numerical methods must be used to evaluate them and thereby generate the pixel value. Typically, a conventional “Monte Carlo” method has been used in computer graphics to numerically evaluate the integrals. Generally, in the Monte Carlo method, to evaluate an integral
                                          <            f            >                    ⁢                                          =                                    ∫              0              1                        ⁢                                          f                ⁡                                  (                  x                  )                                            ⁢                                                          ⁢                              ⅆ                x                                                    ,                            (        1        )            where f(x) is a real function on the real numerical interval from zero to 1, inclusive, first a number “N” statistically-independent random numbers x1, i=1, . . . , N, are generated over the interval. The random numbers x, are used as sample points for which sample values f(xi) are generated for the function f(x), and an estimate f for the integral is generated as
                              <          f          >                ⁢                                  =                              f            _                    =                                    1              N                        ⁢                                          ∑                                  i                  =                  1                                N                            ⁢                                                f                  ⁡                                      (                                          x                      i                                        )                                                  .                                                                        (        2        )            As the number of random numbers used in generating the sample points f(xi) increases, the value of the estimate f will converge toward the actual value of the integral <f>. Generally, the distribution of estimate values that will be generated for various values of “N,” that is, for various numbers of samples, of being normal distributed around the actual value with a standard deviation σ which can be estimated by
                              σ          =                                                    1                                  N                  -                  1                                            ⁢                              (                                                                            f                      2                                        _                                    -                                                            f                      _                                        2                                                  )                                                    ,                            (        3        )            if the values xi used to generate the sample values f(xi) are statistically independent, that is, if the values xi are truly generated at random.
Generally, it has been believed that random methodologies like the Monte Carlo method are necessary to ensure that undesirable artifacts, such as Moiré patterns and aliasing and the like, which are not in the scene, will not be generated in the generated image. However, several problems arise from use of the Monte Carlo method in computer graphics. First, since the sample points x, used in the Monte Carlo method are randomly distributed they may not be generally evenly distributed across the interval, but instead may clump in various regions over the interval over which the integral is to be evaluated. Accordingly, depending on the set of random numbers which are generated, in the Monte Carlo method for significant portions of the interval there may be no sample points xi for which sample values f(xi) are generated. In that case, the error can become quite large. In the context of generating a pixel value in computer graphics, the pixel value that is actually generated using the Monte Carlo method may not reflect some elements which might otherwise be reflected if the sample points xi were guaranteed to be generally evenly distributed over the interval. This problem can be alleviated somewhat by dividing the interval into a plurality of sub-intervals, but it is generally difficult to determine a priori the number of sub-intervals into which the interval should be divided, and, in addition, in a multi-dimensional integration region (which would actually be used in computer graphics, instead of the one-dimensional interval described here) the partitioning of the region into sub-regions of equal size can be quite complicated.
In addition, since the method makes use of random numbers, the error | f−<f>| (where |x| represents the absolute value of the value “x”) between the estimate value f and actual value <f> is probabilistic, and, since the error values for various values of “N” are normal distributed around the actual value <f>, only sixty-eight percent of the estimate values f that might be generated are guaranteed to lie within one standard deviation of the actual value <f>.
Furthermore, as is clear from equation (3), the standard deviation σ decreases with increasing numbers of samples N, proportional to the reciprocal of square root of “N” (that is, 1/√{square root over (N)}). Thus, if it is desired to reduce the statistical error by a factor of two, it will be necessary to increase the number of samples N by a factor of four, which, in turn, increases the computational load that is required to generate the pixel values, for each of the numerous pixels in the image.
Additionally, since the Monte Carlo method requires random numbers, an efficient mechanism for generating random numbers is needed. Generally, digital computers are provided with so-called “random number” generators, which are computer programs which can be processed to generate a set of numbers that are approximately random. Since the random number generators use deterministic techniques, the numbers that are generated are not truly random. However, the property that subsequent random number from a random number generator are statistically independent should be maintained by deterministic implementations of pseudo-random numbers on a computer.
USPTO Backgrounds
USPTO Backgrounds