US 20010040574 A1 Abstract Computer animators have, till now, largely relegated themselves to using point light sources when simulating directional light sources in computer graphics and animation. The illumination achieved is computationally feasible but not totally realistic. While it is possible to use a finite light source of given size and shape to achieve a more realistic effect, the radiosity analysis required to calculate the illumination effect of such a light source is so cumbersome that it cannot be used for real-time computer animation. The described invention allows the animator to approximate the illumination effect of a finite light source by using a point source of varying location and intensity. Another embodiment of the invention allows the animator to realistically simulate ambient light by a similar method. The resulting illumination effects are comparable to those achieved with full radiosity analyses at much lower computational loads.
Claims(10) 1. A method for illuminating surfaces in computer graphics comprising the steps of:
constructing one or more finite light sources within a computer animated scene, each of the finite light sources having a finite size and a center; constructing a plurality of surfaces with the scene, each surface consisting of a plurality of points; and approximation of the illumination effect of each of the finite light sources by the use of a plurality of point light sources of varying intensity. 2. The method of claim 1 3. The method of claim 2 4. The method of claim 3 5. The method of claim 4 6. The method of claim 1 7. A method for illuminating surfaces in computer graphics comprising the steps of:
constructing a hemispherical light source of infinite radius; constructing a plurality of surfaces with said scene, said surfaces consisting of a plurality of points. approximation of the illumination effect of each of the hemispherical light source by the use of a plurality of point light sources. 8. The method of claim 7 9. The method of claim 8 10. The method of claim 9 Description [0001] The invention relates generally to the art of computer graphics and animation. More particularly, the invention relates to efficient approximation of finite light sources using point light sources of varying location and intensity. [0002] In order to render a scene in computer graphics or computer animation, computer artists and animators often will place one or more light sources within the scene in order to illuminate it. If, for instance, an animator wished to render a room that was lit by two light bulbs, he or she would construct two light sources, representing the light bulbs, and then calculate the illumination effect of these two sources. The standard construct for such directional light sources is the point source, whereby all light is considered to emanate from a single point. [0003] The point source is the standard construct because calculation of its illumination effect is computationally straightforward. For any given surface point within the scene, the rendering method need only calculate the effect of a single ray of light, which has a singular direction and intensity. The disadvantage of using the point source is its lack of realism. When illuminated by a point source, any surface point in the scene will either be illuminated by the point light source, or else wholly hidden from it. As a result, shadows and other partial lighting conditions are rendered in an unrealistically sharp, binary manner (see FIG. 5). [0004] One alternative to using a point light source is to use a finite source, one that has an extended shape and size. The light emerging from a finite source will emanate from its entire surface, and not just a single point. Finite sources illuminate a scene in a much more realistic manner. Some surface points will be illuminated by the entire finite light source, others totally hidden from it. More important is the fact that some points will be partially illuminated by the source. [0005] Despite this superior effect, computer artists and animators do not currently use finite light sources to illuminate their graphics and their scenes. Determination of the total contributing light from a finite light source to a surface point, has, till this point, required a numerical integration over the entire surface of the finite source. Such calculations are simply too cumbersome to be practically used in computer animation. Finite light sources are sometimes used to illuminate single computer-generated scenes or “photos” when a highly realistic image is desired and computational speed is not an issue, but even in these situations the computational burden is considered onerous. [0006] Computer artists and animators run into analogous problems when attempting to simulate ambient light such as skylight. Realistic calculations with respect to simulated ambient light sources are also too cumbersome to make them practical. The conventional technique for simulating ambient light, therefore, is to simply turn up the brightness throughout an entire scene, with perhaps gross modifications for surfaces points that obviously will be differentially affected by the light (such as those under dark shadows). The computation required for this is straightforward, even trivial, but the illumination effect is again not very realistic. [0007] The invention relates to a method for approximating the illumination effect of a finite light source by a using a point light source of varying intensity and location. These two variables are manipulated depending on the “visibility” of the finite light source from the perspective of the surface point being rendered. The result is realistic illumination with minimal computational effort. [0008]FIG. 1 shows generally the elements of a computer system suitable for carrying out the present invention. [0009]FIG. 2 shows the main steps involved in rendering a computer-animated scene. [0010]FIG. 3 shows the main steps involved in rendering the surfaces within a computer-animated scene. [0011]FIG. 4 shows the main steps involved in illuminating and shading a rendered surface within a computer-animated scene. [0012]FIG. 5 shows illustrates the problem of unrealistically sharp shadows created by a point light source. [0013]FIG. 6 shows the “terminator region” of partial illumination on an object surface. [0014]FIG. 7 shows the method for choosing a point light source based upon the surface point in question, which results in a particular light vector direction [0015]FIG. 8 shows the method for determining the light intensity based upon the portion of the finite light source which is hidden. [0016]FIG. 9 shows two examples of pseudo-centers used to calculate light vector directions for given points in the terminator region. [0017]FIG. 10 shows the method of determining the light intensity and light vector direction for a given point under an infinite hemisphere of light, based upon the known tangent plane and normal. [0018]FIG. 1 shows a computer system suitable for carrying out the invention. A main bus [0019] One exemplary embodiment of the invention involves use of a directional light source for general illumination within a scene. Such a light source might be the only light source within a scene, it might be the primary source (supplemented by secondary light sources) or it might be one of a number of primary light sources (such as a number of simulated light bulbs). [0020]FIG. 6 shows a spherical light source illuminating the surface of an object. Spheres are perhaps the most useful shapes to use as light sources because they create an illumination effect similar to that of many real-life directional light sources, such as light bulbs. Computation of their illumination effect, whether by explicit integration or approximation, as in the described invention, is also usually simpler than it is with other shapes. The object to be illuminated is, for illustrative purposes, also shown as a sphere. [0021] With respect to the top of the illuminated object, we can draw two tangents between the light sphere and the object, defining points P [0022] The points P [0023]FIG. 7 shows a tangent plane, Ts, drawn from one of the points P in the terminator region to the light sphere. The tangent plane can be extended further, so that it cuts through the light sphere. Viewed from the side, plane Ts appears as a tangent line (see FIG. 7). [0024] The portion of the projected disk that is above Ts is above the “horizon line” as seen from point P, and thus considered to shine upon that point. The portion of the light sphere below Ts is below the horizon line, and thus considered hidden from point P. [0025] Comparing Ts with the line drawn from point P to the center of the light sphere, line Ps, it follows that θ, the angle between Ts and Ps, is arccos (−Ps·N)−π/2 and that D, the distance between the center of the light sphere and the line Ts, is tan (θ)×Ps. The vector direction of the light from the truncated sphere to the object can be approximated by creating a “pseudo-center” X with respect to the light sphere. Pseudo-center X is determined by shifting the center of the light sphere, C, a distance D in the direction given by the vector Ps×(N×Ps). [0026] The vector from this newly defined X to point P defines the vector direction of light used to illuminate point P (see FIG. 7). [0027] The intensity of light reaching the point P will depend on the area of the projection of the truncated light source on a plane perpendicular to the line Ps. That area can in turn be approximated by the area of the truncated sphere projected onto the plane perpendicular to the tangent plane Ts containing the line Ps which is the projection shown in FIGS. 7 and 8. [0028] The intensity of the constructed point source at X that is used to illuminate point P in the terminator region is thus calculated as a function of the portion of the light sphere that is above the horizon, which is also determined from D. We can see in FIG. 8 that the areas of the light sphere visible from point P are areas Z, A and A′. Area Z is simply one-half the area of the disk. Area A is the sum of areas F and G, and the area of A′=A. The area of F is D(R [0029] The described invention thus uses a point light source of varying location and intensity to approximate the effect of a finite light source. FIG. 9 shows the pseudo-center X, standing alone as a point source, in order to illuminate point P. FIG. 9 also shows another pseudo-center X′ derived by the same method and used to illuminate point P′. The invention achieves an illumination effect similar to that of true radiosity analysis at a computational cost comparable to that required for a point source. [0030] Note that in this embodiment of the invention, the vector direction of the light is drawn from the pseudo-center X, and not from some pseudo-surface point at a given radius as one might expect. This simplification helps reduce the computational load. When the radius of the finite light source is small compared to the distance between the source and the surface it illuminates, the simplification does not diminish the realism of the effect. [0031] A second exemplary embodiment of the invention is used to simulate ambient light such as skylight. This embodiment first requires the construction of a lighted hemisphere of infinite radius within a scene. The illumination effect of the hemisphere is then approximated using point sources of varying location to achieve a realistic light effect. [0032] In FIG. 10, we can see the lighted hemisphere that encloses the animated scene like a dome, as well as a point P within that scene. To determine the intensity of ambient light that shines upon that point, we first derive the tangent plane and the normal vector, N, to that point (usually from the function that is used to draw P). If we extend this tangent plane so that it reaches out to infinity and intersects the hemisphere, we can see that only a portion of the hemisphere can actually shine light upon point P. That fraction is 1×arccos(N·L), where L is a vector that points toward a chosen “pole” of the hemisphere. The intensity is a simple (usually direct) function of that portion. [0033] The vector direction of light shining upon point P is determined by using the centroid of that portion of the hemisphere cut by the tangent plane. In FIG. 10, we see the centroid O, which is determined by the vector addition of N and L. This centroid then acts a point light source with respect to point P. The vector from O to P defines the vector direction of light. The infinite radius of the light hemisphere serves as a fiction to determine the position of the point O. [0034] The specific arrangements and methods described herein are merely illustrative of the principles of the present invention. Numerous modifications in form and detail may be made by those of ordinary skill in the art without departing from the scope of the present invention. Although this invention has been shown in relation to particular embodiments, it should not be considered so limited. Rather, the present invention is limited only by the scope of the appended claims. Referenced by
Classifications
Legal Events
Rotate |