Você está na página 1de 9

Scattering

Adding a Solar-Radiance
Function to the Hošek-Wilkie
Skylight Model
Lukáš Hošek and Alexander Wilkie ■ Charles University in Prague

O ne prerequisite for realistic renderings of


outdoor scenes is the proper capturing of
the sky’s appearance. Currently, an ex-
plicit simulation of light scattering in the atmo-
sphere isn’t computationally feasible, and won’t
and use a solar-radiance function that exactly
matches our recently published analytical skylight
model.2

Scattering in the Atmosphere


be in the foreseeable future. Captured luminance As light travels from the sun to the earth’s surface,
patterns have proven their usefulness in practice the only thing that can cause attenuation and de-
but can’t meet all user needs. (For more informa- flection is scattering—on either air molecules or
tion, see the “Representing the Sky and Atmo- larger aerosol particles. These scattering events are
sphere” sidebar.) why the sky isn’t black. So, any attempt to simulate
To fill this capability gap, com- light propagation in the atmosphere must handle
puter graphics technology has these two types of scattering.
The more sophisticated a
employed analytical models of To do this, we can construct a Monte Carlo sim-
skylight model is and the
sky-dome luminance patterns ulation (that is, a path tracer) of light transport.
more subtly it can represent for more than two decades. For With solid objects, we can describe a scene in terms
different atmospheric technical reasons, such models of scene geometry and surface bidirectional reflec-
conditions, the more the deal with only the sky dome’s tance distribution functions. Analogically, we can
direct solar radiance should appearance, though, and exclude describe a participating medium’s scattering prop-
exactly match the skylight’s the solar disc. The widely used erties by free flight paths (how long a ray must
conditions. Toward that end, model proposed by Arcot Pree­ travel before scattering) and phase functions (the
researchers propose a solar- tham and colleagues employed directional pattern in which light is scattered).
radiance function that exactly a separately derived analytical
matches a recently published formula for adding a solar emit- Rayleigh Scattering
ter of suitable radiant intensity.1 Rayleigh scattering describes the interaction be-
high-quality analytical skylight
Although this yields reasonable tween electromagnetic radiation and particles
model.
results, the formula is derived significantly smaller than the radiation’s wave-
in a manner that doesn’t exactly length3—in this case, visible light and the atmo-
match the conditions in their sky-dome model. sphere’s gas phase constituents. Rayleigh scatter-
But the more sophisticated a skylight model is and ing is elastic: no energy is transferred between the
the more subtly it can represent different condi- interacting particles. Translated into path-tracing
tions, the more the solar radiance should exactly terms, this means a ray’s energy doesn’t change,
match the skylight’s conditions. although its direction can.
In this article, we give an overview of analytical Rayleigh scattering is the main reason the sky is
sky-dome functions and show how to construct blue. (It’s also why the setting sun has a red tint, as

44 May/June 2013 Published by the IEEE Computer Society 0272-1716/13/$31.00 © 2013 IEEE
Representing the Sky and Atmosphere

In a renderer, three basic options exist for including atmo-


spheric effects and a realistic sky dome.
nance differences that well—the area around the sun is
often washed out, even in composite HDR images. For
the sun to be captured correctly, the environment map
Explicit Simulation would have to have a dynamic range of about 18 f-stops.
The first option is explicit simulation of light transport in Finally, animations that involve the sun moving over
the entire atmosphere. This option isn’t currently practical the sky (for example, to illustrate how the illumination of a
owing to excessive computational requirements and will planned room changes throughout a typical winter’s day)
likely remain impracticable for the foreseeable future. require an entire series of such images to be available. Of
course, you can capture such sequences at a given location
HDR Capture and specific time of the year if you know in advance that
The second option, high-dynamic-range (HDR) capture they’ll be needed. However, finding such data on short
of real outdoor environments, is very practical. Such envi- notice for specific conditions that might be of interest can
ronment maps are sometimes called sky boxes because in be fairly hard.
some renderers the HDR panoramas are mapped to a box
environment. However, genuinely hemispherical environ- Analytical Models
ments, often captured with fish-eye lenses, are probably For many projects and usage scenarios (especially artistic
more common. Such environments have many uses, can ones), none of the previous problems is a concern. But
provide very high-quality image backdrops—for example, for scenarios in which one or more of those problems
for “beauty shot” architectural renderings—and are widely matter, the third option—analytical models of sky-dome
used in industry. luminance—is a welcome addition to the arsenal. Such
Three problems can arise with this technology. First, models have weaknesses compared to captures of reality;
because the data is usually captured with a digital camera, most noticeably, inclusion of clouds is much harder to
it isn’t spectral. achieve. However, for many usage cases in architecture,
Second, cameras often can’t capture extreme lumi- this isn’t an issue.

we’ll show.) The effective cross-section of Rayleigh tion governing the directional distribution. This
scattering is strongly wavelength dependent, about is important for implementing a sky-dome model.
16 times higher for the violet end of the spectrum However, in our solar-radiance model, we’re con-
than for the red end. This means that as violet and cerned only with direct rays; we discard all rays
blue rays travel through the atmosphere, they have that undergo scattering.
a much higher chance of being scattered toward In a simulation with just Rayleigh scattering
the observer. enabled, the sky color outside the solar disc is re-
We calculate a scattering event’s mean free stricted to shades of blue, with the hue correspond-
flight path as ing to that of a real sky on a cloudless day. The blue
hue is a combined effect of the sun’s spectrum and
1
= , the fourth-power dependence of the Rayleigh scat-
N ⋅ S macro
tering free flight path on the wavelength. When
where N is the number of scatterers in a unit the sun is at altitudes lower than approximately
volume and Smacro is the macroscopic cross-section. 10°, this dependence’s effect becomes directly vis-
For Rayleigh scattering, the cross-section is ible on the solar disc. Red light is significantly less
likely to be out-scattered, which produces the dis-
128π5a02 (6 + 3rn ) tinctive red tint of a setting sun and a slight red-
SRmacro = ,
3l 4 (6 − 7rn ) dening of the sky above the horizon. Our reference
model reproduces all these effects.
where a0 is the volume polarizability (for example,
1.7 ⋅ 10 –24cm3 for terrestrial air), rn is the depo- Mie Scattering
larization factor (0.0279 for naturally polarized Lorenz-Mie theory is a solution to James Maxwell’s
light), and l is the wavelength. We assume that equation for dielectric spherical particles with a
the particle density decays exponentially with the diameter-to-wavelength ratio close to 1. It gives
altitude, with an exponential density half-life of us a tool to predict the contribution of particles
t half = 7,994 m. of sizes comparable to the wavelength of visible
Once a Rayleigh scattering event occurs, the ray light—most notably, water droplets. The interac-
is recast in a new direction, with the phase func- tion is again elastic. Its phase function is strongly

IEEE Computer Graphics and Applications 45


Scattering

anisotropic, and Mie scattering strongly favors This lets us easily define the sky’s appearance
light scattered in the forward direction, which without worrying too much about the intricacies
produces the characteristic glow around the sun. of meteorology. T = 2 yields a very clear, arctic-like
Unlike Rayleigh scattering, in which the phase sky; T = 3 is a clear sky in a temperate climate; T =
function always has the same shape, the pattern of 6 is a sky on a warm, moist day; T = 10 is a slightly
Mie scattering and its macroscopic cross-section hazy day; and T > 50 is dense fog. Of course,
varies with the droplet size and wavelength. Our flattening the diversity of all possible atmospheric
simulations used Ralph Eldridge’s droplet size conditions into one number requires making
distributions.4 His paper also included meteoro- somewhat arbitrary decisions regarding particle
logical range measurements, which we can use to size distributions and the shape of the vertical
approximately calculate turbidity. Eldridge took falloff of aerosol particle density. But because the
those measurements in a dense fog, corresponding overall aerosol content is the dominant factor in
sky appearance, it’s still a highly useful parameter
that has emerged as the standard factor for
Our model yields different luminance controlling sky-dome models.

patterns based on the overall ground The Hošek-Wilkie Sky-Dome Model


albedo, which allows the sky-dome color to To derive the Hošek-Wilkie model for sky-dome
luminance, we first developed a path tracer.2 We
match the overall surroundings’ ambience. hard-coded the tracer to simulate light transport
in a simple scene with just one sphere that repre-
sents the earth and that’s surrounded by the par-
to a turbidity of approximately 60. For our simula- ticipating medium—the atmosphere. The reference
tion runs with different turbidities, we scaled the data obtained with the brute-force reference ren-
particle concentrations accordingly. (We discuss derer was fitted separately for each wavelength to
turbidity more in the next section.) a modified sky-dome luminance formula based on
Also unlike Rayleigh scattering, the free flight the approach used in the Preetham model.
path of Mie scattering isn’t strongly wavelength To generate random free flight paths and scat-
dependent. For larger water droplets, the variation tering events, the path tracer used delta scatter-
in the phase function’s shape due to wavelength ing.6 This technique randomly shoots rays into
changes can manifest itself as rainbow effects the hemisphere above an observation point on the
caused by a slight shift in the secondary peak’s earth’s surface. Until a ray either gets absorbed
position. However, this wasn’t an issue for the par- when hitting the earth or exits into free space,
ticle sizes we simulated (< 20 mm): our simulations a scattering event occurs on its path each time it
occurred in clear atmospheres containing no mac- has traveled its free flight path distance. At each
roscopic droplets. scattering event, a new direction is generated ac-
Unfortunately, Mie scattering can’t be formu- cording to the scattering phase function, and the
lated in closed form like Rayleigh scattering; both ray is recast in that direction.
effective cross-section and intensity can be de- Using this approach, we generated a large set
scribed only as an infinite expansion series. Our of fish-eye view images of the sky. We used these
simulations used precalculated tabulated values for images as references in a nonlinear optimization
cross-sections. Again, we assumed density decays process to find the coefficients for the sky-dome
exponentially with altitude, with t half = 1,200 m. luminance functions.
We programmed the path tracer to discard rays
Using Turbidity to Describe that don’t undergo any scattering events. In other
the Atmosphere words, the reference images used for the sky-dome
The Linke turbidity factor, or turbidity for short, luminance model didn’t include rays that directly
is a simple, intuitive measure of the air’s aerosol hit the sun. This, of course, means that the ana-
content.5 It’s the ratio of the additional optical lytic model didn’t include the energy from these
thickness of the atmosphere in question, th, to the direct hits on the sun, either. There’s a good rea-
optical thickness of an idealized atmosphere con- son for this: the solar disk creates a very small
sisting only of pure gas, t m: discontinuous area on the sky dome that can be up
to 18 stops brighter than its surroundings. The dis-
t m + th
T= . continuity and brightness difference would pose a
tm
problem for the optimization’s stability. Also, the

46 May/June 2013
1.0

Limb-darkening attenuation
0.8

ψ 0.6

Sun center Ray


0.4 Wavelength
Short
γ Medium
0.2 Long
Camera

0.0 0.2 0.4 0.6 0.8 1.0


Solar-disc radius
(a) (b)

Figure 1. Limb darkening. (a) The geometry. y is the angle of the ray path with respect to the stellar radius;
g is the angle formed by the view direction and a vector pointing toward the sun. (b) The attenuation for
varying wavelengths across the solar disc’s radius. On the horizontal axis, 0 is the solar disc’s center and 1 is its
outer rim. Note the difference in residual brightness at the rim: blue light is attenuated twice as much as red
light. This leads to the orange tinge on the rim of the solar disc in Figure 2a.

solar disk’s radiance pattern exhibits properties sun’s position on the sky dome. Given a fixed con-
that would be hard to capture with the framework figuration of atmospheric conditions, transmit-
used for calculating the sky dome’s distribution tance for a fixed ray elevation will stay the same,
parameters. regardless of solar elevation or ground albedo. The
The resulting model provides genuine spectral same path-tracing routine we used to obtain the
data for the entire range from the near ultraviolet reference sky-dome images can serve with only
through the visible range. It reliably supports tur- minor modifications to estimate the atmospheric
bidities between 1 and 10, whereas the widely used transmittance. We can just cast rays in one direc-
Preetham model (see the “Related Work in Sky- tion and calculate the ratio of rays that weren’t
Dome Models” sidebar) functions properly only scattered before they escaped the atmosphere.
between 2 and perhaps 5. Also, our model yields
different luminance patterns based on the overall Limb Darkening
ground albedo, which allows the sky-dome color to Obtaining L 0 from the NASA tabulated data7
match the overall surroundings’ ambience. How- gives us only the spectral radiance at the solar
ever, because the model doesn’t include the solar disc’s center. This information isn’t yet sufficient
disc, it doesn’t completely describe an outdoor to generate reasonably accurate renderings of the
scene’s radiance environment. sun because the sun also exhibits limb darkening.
Light emitted from the sun’s surface must travel
Adding a Solar-Radiance Function through its atmosphere, which attenuates light.
If we analyze how the atmosphere affects the ap- Rays coming from the solar disc’s edge must travel
pearance of objects in general and the sun and a longer path almost parallel to the sun’s surface
sky in particular, an object’s appearance as an ob- in its atmosphere (see Figure 1a). This results in
server perceives it is the solar disc’s edges being noticeably darker than
its center. As Figure 1b shows, this effect’s inten-
L = L0 ⋅ t + Lin ,(1) sity is wavelength dependent, which leads to the
solar rim being redder than the center.
where L is intensity of the light that reaches the In astronomy, it’s common to use a simple ap-
observer, L 0 is the intensity of the light emitted proximate model to describe the phenomenon:
and reflected at the power source, t is the par-
ticipating media’s transmittance, and Lin is the I (y ) N

in-scattered light’s intensity. Lin is modeled by I (0)


= ∑a
k=0
k cosk (y) ,(2)

the Hošek-Wilkie sky-dome model. For most of


the sky, that’s all we need—L 0 is zero because no where I(y) is the radiant intensity at a point on
rays come directly from the darkness of the empty the solar disc along the ray path forming angle y
space. But that changes when the sun is in the with respect to the stellar radius. I(0) is the radi-
way, and the solar-radiance model aims to fill the ant intensity at the center point.
gap represented by the missing L 0 ⋅ t term. The coefficients ak are available in tabulated
It’s noteworthy that t doesn’t depend on the form for wavelengths in the entire visible part

IEEE Computer Graphics and Applications 47


Scattering

Related Work in Sky-Dome Models

M odels of sky-dome luminance fall into two categories:


earlier luminance-only models and later models that
include color information.

Luminance-Only Models
As a first approximation, simpler models that describe only
the luminance distribution of a clear sky were devised, and S v
even standardized by the CIE (International Commission
γ
on Illumination). These were intended for architecture and
lighting-design applications, such as assessing how much
light in addition to direct sunlight a given room would
receive if its windows faced a certain direction. Owing to
the lack of color information, the models can’t be directly
used for rendering, but they’re still useful for their original
purposes. They also served as starting points for some sky Figure A. The coordinate system used in the Perez, CIE, and Hošek-
models that include color information. Wilkie sky-dome models. g is the angle formed by the view direction
Richard Perez and his colleagues devised an analytic (v) and a vector pointing toward the sun. q is the angle formed by the
formula for describing the luminance of clear skies with zenith and v. qS denotes the angle formed by the sun and zenith.
low turbidity:1

FPerez (q , g ) = (1+ Ae B cos q )(1 = Ce Dg + E cos2 g ) . F (q , g )


Y= ⋅ YZ ,
F (0, qS )
The CIE adapted this formula in a slightly different form:
where qS denotes the angle formed by the sun and zenith
( ( ) )
FCIE2003 (q , g ) = (1+ Ae B cos q ) 1 = C e Dg − e D 2 + E cos2 g .
π
and YZ is the luminance at the zenith.
In the Perez and CIE formulas, the parameters A, C,
In these formulas, g is the angle formed by the view direc- and E tune the luminance distribution and don’t directly
tion and a vector pointing toward the sun, q is the angle translate to any physical quantities. One way to obtain
formed by the zenith and view direction, and e is the Euler these parameters is by using tabulated values. This was
number. (See Figure A.) The values returned by these formu- done in the joint ISO/CIE standard, which comprises 16
las are normalized so that the value at the zenith is 1. Mul- models describing luminance distributions for atmospheric
tiplying this value by the luminance at the zenith1 yields conditions varying from clear sky to overcast with different
the final luminance distribution function: luminance turbidities.

of the spectrum and the near ultraviolet and in- ups of the solar disc. In practice, this means most
frared parts.8 Our model uses a slightly adapted outdoor scenes illuminated by skylight because the
form of those coefficients: we interpolated the sun usually acts only as a light source and isn’t
coefficients for the exact wavelengths used in the directly visible.
Hošek-Wilkie model. But it’s crucial to realize that limb darkening
We calculate cos(y) as has an additional effect beyond the mere realism
of sunset images. It reduces the unattenuated so-
lar disc’s radiant power by approximately 23 per-
sin2 g
cos (y) = 1 − , cent, compared to a solar disc that’s uniformly
sin2 0.25° the center brightness provided by our analytical
formula. This has direct implications for usage of
where g is the angle formed by the view direction our model, which we discuss later.
and a vector pointing toward the sun and 0.25° is
the sun’s angular radius as viewed from the earth. The Analytic Model
As Figure 2 shows, the inclusion of limb darken- Like the sky-dome model, the solar-radiance model
ing has a perceptible and pleasantly realistic, if not provides independent data for each spectral band—
overly dramatic, impact on the solar disc’s appear- two ultraviolet bands (320 nm and 360 nm) and
ance. This might lead to the conclusion that it can nine bands in the visible spectrum (400 to 720 nm
be safely omitted for images that don’t show close- in 40-nm increments).

48 May/June 2013
Models That Include Color Information Nishita’s model and then, by nonlinear optimization, fit
Tomoyuki Nishita and his colleagues proposed one of the the Perez formulas to those images. The result was a set of
first colored skylight models that were directly useful for linear functions that take one parameter, turbidity, as an
rendering.2 It simulated the sky’s appearance due to single argument. These functions return A, C, and E, as well as a
scattering only and ignored interreflections between the bicubic function of turbidity and the solar elevation angle
ground and air molecules. Nishita and his colleagues later for calculating zenith luminance. The Preetham model also
presented a revised model that used discretized precom- provides two chroma channels that are calculated using
putation to simulate multiple scattering.3 the same approach, and the authors provided a way to
More recently, Jörg Haber and his colleagues presented convert the outputs to spectral-radiance data. The result-
a physically based model.4 They followed the same basic ing model is fast and easy to implement and is considered
principle that Nishita and his colleagues used—subdivid- the de facto standard analytic model of spectral sky-dome
ing the atmospheric body into discrete blocks and calcu- radiance.
lating the radiative transfer between them. Given the cor-
rect configuration of atmospheric constituents, this model
can realistically predict the sky’s appearance over a range References
of atmospheric conditions. Originally, it didn’t account for 1. R. Perez, R. Seals, and J. Michalsky, “All-Weather Model for
ground reflectance, although Haber and his colleagues Sky Luminance Distribution—Preliminary Configuration and
claimed that they could easily modify it to do so. Validation,” Solar Energy, vol. 50, no. 3, 1993, pp. 235–245.
Oskar Elek and Petr Kmoch presented a model that 2. T. Nishita et al., “Display of the Earth Taking into Account
incorporates multiple scattering, including scattering in Atmospheric Scattering,” Proc. Siggraph, ACM, 1993, pp.
water bodies, and that allows for real-time rendering by 175–182.
using a set of lookup tables.5 It subdivides the atmospheric 3. T. Nishita et al., “Display of Clouds Taking into Account Mul-
body into discrete blocks and works in two phases. The tiple Anisotropic Scattering and Sky Light,” Proc. Siggraph,
first, computationally intensive, step precomputes a 4D ACM, 1996, pp. 379–386.
lookup table that can be used to render images from 4. J. Haber, M. Magnor, and H.-P. Seidel, “Physically Based
any position and with any solar position in real time. This Simulation of Twilight Phenomena,” ACM Trans. Graphics,
model is fully spectral and takes the ground albedo into vol. 24, no. 4, 2005, pp. 1353–1373.
account. The ground albedo’s value must be determined 5. O. Elek and P. Kmoch, “Real-Time Spectral Scattering in
in advance because it’s baked into the lookup table. Large-Scale Natural Participating Media,” Proc. 26th Spring
The widely used Preetham model6 is based directly Conf. Computer Graphics (SCCG 10), ACM, 2010, pp. 83–90.
on Perez and his colleagues’ model. But unlike the CIE 6. A.J. Preetham, P. Shirley, and B. Smits, “A Practical Ana-
models, it calculates A, C, and E analytically. Arcot Pree­ lytic Model for Daylight,” Proc. Siggraph, ACM, 1999, pp.
tham and colleagues generated reference images using 91–100.

For each spectral band l and each integer tur- close to the horizon. At such elevations, the solar
bidity value T in the range [1, 10], we provide co- radiance changes more dramatically, and an actual
efficients for a piece-wise cubic Hermite interpo- radiance gradient can be seen on the solar disc.
lation polynomial function rλ,T(ϵ). This function Provided that ϵ falls into the ith segment (be-
approximates the L0 ⋅ t term of Equation 1—that is, tween xi–1 and xi), we read the corresponding coef-
transmittance for a given ray at elevation ϵ multi- ficients mλ,T,i,k from a table and calculate rλ,T(ϵ):
plied by the solar radiance from the NASA dataset
3
(solar radiance unattenuated by the earth’s atmo- k

sphere or limb darkening). In other words, r(ϵ)


rλ,T (ϵ) = ∑m
k=0
λ,T,i,k ⋅ (ϵ − x i−1 ) .

gives us the direct solar radiance for a ray shot at


ϵ, assuming it would hit the sun’s center. To get a limb-darkened spectral-radiance value,
The function rλ,T(ϵ) consists of 45 segments with we multiply the output of r by the results of the
boundary points xi placed at formula from Equation 2. If we need values for
noninteger turbidities or wavelengths between the
π i provided channels, linear interpolation provides
xi = ⋅3 .
2 45 sufficient results.

The nonequidistant placement of segment bor- Model Usage in Practice


ders produces a finer resolution for ray elevations Because our solar-radiance function changes with

IEEE Computer Graphics and Applications 49


Scattering

(a) (b) (c) (d)

Figure 2. Direct views of the solar disc provided by our model for (a) a turbidity of 1 at an elevation of 42 degrees, (b) a turbidity
of 1 at 0.5 degree, (c) a turbidity of 6 at 0.5 degree, and (d) a turbidity of 7 at 0.25 degree (that is, when the sun touches the
horizon). The white solar disc in Figure 2a isn’t an anomaly: at higher elevations, the sun is practically not attenuated and has a
color that is close to D65, the white point of most imagery.

(a) (b) (c) (d) (e)

(f) (g) (h) (i) (j)

Figure 3. Sunrise: solar elevations of (a) 1, (b) 2, (c) 3, (d) 6, (e) 9, (f) 12, (g) 18, (h) 24, (i) 32, and (j) 42 degrees for a turbidity of
3. We tone-mapped the images to yield a sequence that approximately follows the brightness development of the sunrise. We
performed no white balance adjustment on the images, so that the changing sunlight color can be properly seen.

elevation, we must invoke it separately for the high solar elevations, we must take care when de-
varying elevations on a given solar disc in order termining the solar disc’s overall radiant power.
for a gradient to appear. In practice, we must average a sufficiently large
It’s also vitally important to add the output of number of random samples on the disc to get rea-
the original Hošek-Wilkie sky-dome model to this sonable results. Owing to limb darkening, and at
function. This function captures only the direct lower solar elevations also to the nonlinear pro-
illumination, to which we must add the energy gression of attenuation, using just one sample at
from all photons that have scattered at least once. the solar disc’s center yields significantly wrong
Effectively, this is the in-scattered light in the area results. On average across wavebands, limb dark-
of the solar disc, which is exactly the information ening by itself induces an error of approximately
the original Hošek-Wilkie sky-dome model pro- 23 percent.
vides. Failing to take this into account (that is, Owing to the solar-radiance function’s nonlin-
using only the direct solar radiance) results in a earity across elevations and wavelengths, finding a
much-too-dark solar disc at lower elevations, es- simple linear correction factor for this effect isn’t
pecially for higher turbidities. feasible. In future versions of the model, we plan
As we mentioned earlier, owing to the nonuni- to include a specially fitted function for the energy
form brightness distribution on the sun even at the solar disc emits for each solar elevation. In the

50 May/June 2013
3.5

3.0
meantime, the only reliable way to determine the

Spectral radiance (×104)


solar disc’s energy is to take and average multiple 2.5
samples. However, because we only need to do this Sun
2.0 60°
once for a given solar elevation, it doesn’t create 24°
significant runtime overhead.
1.5 7°
Figure 3 shows the results of adjusting our
model for different solar elevations. 1.0

Results 0.5 1°

Figure 4 shows two examples of the progression


of the direct solar-radiance function we obtained 0
300 350 400 450 500 550 600 650 700 750
for each turbidity level. The color shift induced
(a) Wavelength
by Rayleigh scattering is clearly visible, as is the
expected reduction in direct solar radiance for de-
creasing solar elevations. Figure 5 illustrates how 3.5
changing turbidity affects the ratio between direct
3.0
sunlight and sky-dome radiance. Spectral radiance (×104)
Figure 6 shows close-up views of the sun for 2.5
the complete model—that is, combining the di- Sun
rect radiance and the luminance. Adding the two 2.0 60°
components provides a high-quality image of 24°
1.5
the solar disc with the proper horizontal gradi-
ent near the horizon. For higher solar elevations, 1.0 7°
the model also behaves as expected. However—in
accordance with nature—it’s less visually promi- 0.5
nent, in that it “just” provides a very bright solar

disc with no discernible gradient. For high eleva- 0
tions, the model’s main benefit is that it automat- 300 350 400 450 500 550 600 650 700 750
ically provides a solar disc of correct brightness (b) Wavelength
for daytime outdoor skies.
You can download the fitted coefficient data and Figure 4. The direct solar radiance for turbidities of (a) 1 and (b) 4, for
a reference implementation of the solar-radiance different solar elevations. The spectrum labeled “Sun” is the original
function as part of the Hošek-Wilkie sky-dome unmodified solar radiation that hits the top of the atmosphere
model reference code package at http://cgg.mff. according to NASA data,1 with suitable data added for the ultraviolet
cuni.cz/projects/SkylightModelling. part of the spectrum. The color shift’s overall tendency remains the
same, but the solar radiance for the setting sun with low turbidity is

W
much stronger.
e plan to investigate the modeling of at-
mospheric perspective—how transmittance Particles,” Philosophical Magazine, vol. 41, 1871, pp.
and in-scattering affect the appearance of objects 447–454.
in the scene. To do this, we might parameterize the 4. R.G. Eldridge, “A Few Fog Drop-Size Distributions,”
scattering and haze function that Preetham and J. Atmospheric Sciences, vol. 18, no. 5, 1961, pp.
colleagues proposed.1 This parameterization’s goal 671–676.
will be a modification that provides a haze color 5. E.J. McCartney, Optics of the Atmosphere, J. Wiley &
that matches the surface albedo. Sons, 1976.
6. M. Raab, D. Seibert, and A. Keller, “Unbiased Global
Illumination with Participating Media,” Monte Carlo
References and Quasi-Monte Carlo Methods 2006, A. Keller, S.
1. A.J. Preetham, P. Shirley, and B. Smits, “A Practical Heinrich, and H. Niederreiter, eds., Springer, 2008,
Analytic Model for Daylight,” Proc. Siggraph, ACM, pp. 591–605.
1999, pp. 91–100. 7. K.L. Coulson, Solar and Terrestrial Radiation: Methods
2. L. Hošek and A. Wilkie, “An Analytic Model for Full and Measurements, Academic Press, 1975.
Spectral Sky-Dome Radiance,” ACM Trans. Graphics, 8. H. Neckel and D. Labs, “Solar Limb Darkening
vol. 31, no. 4, 2012, article 95. 1986–1990 (ll303 to 1099 nm),” Solar Physics, vol.
3. J.W. Strutt, “On the Scattering of Light by Small 153, nos. 1–2, 1994, pp. 91–114.

IEEE Computer Graphics and Applications 51


Scattering

(a) (b) (c) (d) (e)

(f) (g) (h) (i) (j)

Figure 5. The results of our model for a solar elevation of 8 degrees and turbidities of (a) 1, (b) 2, (c) 3, (d) 4, (e) 5, (f) 6, (g) 7, (h)
8, (i) 9, and (j) 10. Images are tone-mapped to appear roughly equally bright. As with Figure 3, we performed no white-balance
computations.

Solar elevation
0° 0.1° 0.2° 0.3° 0.4° 0.5° 0.6° 0.7° 0.8° 0.9° 1°
5
6
Turbidity
7 8
9

Figure 6. Renderings of the region immediately around the rising or setting sun, done with the superposition of the Hošek-Wilkie
sky-dome model and the proposed solar-radiance function. The small images in the image set are at the same exposure level.
From left to right, the sun starts exactly at the horizon; the solar elevation progresses in 0.1. increments upward. The turbidity
ranges from 5 (top) to 9 (bottom). We omitted lower turbidities because at this exposure level, they would appear as a uniform
white circle. We omitted a turbidity of 10 because the sun wouldn’t be visible through the haze.

Lukáš Hošek is a computer graphics developer at Bohemia graphics at Charles University in Prague. His research in-
Interactive Simulations and a PhD candidate at Charles terests are predictive rendering and color science. Wilkie
University in Prague. His research interests include real- received a PhD in computer science from the Vienna Univer-
time computer graphics and atmospheric rendering. Hošek sity of Technology. He’s a member of Siggraph and a senior
received a master’s in computer science from Charles Uni- member of IEEE. Contact him at wilkie@cgg.mff.cuni.cz.
versity. Contact him at hosek@cgg.mff.cuni.cz.
Selected CS articles and columns are also available
Alexander Wilkie is an associate professor of computer for free at http://ComputingNow.computer.org.

52 May/June 2013

Você também pode gostar