Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Cohen M.F., Wallace J.R. - Radiosity and realistic image synthesis (1995)(en)

.pdf
Скачиваний:
50
Добавлен:
15.08.2013
Размер:
6.12 Mб
Скачать

CHAPTER 10. EXTENSIONS

10.2 DIRECTIONAL REFLECTION

Figure 10.18: Image computed using translucent elements to model the lampshade. Courtesy of Peter Shirley, University of Indiana.

efficient. Because of the linearity of light transport as modeled by the rendering equation it is possible to sum the independently computed components to get the final result. Such approaches are often called two-pass methods, because the total solution typically consists of a radiosity and/or light-ray tracing pass followed by an eye-ray tracing pass.

The two-pass approach has been used prior to its application to radiosity (and prior to the origin of the term two-pass). For example, Kajiya and Von Herzen L 136] use a two-pass method to compute images of clouds and other volume densities. Other examples of nonradiosity-based two-pass methods include Arvo’s backwards ray tracing algorithm [12], Heckbert and Hanrahan’s beam tracing algorithm [124], and Chattopadhyay and Fujimoto’s bidirectional ray tracing algorithm [48]. Watt [259] also describes a two-pass method in which caustics are rendered by tracing beams forward from the light source.

Radiosity Plus Reflection Frustum

A two-pass method incorporating radiosity is first described by Wallace et al. [246]. The first pass consists of a Gauss-Seidel radiosity solution with stored form factors. Extended form factors are computed using Rushmeier’s hemicube based mirror form factor method. The second pass traces eye-rays by recur-

Radiosity and Realistic Image Synthesis

320

Edited by Michael F. Cohen and John R. Wallace

 

CHAPTER 10. EXTENSIONS

10.2 DIRECTIONAL REFLECTION

Figure 10.19: Use of the reflection frustum during the rendering pass to sample a highly directional BRDF.

sive application of a Z-buffer-based sampling algorithm, called the reflection frustum. The reflection frustum algorithm samples a number of incoming directions using scan conversion and Z-buffer hidden surface removal to evaluate the glossy component of reflection (see Figure 10.19). The sample directions are selected as grid points on the cross section of a square frustum oriented in the specular direction. The contribution of each sample is then weighted by the non-Lambertian components of the BRDF in that direction. This combination of algorithms accounts for the paths L(D*|D*SD*)S*E, with the restriction to ideal specular reflection in the D*SD* sequences (which shows how difficult it can get to figure out which paths are actually accounted for in any particular algorithm).

Radiosity Plus Ray Tracing

The two-pass algorithm described by Sillion and Puech [218] differs from that of Wallace et al. in that recursive ray tracing is used to compute extended form factors in the first pass, which allows the inclusion of DS*D sequences (see Figure 10.20). Eye-ray tracing is used to handle ideal specular reflection in the second pass. Sillion and Puech point out that distribution ray tracing could be used to include paths containing glossy reflection as well.

The algorithm of Sillion et al. [217] (described earlier in section 10.2.4) in which glossy reflection is approximated using spherical harmonics, is also

Radiosity and Realistic Image Synthesis

321

Edited by Michael F. Cohen and John R. Wallace

 

CHAPTER 10. EXTENSIONS

10.2 DIRECTIONAL REFLECTION

Figure 10.20: Use of recursive ray tracing to compute extended form factors during the first pass of Sillion’s two pass algorithm. Sillion uses a single projection plane rather than the five-faced hemicube to compute form factors.

incorporated into a two-pass method. In this case completing the solution requires only the use of eye-ray tracing in the second pass to handle S*E path segments consisting of ideal Specular interactions. This algorithm accounts (approximately) for all paths in L(S|D)*E.

Bidirectional Ray Tracing

Bidirectional ray tracing, described above in section 10.2.4) is a two-pass method, although as originally formulated it traces power from the light only until it lands on a Lambertian diffuse surface. However, it can be extended to handle multiple Lambertian diffuse interactions, using an approach similar to progressive radiosity in which light rays are propagated further into the environment through successive bounces from diffuse surfaces [213, 214].

Although equivalent to progressive radiosity, this approach does not explicitly compute form factors. Instead, power-carrying light rays are shot out into the scene from the light emitter. When a ray hits a surface its power is deposited and stored in an array of bins (analogous to elements). Light rays are then shot in a cosine distribution from the diffuse surface reflecting the most energy, and so on, for each reflecting surface (see Figure 10.21). As for progressive radiosity, the shooting step is repeated for other reflecting surfaces until the energy falls below a certain level.

Radiosity and Realistic Image Synthesis

322

Edited by Michael F. Cohen and John R. Wallace

 

CHAPTER 10. EXTENSIONS

10.2 DIRECTIONAL REFLECTION

Figure 10.21: Light-ray tracing extended to handle diffuse interreflection. These are two steps from the first pass of a two-pass algorithm.

Glossy and ideal specular reflections can be incorporated into the first pass using an approach analogous to extended form factors. Instead of computing and storing the radiance for directionally reflecting surfaces, rays that encounter specular surfaces are traced recursively until they reach a diffuse surface. During the second pass, eye-rays are traced to account for segments of paths that start at a diffuse surface and interact with specular surfaces before reaching the eye (DS*E path segments).

Color plate 42 was produced by Shirley using this approach. Note the caustics on the table top, which are produced by S*DE path segments refracted through the wine glass. These are computed during the light-ray pass. The refractions and reflections visible in the wine glass itself are DS*E path segments followed during the eye-ray pass. In addition to tracing eye-rays to follow specular reflection, Shirley also computes LDE paths, i.e., the direct illumination of diffuse surfaces, at each pixel during rendering (this approach is discussed in greater detail in Chapter 9). Shirley uses Arvo’s illumination map data structure [12] to store incident power on diffuse surfaces.

Heckbert’s rex algorithm uses the same basic light-ray tracing strategy as Shirley’s algorithm, as well as a more powerful adaptive version of the illumination map data structure (this algorithm is described in more detail in Chapter 8). The images in Figures 8.30 and 8.31 were computed using Heckbert’s bidirectional ray tracing algorithm.

The multi-pass algorithm of Chen et al. [52] uses both extended form factors and light-ray tracing. A radiosity solution using extended form factors is first performed to provide an initial low-frequency approximation of all L(D|S)*E

Radiosity and Realistic Image Synthesis

323

Edited by Michael F. Cohen and John R. Wallace

 

CHAPTER 10. EXTENSIONS

10.2 DIRECTIONAL REFLECTION

paths. Light-ray tracing is then used to produce a more refined high-frequency approximation of caustics produced by LS*D path segments. A key point, mentioned by Chen, is that the contribution of LS*D path, initially computed using extended form factors must be subtracted before the higher-quality approximation of the same paths made by light-ray tracing is added in. When combining algorithms in two-pass or multi-pass approaches, care must be taken to avoid counting the same paths more than once.

Radiosity Plus Phong

Where absolute accuracy is not an issue, satisfactory images can be obtained relatively quickly by adding specular highlights to the radiosity shading during hardware rendering. This is accomplished by defining light sources for the graphics hardware prior to sending down the radiosity elements for Gouraud shading. Shading parameters are passed to the hardware along with the radiosiity elements, with the specular component specified as needed and the diffuse component turned off. The vertex colors representing the radiosities can typically be included in the shading equation in the ambient component, by turning on a white ambient light source. The computed specular shading is then simply added to the ambient component by the hardware shader. Naturally, highlights produced by this method will not take shadowing into account. The image of the boiler room in color plate 40 was produced using this technique.

10.2.8 Surface Reflectance/Transmittance Data

Spectral and bidirectional reflectance and transmittance (BRDF/BTDF) data for the huge variety of materials found in typical environments is difficult to come by. Since image synthesis depends on this data, there is growing recognition of the need to develop fast and inexpensive techniques for making the necessary measurements. The reflectance of a material depends on its chemical constituents, surface finish, and often subsurface characteristics. In addition, these characteristics may vary over the surface.

One existing source for spectral data is [202]. This text includes spectral data for some building materials such as asphalt and brick, and plants such as lichen. (Also included is the reflectance for assorted foods, including the crust of baked bread parameterized by thickness!) Some information can also be found in [237] and [47]. However, these are primarily limited to materials with important thermal engineering application rather than common architectural materials. Other sources of material data ranging from metals to sea water to ripe peaches are [104] and [219]. Surface finish information and related data on the spatial distribution of reflectance for a few materials can be found in [104, 114].

Radiosity and Realistic Image Synthesis

324

Edited by Michael F. Cohen and John R. Wallace

 

CHAPTER 10. EXTENSIONS

10.3 PARTICIPATING MEDIA

Drawing on data from [2], Rushmeier [199] provides a sample of “reasonable” room values for,

total diffuse reflectances (i.e., averaged over the visible spectrum)

ceiling: 0.60 to 0.90

walls: 0.50 to 0.80

floor: 0.15 to 0.35

furniture: 0.30 (dark wood) to 0.50 (blond wood)

specular reflectances

polished mirror: 0.99

polished aluminum: 0.65

transmission coefficients

clear glass: 0.80 to 0.99 (basically “specular”)

solid opal glass: 0.15 to 0.40 (basically “diffuse.”)

Research is also being conducted to develop new methods for measuring the BRDF of surfaces and for generating the BRDF from simulated surface models [253, 263].

10.3 Participating Media

The radiosity equation, and the rendering equation from which it is derived, assumes that light interacts only with surfaces, ignoring the absorption or scattering of light by the medium through which it travels. The assumption of a nonparticipating medium, normally clear air or vacuum, is reasonable for many applications. However, clouds, humidity, fog, or smoke are often important factors in the illumination of exterior environments. For interiors, participating media may be required in order to simulate phenomena of particular interest, or for aesthetic reasons (as with the beams of light in the cover image).

A medium affects light transport through absorption, scattering and emission.9 These may decrease or increase the radiance at any point along a path through the medium. A fraction κa of the radiance L will be absorbed per unit length along the path. Another fraction, κs, of L will be scattered out of the path (out-scattering). The radiance may also be increased when light incident on the point from other directions is scattered into the path (in-scattering), or if the medium itself emits light as in a flame. These phenomena are summarized in Figure 10.22.

9This exposition follows that of Rushmeier in [198].

Radiosity and Realistic Image Synthesis

325

Edited by Michael F. Cohen and John R. Wallace

 

CHAPTER 10. EXTENSIONS

10.3 PARTICIPATING MEDIA

absorbtion

outscattering

emission

inscattering

Figure 10.22: Phenomena affecting the radiance entering and exiting a differential volume along a path through a participating medium.

10.3.1 Path Integrals

The effects of these interactions on the radiance along the path are described by the differential equation

dL

= ktL + kaLe + ksL

(10.27)

 

dS

 

where ka is the absorption coefficient, ks is the scattering coefficient, kt is the extinction coefficient (ka + ks), L is the radiance along the path, Le is the emitted radiance, and Lis the radiance incident on the path.

The last term of this equation, which accounts for in-scattering, requires integrating incident radiance over the sphere of incoming directions. The scattering phase function, f(q), specifies the fraction of the radiance arriving from an incident direction, q, that is scattered into the path. With the inclusion of the integral over incoming directions, the equation for radiance in a participating medium becomes

dL

kt L + kaLe +

kS

ò 20π ò π0L¢ (q)f (q) sin qdqdf

(10.28)

4π

ds

 

 

 

A number of algorithm have been developed to solve this equation numerically, based on various simplifying assumptions. These are well summarized in [198]. The following section will concentrate on the generalization of the radiosity equation to handle media that scatter or emit light isotropically, that is, with equal radiance in all directions. This reduces the phase function to a constant in a similar fashion to the BRDF reducing to a constant for diffuse surface reflection. This approach was first introduced to image synthesis by Rushmeier in [200].

The radiance for a given direction leaving a point in space includes not only incident light scattered into the path but also light that is just passing through the point with no interaction at all. The complete radiance at a point is thus

Radiosity and Realistic Image Synthesis

326

Edited by Michael F. Cohen and John R. Wallace

 

CHAPTER 10. EXTENSIONS

10.3 PARTICIPATING MEDIA

expensive to approximate accurately, since the light just passing through a point typically varies extremely rapidly with direction.

This problem can be avoided by formulating the solution to equation 10.28 in a way that separates out the contributions of in-scattering and emission along the path. This observation is essentially the same as that used to separate surface reflection into ideal diffuse and mirror specular terms. Solving equation 10.28 for L(s) gives the integral equation

 

ò0

 

 

 

L(s) = L(0)τ(0, s) +

s τ(s, s)J(s)κ

(s)ds

(10.29)

 

 

t

 

 

where J(s') is a function describing the radiance added to the path at each point s' due to emission and in-scattering, and τ(s1, s2) is the integrated extinction coefficient κt along the path from s1 to s2 .

τ(s1 , s2 ) = e

òSS2 κ t (s)ds

(10.30)

1

 

 

 

 

 

 

 

 

 

For an isotropic medium with constant κt , τ(s1, s2) reduces to

 

τ(s1 , s2 ) = eκ t

 

s1 s2

 

 

(10.31)

 

 

 

 

The first term in equation 10.29 accounts for what is seen through the medium; it consists of the radiance of the surface at the beginning of the path attenuated by absorption and scattering along the path. This requires only an approximation of the radiosity at the surface at which the path begins, and thus eliminates the need to approximate that highly directional component at every point in the volume.

The second term in equation 10.29 accounts for energy accrued along the path as the result of in-scattering and emission, which are represented by the function J(s). J(s), called the source function, varies much more slowly over the volume than L(s) and can be approximated relatively inexpensively. The problem is thus to compute J(s).

10.3.2 The Zonal Method

Rushmeier’s method of solving for J(s) is based on the zonal method, which has its origins in the field of heat transfer [130]. The zonal method follows the development of the standard diffuse surface radiosity closely. J(s) is approximated by subdividing the volume containing the medium into discrete volume elements across which the radiance due to scattering or emission is assumed to be constant. The surfaces are subdivided into surface elements as before (see Figure 10.23).

Radiosity and Realistic Image Synthesis

327

Edited by Michael F. Cohen and John R. Wallace

 

FlkVV
F jkSV

CHAPTER 10. EXTENSIONS

10.3 PARTICIPATING MEDIA

Figure 10.23: Intersection of volume and surface elements.

Assuming the participating media has been divided into m volume elements and the surfaces into n elements, then the radiosity of a surface element, i, includes contributions from all other surfaces, j, and all volume elements, k:

 

 

ì

n

 

m

 

ü

 

Bi Ai

= Ei Ai

ï

 

SS

+ åBk

VS ï

(10.32)

+ ρi íåBj F ji

Fki

ý

 

 

ï j=1

 

l=1

 

ï

 

 

 

î

 

 

 

 

þ

 

where F jiSS is the surface-to-surface

form

factor and

FkiVS

is the volume-to-

surface form factor. Likewise, the radiosity of a volume element Vk , includes contributions from all surface elements j and all other volumes l

ì n

 

m

ü

 

ï

SV

VV ï

(10.33)

4κ t Bk Vk = 4κ a Ek Vk + Wk íåBj

F jk

+ åBl Flk

ý

î

 

l=1

þ

 

ï j=1

 

ï

 

where is the surface-to-volume form factor and is the volume-to- volume form factor. The factor Ωk is the scattering albedo of volume Vk , similar to the diffuse reflectivity term for surfaces. The computation of volume- to-volume and volume-to-surface form factors using the hemicube is shown in Figure 10.24.

The various form factors are similar to those for conventional radiosity, except that they include the effect of attenuation due to transport through the

Radiosity and Realistic Image Synthesis

328

Edited by Michael F. Cohen and John R. Wallace

 

CHAPTER 10. EXTENSIONS

10.3 PARTICIPATING MEDIA

Figure 10.24: Computation of volume-to-volume and volume-to-surface from factors using the hemicube.

medium. The form factor

F SS

between two surface elements, S

i

and S

, is

given by

ij

 

 

 

j

 

 

 

 

 

 

 

 

FijSS =

òò

τ (xi , x j )

cosθi cosθ j

dAj dAi

 

(10.34)

π r 2

 

Ai Aj

where τ() (see equation 10.30) reduces the transfer between the respective points on the two elements i and j. Note also, there is no division by area in this form. The volume-to-surface form factor is

VS

= òòτ (xk , x j )

cosθ j κ t,k

 

(10.35)

Fkj

 

dAj dVk

π r 2

Vk Aj

where κt,k is the constant κt for volume k. The volume-to-volume form factor is given by

VV

= òòτ (xk , xl )

κ t,k κ t,l

 

(10.36)

Fkl

 

dVl dVk

π r 2

Vk Vl

The form factors may be computed using existing algorithms with little modification. The principle requirement is the evaluation of the path integrals. In Rushmeier’s modified hemicube algorithm, τ is computed at each hemicube pixel, based on the distance to the surface or volume to which the form factor is being computed (see equations 10.30 and 10.31).

Rendering the solution of the zonal method is equivalent to the volume rendering methods developed for scientific visualization applications [75, 136, 149,

Radiosity and Realistic Image Synthesis

329

Edited by Michael F. Cohen and John R. Wallace