System, method and article of manufacture for shadow mapping

Computer graphics processing and selective visual display system – Computer graphics processing – Three-dimension

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

Reexamination Certificate

active

06593923

ABSTRACT:

FIELD OF THE INVENTION
The present invention relates to computer graphics, and more particularly to shadow mapping in a graphics pipeline.
BACKGROUND OF THE INVENTION
A major objective in graphics rendering is to produce images that are so realistic that the observer believes the image is real. A fundamental difficulty in achieving total visual realism is the complexity of accurately representing real world visual effects. A scene can include a wide variety of textures, subtle color gradations, reflections, translucency, etc. One important way to make images more realistic is to determine how objects in a scene cast shadows and then represent these shadows in the rendered image. Shadows enhance the realism of an image because they give a two-dimensional image a three-dimensional feel.
The addition of shadows to the rendering of a complex model can greatly enhance the understanding of that model's geometry. The human visual system uses shadows as a cue for depth and shape. Consequently, shadows are very useful for conveying the three dimensional nature of rendered objects and for adding realism to computer generated scenes.
Generally, shadowing is similar to hidden surface removal. In hidden surface removal, objects or portions thereof are obscured because they are behind another object. For hidden surface removal, the point of reference for determining if an object is obscured is called a viewing point. For shadowing, objects or portions thereof are obscured because they are in the shadow of another object. In the shadowing case, the point of reference for determining if an object is obscured is a source light point. While many approaches exist for shadow mapping, depth map-based shadow algorithms are commonly used in graphics pipelines. Examples of such depth map-based shadow mapping algorithms are set forth in:
1) Lance Williams. Casting curved shadows on curved surfaces. In
Proceedings of SIGGRAPH'
78, pages 270-274, 1978;
2) Reeves, D. H. Salesin, R. L. Cook. Rendering antialiased shadows with depth maps. In
Proceedings of SIGGRAPH'
87, pages 283-291, 1987; and
3) M. Segal, C. Korobkin, R. van Widenfelt, J. Fordan, P. Haeberli. Fast Shadows and Lighting Effects Using Texture Mapping. In
Proceedings of SIGGRAPH'
92, pages 249-252, 1992.
which are each incorporated herein by reference in their entirety.
Prior Art
FIG. 1
illustrates one depth map-based shadow algorithm
100
for generating realistic shadows. In such approach, there are two rendering passes
102
and
104
. In the first pass
102
, the scene is rendered from the point of view of a light source. The result is a depth map
106
, or shadow map, which is essentially a two-dimensional function indicating the depth of the closest pixels to the light. In particular, each primitive, i.e. triangle, is scan-converted into pixels. A depth value, z
light
, of the scanned fragment is interpolated across the primitive, and then is z-tested using a standard z-value (or any other depth value representation) buffer algorithm before being written out to the depth map
106
. For additional information regarding such algorithm, reference may be made to the previously mentioned references in addition to: E. Catmull. A hidden surface Algorithm with Anti-Aliasing. In
Siggraph'
78, Page 6-11. 1978, which is incorporated herein by reference in its entirety.
Prior Art
FIG. 2A
illustrates the prior art technique
200
of building the shadow map using the standard z-buffer algorithm. As shown, distances
202
between a light source
204
and exposed surfaces of objects
206
are collected from a z-buffer. Depth values which are representative of the distances
202
are then utilized to generate the depth map
106
.
For reasons that will soon become apparent, a polygon offset function may be performed in operation
108
for resolving a common self-shadowing aliasing problem. As an option, the polygon offset operation may include the “glPolygonOffset” operation in accordance with the OpenGL® programming language.
In the second pass
104
, the scene is rendered from the eye space. During the second pass
104
, each primitive is scanned into the screen from the eye space. However, the position (x,y,z) in the eye space can be transformed via a standard projective texture mapping operation
110
into the light space to get a texture coordinates (s,t,r), where (s,t) are the texture coordinates of the sampled three-dimensional point projected on the depth map
106
, while r is the depth value that corresponds to the distance of the sampled point to the light source. In the second pass it is important to note that the distance value, r, can possibly be scaled by a percentage value, hence is offset by a small percentage amount using the texgen matrix or a vertex program.
Thereafter, in operation
112
, the depth value at the sampling point, r, is then compared with the offset depth value, z
light
, stored in the depth map
106
generated in the first pass
102
to yield a light-occlusion result, i.e. r>z
light
, if the sampled point is behind some objects which are closer to the light, hence it is in the shadow of those objects. The resultant binary shadow values are then used to shade the current scanned object, resulting in shadow effects. Prior Art
FIG. 2B
illustrates the various variables associated with the calculations carried out during the second pass
104
. Finally, a shadow modulation operation
114
is performed, the details of which will be set forth hereinafter.
Since this two-pass approach requires resampling the depth map
106
in the second pass
104
, the problem of self-shadow aliasing may occur. Prior Art
FIG. 2C
illustrates such aliasing problem that arises when shadow mapping in accordance with Prior Art
FIGS. 1-2B
. In particular, complications arise when various points on the objects
206
are rendered in light space via a single texel
210
during the first pass
102
, and subsequently rendered by way of separate pixels
212
in eye space during the second pass
104
.
Prior Art
FIG. 3A
illustrates the offset operation
108
of Prior Art
FIG. 1
which represents a solution to the aliasing problem of Prior Art FIG.
2
C. As shown, the depth value, z
light
, may be bounded by the “glPolygonOffset” operation. In particular, the “glPolygonOffset” operation includes calculating an offset value, o, using Prior Art Equations A.

z
light
=z+o
, where:
o=m
*factor+
r
*units, where:
m
=max(
abs
(&dgr;
z/&dgr;x
),
abs
(&dgr;
z/&dgr;y
)), where  Equations A
r is defined in Prior Art
FIG. 2B
,
factor=a scalar that scales the maximum depth slope m of the polygon; and
units=a scalar that scales an implementation-dependent constant that relates to the usable resolution of the depth buffer. Both factor and units may be positive or negative.
See equations 3.6 and 3.7 of the OpenGL 1.2.1 specification that can be found at http://www.opengl.org/Documentation/Specs.html, and which is incorporated herein by reference.
By offsetting the depth value, z
light
, the self-shadow aliasing of Prior Art
FIG. 2C
is avoided. In particular, the offset operation dynamically compensates for the depth variation within each texel of the depth map
106
.
Prior Art
FIG. 3B
illustrates a limitation associated with the prior art solution of Prior Art FIG.
3
A. In some instances the values &dgr;z/&dgr;x and &dgr;z/&dgr;y of Equations A are unbounded due to the severe depth slopes of the nearly edge-on objects
206
. This can lead to erroneous results, i.e. false shadows, when using the offset equation set forth hereinabove.
Various additional prior art techniques have been developed for addressing the problem of self-shadow aliasing. For example, shadows can be softened at the shadow boundaries, as set forth in the following document: W. Reeves, D. H. Salesin, R. L. Cook. Rendering antialiased shadows with depth maps. In
Proceedings of SIGGRAPH'
87, pages 283-291, 1987, which is incorporated herein by reference in its entirety. Variations of this te

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

System, method and article of manufacture for shadow mapping does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with System, method and article of manufacture for shadow mapping, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and System, method and article of manufacture for shadow mapping will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3056523

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.