Fast soft shadows

Presented is a new algorithm to generate soft shadows. It employs graphics hardware, including texture mapping and accumulation buffering, to produce shadows resulting from area light sources quickly. Many shadow-generation algorithms have addressed the problem of quickly rendering the shadows which result from point light sources, as evidenced by the sharp, hard-edged outlines that are common in computer graphics. However, most shadows seen in real life have penumbras, the soft edges produced by extended light sources. We are introducing an algorithm which uses graphics workstation hardware to produce soft-edged shadows quickly. For each receiver, or object that has shadows cast onto it, we create a texture map to represent the radiance at each point on the receiver. First, a set of light samples (spread across the lights in the scene) is chosen to illuminate each receiver. Each sample is then used as an eyepoint from which to view the receiver polygon. We shade the polygon by illuminating it from the eyepoint, and then we project all objects between the eyepoint and the receiver onto the receiver polygon. Every object between the eye point and the receiver is drawn in black, resulting in a hard shadow image (superimposed on diffuse shading) for each eyepoint. A significant problem is to produce the 4x4 perspective matrix that transforms a pyramid with a parallelogram base (defined by the eyepoint at the apex, and by the receiver at the base) into a box, with the receiver a face of the box common to each eyepoint. Notice that we do not want to “flatten” the objects to the plane of the receiver. Instead we wish to have a 3D to 3D projection, so that we can easily clip away objects that fall behind the light source or behind the receiver. The derivation, as well as the resulting transformation matrix, is discussed in detail in [1]. This projection allows us to “register” the views of an object from all of the chosen eyepoints into a set of textures in a common space, which we combine using accumulation buffer hardware. For display, we can texture map the receiver polygons using our computed textures, at the full speed of the graphics hardware. Additionally, shadows need to be recomputed only when objects move. Using OpenGL on an SGI Crimson with RealityEngine graphics, Figure 1 (with 6788 occluders and 25 receivers) was produced in about ten seconds. (See Figure 1.) Lower quality or less complex images can be produced in correspondingly lower times. Computer Science Dept., Carnegie Mellon University, Pittsburgh PA 15213-3891, USA. http://www.cs.cmu.edu/ ̃ph, herf+@cmu.edu, ph@cs.cmu.edu. Four projected hard shadows of a triangle onto a parallelogram receiver. Center: combination of these four shadows. Right: combination of many hard shadows. Left: projected onto the surface in the scene This technique for producing hard shadows has many advantages for interactive use and for applications where visual feedback is important. It is one of the first of its kind to produce soft shadows at interactive speeds. The hardware requirements are significant, but we hope that the ease with which it can be implemented and the wider availability of such hardware in the future will allow this algorithm to be used in many different settings. Figure 1: 6788 occluders, 25 receivers; 13 seconds