Full-Spectral Image-Based Lighting with Skylight
Tomohiro Tachi
The University of Tokyo

Image-Based Lighting introduced by Debevec [1998] was based ontricolor image captured by a digital camera. However, full-spectral data isnecessary for precise calculation of reflected color of an object.
Tominaga et al. [2003] used sampled spectral power distribution (SPD)for estimating the basis functions of illuminant spectra and restored
spectral data of omni-directional light distribution. However, since themethod is not based on physical model of the illuminant, measurement of
the illuminant SPD is needed for each different scene.
This paper proposes a method for restoring SPD data from RGB imageof skylight and calculating reflected color of synthetic objects lit byskylight. The algorithm is based on basis functions of skylight spectra
given by light scattering model in atmosphere so that measurement of theSPD is not necessary. The method can be used to implement real-timeenvironment mapping. Precise simulation of lighting with skylightenables designer to interactively design an outdoor visual environment
such as architecture.

2. Method
2.1 Skylight ModelSince the image data is represented with tricolor value, the illuminant
SPD is uniquely determined only when the number of the basis functionsof illuminant SPD is three. Generally the number of the basis functions
is infinite, but when the skylight is the light source, the number of the basis
functions becomes three by just approximating the skylight scatteringmodel as follows:
1. Ignore tertiary and higher Rayleigh scattering;
2. Ignore tertiary and higher Rayleigh out-scattering;
3. Mie scattering does not alter the SPD and only Rayleigh scatteringchanges the color of the light.
Figure 1 shows the modeled scattering of the light. The combination ofscattering and out-scattering (or absorption) of the light determines theSPD of sky. The skylight SPD S (λ ) is given byi2
⎛ 1 ⎞S (λ ) = ∑ ci si (λ ) where si (λ ) = ⎜ 4 ⎟ s (λ ) (i = 0,1,2 )i =0⎝λ ⎠where si (λ ) are the basis functions of the skylight and s (λ ) is the SPD ofthe sunlight.
The SPD function of the skylight is restored from camera RGB value
using the matrix calculated from the basis functions of the skylight andspectral sensitivity of the camera.

⎡ s0 (λ )⎤ ⎡ Transformation ⎤⎢⎥ ⎢⎥S (λ ) = ⎢ s1 (λ )⎥ ⎢from sky coefficient ⎥⎢⎣ s 2 (λ )⎥⎦ ⎢⎣ to camera RGB ⎥⎦T−1⎡ Rsky ⎤ ⎡ s r (λ )⎤ ⎡ Rsky ⎤⎢⎥ ⎢⎥⎥ ⎢
⎢Gsky ⎥ = ⎢ s g (λ )⎥ ⎢Gsky ⎥⎢ Bsky ⎥ ⎢ sb (λ )⎥ ⎢ Bsky ⎥⎦ ⎣⎣⎦ ⎣⎦TThe method implements an environment mapping of a shader program
as follows. First, calculate the color matrix from material spectralreflectance and skylight basis functions. The calculated matrixes are
saved as uniform variables for the fragment shader. Each matrix
corresponds to each kind of spectral color. The calculation per pixel isjust multiplying the matrix onto the RGB color sampled from irradiancemap. The algorithm is very simple and is possible to implement otherreal-time method such as precomputed radiance transfer.

3. Result
3.1 Error Evaluation
To evaluate the error caused by this method, full spectral skylightscattering is simulated. The simulation of single skylight scattering isbased on Nishita et al. [1993] and photon mapping is used for full-spectral
calculation of multiple scattering.
Difference from the result directly calculated from the simulated
skylight SPD is used as the error of the proposed method. The error was
calculated for 24 kinds of spectral color (Macbeth ColorChecker Chart).
The calculated error ratio is less than 0.01 in 12:00 ~ 16:00 and the error issmaller when the sun altitude is high and when the face is horizontal.
You can see that tertiary and higher Rayleigh scattering affects theskylight at lower altitude.
The error caused by the proposed method and the error caused by justmultiplying each RGB value were compared. When the reflectance ofthe material is wavelength dependent, the error is 10 to 100 times smaller
than the error occurred when simply using dot product as reflected color.
Figure 2 shows an example of the result.
1Error Ratio

1. Introductionbymultiplying
each RGB
valuebyproposed
method

0.1
0.01
0.001

0.0001

1213

14

15
16
Time of the day[h]1718Fig. 2: The error of the reflected color of the horizontal surface.
Material: Macbeth ColorChecker Chart #1

3.2 Rendering Result
Real-time program is designed to render 24 kinds of Lambertiansurface with the proposed method. Figure 3 shows a rendering result.
The difference can be felt as a difference in the impression or of thetemperature of the color. This kind of feeling is an important factor of avisual environment. Thus the proposed method is useful for simulatingand evaluating outdoor visual environments.

Fig.3: Result of the real-time program
Fig. 1: SPD functions given by Rayleigh scattering.

2.2 Rendering
The reflected color of the non-fluorescent material is determined by themultiplication of the SPD of the light source and spectral reflectance of thematerial. RGB value of the reflected color is given by⎡ Rreflect ⎤⎡3 × 3ColorMatrix calculated from⎤ ⎡ Rsky ⎤⎥⎢⎥⎥⎢⎢⎢Greflect ⎥ = F × ⎢ Basis functions of skylight SPD ⎥ ⎢Gsky ⎥⎢ Breflect ⎥⎢⎣ & Material spectral re flectance ⎥⎦ ⎢ Bsky ⎥⎣⎦⎣⎦where F is the form factor and is determined only by the geometriccondition.

ReferenceDEBEVEC, P. 1998. Rendering Synthetic Objects Into Real Scenes: Bridging
Traditional and Image-Based Graphics With Global Illumination and HighDynamic Range Photography. In Proceedings of ACM SIGGRAPH 98, 189-198.
TOMINAGA, S. and TANAKA, N. 2003. Spectral Measurement of Omnidirectional
Light Distribution and Its Application to Image Rendering. In Proceedings ofEleventh Color Imaging Conference: Color Science, Systems and Applications,30-35.
NISHITA, T., SHIRAI, T., TADAMURA, K., and NAKAMAE, E. 1993. Display of theEarth Taking into Account Atmospheric Scattering. In Proceedings ofSIGGRAPH 93. 175-182.