ArticlePDF Available

An Improved Technique for Full Spectral Rendering

Authors:

Abstract and Figures

In this paper we present an improved approach to full spectral rendering. The technique is optimized for quasi-Monte Carlo ray tracing, however the underlying physical theory can be applied to any global illumination scheme. We start with explanation of the necessity of full spectral rendering in any correct global illumination system. Then we present, step by step, a rendering scheme using full spectrum simulation. First, we give details on a random point sampling as a method of representing spec-tra, then we introduce improved spectral sampling technique, designed to reduce variance of image of wavelength dependent phenomena, and finally we show how to integrate the novel sampling technique with selected ray tracing algorithms.
Content may be subject to copyright.
An Improved Technique for Full Spectral Rendering
Michal Radziszewski
AGH, Krakow, Poland
mradzisz@student.agh.edu.pl
Krzysztof Boryczko
AGH, Krakow, Poland
boryczko@agh.edu.pl
Witold Alda
AGH, Krakow, Poland
alda@agh.edu.pl
ABSTRACT
In this paper we present an improved approach to full spectral rendering. The technique is optimized for quasi-Monte Carlo ray
tracing, however the underlying physical theory can be applied to any global illumination scheme. We start with explanation
of the necessity of full spectral rendering in any correct global illumination system. Then we present, step by step, a rendering
scheme using full spectrum simulation. First, we give details on a random point sampling as a method of representing spec-
tra, then we introduce improved spectral sampling technique, designed to reduce variance of image of wavelength dependent
phenomena, and finally we show how to integrate the novel sampling technique with selected ray tracing algorithms.
Keywords: Full spectrum, quasi-Monte Carlo, ray tracing, rendering.
1 INTRODUCTION
The color phenomenon is caused by a spectral mix-
ture of light, perceived by the human visual system.
However, the human visual system cannot distinguish
between arbitrary spectral light distributions. Differ-
ent spectra, which are indistinguishable by human ob-
servers, are called metamers. The space of colors rec-
ognizable by human observers contains only three in-
dependent values, hence the popularity of three compo-
nent color models.
There are many color models in computer graphics,
however most are designed for a specific purpose only.
The most common are: RGB designed for displaying
images, CMYK for printing and HSV for easy color
selection by user. All of these models are to some de-
gree hardware dependent. There is, however, a standard
model based on XYZ color space, which is independent
of any hardware and can represent all the colors rec-
ognizable by a human observer. It was defined by the
CIE (Comission Internationale de l’Eclairage) as three
weighting functions to obtain x,yand zcomponents
from arbitrary spectra. Nevertheless, neither of these
models is well suited for rendering, where direct calcu-
lations on spectra are the only way to produce correct
results [4, 9].
2 NECESSITY OF FULL SPECTRUM
The RGB model is often used for rendering color im-
ages. However, this is an abuse of it, since RGB based
rendering does not have any physical justification. The
Permission to make digital or hard copies of all or part of this work
for personal or classroom use is granted without fee provided that
copies are not made or distributed for profit or commercial advantage
and that copies bear this notice and the full citation on the first page.
To copy otherwise, or republish, to post on servers or to redistribute
to lists, requires prior specific permission and/or a fee.
model was designed for storage and effective display of
images on a monitor screen, but not for physically ac-
curate rendering. The light reflection computation un-
der the assumption of elastic photon scattering is per-
formed by a multiplication of a spectrum that represents
an illumination and a spectrum describing a surface
reflectance. This multiplication actually must be per-
formed on spectral distribution functions, not on RGB
triplets, in order to get proper results.
The RGB based reflection of white light, or light
with smoothly varying spectrum, from a surface with
smoothly varying reflectance, typically does not pro-
duce substantial inaccuracies. However, when at least
one of spectra has large variation, the simulation us-
ing RGB model becomes visibly incorrect (see Figure
1, for example). Moreover in global illumination, due
to multiple light scattering, even white light becomes
colorful, causing scattering inaccuracies to accumulate.
This makes RGB based global illumination results un-
able to accurately capture the physical phenomena.
Figure 1: Left image: copper sphere illuminated by
a D65 white light. Right image: copper sphere illu-
minated by a triangular spectral distribution stretched
from 535nm to 595nm. Top left half: an RGB model
with 645nm, 526nm and 444nm wavelengths. Right
bottom half: our full spectral model. For clarity, only
diffuse reflection is calculated.
In addition, the most visually distracting error from
using an RGB model appears in simulation of phenom-
ena like dispersion. Whenever RGB based light, from
a light source with almost parallel output rays, hits a
prism, it is scattered into three bands instead of contin-
uous full spectrum, and the rest of the image remains
dark (see Figure 2), which looks unrealistic. Using a
full spectrum representation gives a continous rainbow
of colors. However, good-looking results may be ob-
tained by an RGB representation if the light source an-
gular distribution is conical and divergent enough. A
similar trick is a basis of a simple Nvidia shader demo
[5]. An address of the texture on a surface, which is
seen through glass, is offseted independently for each
channel. If texture data is blurred enough, the result-
ing ’spectrum’ is smooth. Nevertheless, both of these
methods do not have any physical significance, and ob-
viously are incorrect, but, in some conditions, can look
convincing.
Figure 2: Dispersion on a prism. Top row: RGB model
with 645nm, 526nm and 444nm wavelengths. Bottom
row: physically correct full spectrum. The light colli-
mation is controlled by a Phong-like function Icosn(φ),
with exponent ndecreased four times in each subse-
quent column, and intensity Idoubled to compensate
light scattering.
3 RELATED WORK
A general description of many popular color models
can be found in Stone [16]. Devlin et al. [1] provide
references related to data structures for full spectral
rendering and algorithms for displaying spectral data.
There are several works dedicated to simulation of par-
ticular spectral based phenomena. Wilkie et al. [22]
simulated dispersion by means of classic (determinis-
tic) ray tracing. Rendering of optical effects based on
interference attracted a fair amount of attention. Reflec-
tion from optical disks is presented in Stam [15] and
Sun et al. [17]. Algorithms for accurate light reflection
from thin layers can be found in Gondek et al. [7] and
Durikovic and Kimura [3]. The latter paper also shows
how this algorithm can be run on contemporary GPUs.
Many papers present methods for representing and
operating on spectral data. Peercy [12] designed a spec-
tral color representation as a linear combination of basis
functions, chosen in a scene dependent manner. Dif-
ferent algorithm using basis functions is described by
Rougeron and Peroche [14]. It uses adaptive projec-
tion of spectra to hierarchical basis functions. Sun et
al. [18] proposed a decomposition of spectra on smooth
functions and set of spikes. Evans and McCool [4] used
clusters of many randomly selected spectral point sam-
ples. Johnson and Fairchild [9] extended OpenGL hard-
ware rasterization to support full spectra.
Dong [2] points that typically only a part of the scene
needs a full spectral simulation and using RGB together
with full spectrum can accelerate rendering at cost of
only slight quality loss. Ward [21], however, designed a
three-component model optimized for rendering, which
typically produces images with an acceptable yet im-
perfect quality, but the model is not general enough and
cannot simulate wavelength dependent phenomena like
dispersion.
4 REPRESENTING FULL SPECTRA
Full spectral rendering requires an efficient method for
representing spectral data. The most common tech-
niques are based on linear combinations of carefully se-
lected basis functions [12, 14, 18] and point sampled
continuous functions [4]. Effectiveness of the linear
combination approach is strongly dependent on the ac-
tual functions and their match to scene spectral distri-
bution. However, the natural solution in Monte Carlo
based rendering system is a random point sampling.
4.1 Random Point Sampling
Random point sampling produces noise at low sam-
pling rate, but well-designed variants of this technique
converge quickly. Point sampling can effectively han-
dle smooth (like tungsten bulbs) light distributions and
very narrow spikes (like neon bulbs) in the same scene.
The two greatest strengths of this technique are: ran-
domly selected wavelengths and well defined wave-
length value for each spectral sample. The first one
ensures correctness, since when more samples are com-
puted, the more different wavelengths are explored, and
due to the law of large numbers, the rendering result
converges to the true value. The second allows simulat-
ing wavelength dependent effects like dispersion at the
cost of additional color noise.
It is worth to note that wavelength dependent phe-
nomena cannot be simulated correctly with algorithms
based on linear combinations of basis functions with
non-zero extent in wavelength space. Even if spec-
tra are represented by unique non-zero coefficients, the
corresponding basis functions still have some finite ex-
tent, which prevents from doing exact computations
with explicit wavelength required.
The simplest approach to point sampled spectra is
generation of a single spectral sample per light trans-
port path. However, according to Evans and McCool
[4], this technique is inefficient, since it causes a lot of
color noise. They proposed using a fixed number of
several spectral samples (called a cluster of samples)
traced simultaneously along a single light path, which
substantially reduces variance with minimal computa-
tional overhead.
4.2 Basic Operations
The implementation of multiplication, addition, mini-
mum, etc. operators are obvious, since it is enough to
perform appropriate calculation per component, as in
RGB model. However, when using full spectrum, com-
puting luminance is a bit more difficult. Particularly,
luminace of a spectrum which describes reflectivity of
a surface, by definition must be in [0,1]range.
However, computing luminance as a Monte Carlo
quadrature of product of reflectance spectrum r(λ)and
scaled CIE yweighting function, may randomly lead
to numerical errors causing luminance to exceed 1.0
threshold. The equation:
L
n
i=1
r(λi)y(λi)
p(λi).n
i=1
y(λi)
p(λi),(1)
where r(λ)is the reflectance, y(λ)is CIE yweight and
p(λi)is a probability of selecting given λi, solves the
issue. It guarantees that the luminance is in [0,1]range,
provided that r(λ)is also in the specified range.
Wavelength dependent effects can be handled as pro-
posed by Evans and McCool [4] for specular dispersion
– by dropping all but one spectral sample from a clus-
ter. This is done by randomly selecting a sample to pre-
serve, with uniform probability. All the samples, except
the selected one, are then set to zero, and the power of
the chosen one is multiplied by the cluster size. Then
the wavelength parameter becomes well defined, and
further computations are performed with usage of its
actual value. However, when simulated phenomena are
not optically perfect, like in Phong-based glossy refrac-
tion, it may be more efficient to trace the whole cluster,
scaling power of each sample independently. We exam-
ine this approach in detail in the next section.
5 SAMPLING OF SPECTRA
Evans and McCool [4] simulate wavelength dependent
phenomena by tracing only one spectral sample per
path. This particular approach is always correct, and
is necessary when a phenomenon is optically perfect,
such as refraction on idealized glass. However, when
the scattering is not ideal, dropping all but one spectral
sample from a cluster, while still being correct, might
be extremely wasteful and inefficient. In this section
we propose a substantially improved technique.
5.1 Single Scattering Model
For testing purpose, a refraction model with an ad-
justable, wavelength dependent refraction and imper-
fection introduced by Phong-based scattering [13], with
controllable glossiness is used. An extension to Walter
et al. microfacet based refraction [20] supporting dis-
persion gives better results, but their model is much
more complicated and therefore would make evaluation
of spectral sampling difficult. Nonetheless, since we
have never made assumptions about scattering model,
our results are general and, as we have tested, applica-
ble to any wavelength dependent phenomena. For clar-
ity, all tests are based on a single scattering simplifica-
tion (i.e. light is refracted once, when it enters into glass
only). The xcomponent in CIE XYZ space in outgoing
direction ωois then described by the following formula:
ICIEx (ωo) = ZΛZ
fs(ωi,ωo,λ)Lλ(ωi,λ)·
·wCIEx (λ)dσ(ωi)dλ,(2)
where Λis the space of all visible wavelengths, is the
space of all direction vectors, Lλ(ωi,λ)is the radiance
incoming from direction ωi,wCIEx is the CIE weight for
xcomponent, and σ(ωi)is the projected solid angle
measure. The yand zcomponents can be evaluated in a
similar way. In the rest of this section, the Formula (2)
is written in a simplified, still not confusing, form:
I=ZΛZ
f(ω,λ)L(ω,λ)w(λ)dσ(ω)dλ.(3)
5.2 Basic and Cluster Based Monte Carlo
Estimators
The Monte Carlo method (Equation 14) can be applied
to evaluate the two integrals from Formula (3), which
leads to the following estimator:
I1
N
N
i=1
f(ωi,λi)
p(ωi,λi)
w(λi)
pΛ(λi)L(ωi,λi),(4)
where pis the probability of selection of a given
ωievaluated with the σ(ω)measure on and pΛ
is the probability of selection of a given λi. Quality
of this estimator, and all the further estimators in this
section, relies on the assumption that scattering model
offers proper importance sampling (Equation 15), i.e.
f(ω,λ)p(ω,λ)is roughly satisfied. However, this
basic estimator is inefficient, because it forces the num-
bers of spectral and directional samples to be equal.
Each directional sample requires additional rays to be
traced, which is computationally expensive, while spec-
tral samples are almost for free. This explains the ad-
vantage of clusters of spectral samples over a single
spectral sample approach.
The main improvement over Evans and McCool
method is tracing a full cluster of spectral samples,
even when wavelength dependent phenomenon is en-
countered. Wavelength dependence can be defined pre-
cisely as the dependence of pon λ. If scattering is
not wavelength dependent, directional sampling is not
wavelength dependent as well, i.e. p(ω,λ)p(ω).
In our method, a particular spectral sample λs
iis se-
lected at random from a cluster, and its value is used
for sampling ωs
i. This leads to the color estimator in
the form:
I1
NC
N
i=1
C
j=1
f(ωs
i,λj
i)
p(ωs
i,λs
i)
w(λj
i)
pΛ(λj
i)L(ωs
i,λj
i) =
=1
NC
N
i=1
1
p(ωs
i,λs
i)·
·
C
j=1
f(ωs
i,λj
i)w(λj
i)
pΛ(λj
i)L(ωs
i,λj
i),(5)
where Nis the number of traced clusters, Cis the num-
ber of samples in each cluster, and pis the probability
of selecting scattering direction, calculated for the se-
lected wavelength λs
i. The estimator (5) can be more
efficient than estimator (4), since it traces Cspectral
samples at the minimal additional cost. On the other
hand, it may deteriorate the importance sampling qual-
ity significantly. This happens because all samples with
potentially wildly different f(ωs
i,λj
i)values are traced,
and just one probability p(ωs
i,λs
i)which matches the
shape of f(ωs
i,λs
i)only, is used. Whenever a direc-
tion ωs
iwith low probability p(ωs
i,λs
i)is chosen at
random, and at least one of the f(ωs
i,λj
i)has a rela-
tively large value in that direction, the value is no longer
cancelled by the probability, leading to the excessively
high variance in the rendered image. Moreover, the esti-
mator (5) is incorrect whenever λs
i,ωs
i:p(ωs
i,λs
i) =
0 and λj
i:f(ωs
i,λj
i)>0, particularly when a wave-
length dependent phenomenon is optically perfect, i.e.
its fis described by a δdistribution. Thus, the ini-
tial version of our new approach is not always better
than the traditional technique of tracing only one spec-
tral sample. The question is when the new technique
exhibits lower variance and when it does not.
5.3 Multiple Importance Sampling Esti-
mator
Fortunately, the variance issue can be solved automati-
cally. Simple modification of the estimator (5), which
incorporates Multiple Importance Sampling [19] (see
Appendix A), gives a better estimator with variance as
low as possible in a variety of conditions. The new im-
proved estimator is constructed from the estimator (5)
multiplying each cluster by Cand a weight Ws
iequal to:
Ws
i=p(ωs
i,λs
i)
C
j=1p(ωs
i,λj
i),(6)
where p(ωs
i,λs
i)is the probability with which the scat-
tering direction is selected, and the values p(ωs
i,λj
i)
are hypotethical probabilities of selecting the sampled
direction if using λj
ivalue instead. This leads to the
final estimator:
I1
NC
N
i=1
CW s
i
p(ωs
i,λs
i)·
·
C
j=1
f(ωs
i,λj
i)w(λj
i)
pΛ(λj
i)L(ωs
i,λj
i) =
=1
N
N
i=1
1
C
j=1p(ωi,λj
i)·
·
C
j=1
f(ωs
i,λj
i)w(λj
i)
pΛ(λj
i)L(ωs
i,λj
i).(7)
Assuming that a scattering model provides proper im-
portance sampling, the estimator (7) leads to a low
variance result. Moreover, the estimator (7) is cor-
rect whenever scattering model is correct, i.e. when-
ever ω,λ:f(ω,λ)>0p(ω,λ)>0, so it is appli-
cable even to optically perfect wavelength dependent
phenomena. However, in this case it does not provide
any benefit over estimator (4). The comparison between
the new estimators (5) and (7) and the previous sin-
gle sample estimator (4) is presented in Figure 3. The
glass sphere has linearly varying refraction from 1.35
for 360nm to 1.2 for 830nm and uses Phong based scat-
tering with n=1000. Images are created using only
two 16-sample clusters, to show error more clearly.
Figure 3: Comparison between new initial estimator
(left), new improved estimator (middle) and previous
method (right). The new initial estimator exhibits more
variance due to lack of proper importance sampling.
The color noise from single sample approach makes the
rightmost image barely legible.
5.4 Generation of Clusters
In order to generate clusters efficiently, two issues have
to be solved, namely: how many samples should a sin-
gle cluster contain, and how to generate them. The
number of spectral samples in a cluster is an important
decision for achieving best possible performance. Un-
fortunately, optimal number of such samples is highly
scene dependent. The more variation emission and re-
flectance spectra have, the more spectral samples a sin-
gle cluster should contain. Assuming that a scene con-
tains rather smoothly varying spectra (this assumption
Figure 4: Selection of optimal number of spectral samples for a single cluster: 4 samples (left), 8 samples (middle),
12 samples (right). All images were rendered in 640x480, with 200k image samples (i.e. spectral clusters).
typically is satisfied), it is possible to balance excessive
color noise and computational overhead. After a few
tests we have found that eight spectral samples are op-
timal1. Four samples cause significant noise and twelve
give barely visible improvement (see Figure 4). Ren-
dering time differences between these images have been
less than 1%, which confirms the efficiency of a cluster
approach.
The efficient generation of spectral samples proves to
be more difficult. Spectra should be importance sam-
pled, but there are at least three factors, which should
affect choice of pΛ, namely: sensor (camera, human
eye, etc.) sensitivity, light source spectral distribution
and reflectance properties of materials. However, of-
ten only sensor is taken into account, and it is assumed
that its sensitivity is well described by CIE yweighting
function. Unfortunately, despite producing good qual-
ity grayscale images, importance sampling wavelength
space with respect to the yfunction causes excessive
color noise, and, contrary to common knowledge, is
suboptimal. Ideally, a sampling probability should take
into account all three x,y, and zcomponents. After
some experiments, we found that following probability
gives good results:
pΛ(λ) = N1fΛ(λ),fΛ(λ) = 1
cosh2(A(λB)),(8)
where A=0.0072nm1and B=538.0nm are empiri-
cally evaluated constants and N=Rλmax
λmin fΛ(λ)dλis a
normalization factor. Results of this improved tech-
nique are presented in Figure 5.
Moreover, since spectra are typically smooth, sam-
pling them with quasi-Monte Carlo (QMC) low dis-
crepancy sequences instead of random numbers im-
proves results. However, care must be taken when
QMC sampling is applied to cluster based spectra.
When a wavelength dependent effect is to be simulated,
a single sample from the cluster has to be chosen. This
choice is tricky due to peculiarities of QMC sampling.
In case of true random numbers, selection of first sam-
1Due to Intel SSE instruction set optimization, our implementation re-
quires the number of samples to be divisible by four.
ple from a cluster always works correctly. On the other
hand, it is a serious error to select an every nth sample
from a low discrepancy sequence. In the latter case, we
assign a separate (pseudo)random sequence for a such
selection of a spectral sample, in addition to sequence
used for randomizing cluster samples. Results of QMC
sampling are presented in Figure 5.
Figure 5: Various methods of sampling spectra. Top
row: 2000K blackbody radiation. Bottom row: D65
spectrum. Left column: spectra sampled using random
numbers and our importance sampling, with various
numbers of samples. Middle column: comparison of
luminance based importance sampling (top halfs) with
our pΛ(bottom halfs) using 128 spectral samples. Right
column: spectra sampled using Sobol low discrepancy
sequence and our pΛ, using 4 and 8 spectral samples.
5.5 Results and Discussion
Some more comparison between single spectral sample
approach and improved technique is presented in Fig-
ure 6. Images in top row use previous settings (refrac-
tion coefficient from 1.35 for 360nm to 1.2 for 830nm
and glossiness coefficient n=1000). Next, images in
bottom row use much sharper settings (refraction coef-
ficient from 1.5 for 360nm to 1.2 for 830nm and glossi-
ness coefficient n=4000). Images from first and sec-
ond column are rendered to have approximately the
same quality, and images from second and third col-
umn are rendered with the same number of samples (i.e.
Figure 6: Imperfect refraction with dispersion. Top left
image uses previous approach with a massive number
of 900 samples per pixel. Top middle image uses new
technique with just 50 samples per pixel, yet it has sim-
ilar quality. Top right image again uses previous ap-
proach, but with 50 samples per pixel. However, gains
from using the new technique are less spectacular when
glossiness or dispersion is increased. Bottom row im-
ages use 900, 100, and 100 samples, respectively.
Settings CMIS SSS
n=1000
η= [1.35,1.20]
1 1.26 ·1012.47 ·101
4 6.67 ·1022.02 ·101
16 2.63 ·1021.34 ·101
64 1.22 ·1027.56 ·102
256 5.32 ·1033.83 ·102
n=4000
η= [1.50,1.20]
1 2.07 ·1012.46 ·101
4 1.33 ·1011.96 ·101
16 7.39 ·1021.29 ·101
64 3.84 ·1027.37 ·102
256 1.74 ·1023.72 ·102
Table 1: Comparison of error of our method (MIS) and
a single spectral sample approach (SSS), for C8-sample
spectral clusters per pixel. The error is evaluated as a
difference between the tested image and the reference
image, averaged over all pixels and color components.
The pixel values are normalized to [0,1]range.
traced rays). The average numerical error for various
numbers of rays for scene from Figure 6 is summarized
in Table 1.
Analysis of two limit cases could give more insight
into how this new technique works, and when it is most
effective. The analysis is based on the assumption that
f(ω,λ)p(ω,λ)is roughly satisfied. Otherwise, the
multiple importance cannot help much in reducing vari-
ance. First, when wavelength dependence is negligible,
all the scattering probabilities become more and more
independent on λ:p(ωs
i,λj
i)p(ωs
i). The weight
Ws
ithen becomes:
Ws
i=p(ωs
i,λs
i)
C
j=1p(ωs
i,λj
i)p(ωs
i)
C
j=1p(ωs
i)1
C,(9)
and the estimator:
I1
N
N
i=1
Wi
p(ωs
i,λs
i)·
·
C
j=1
f(ωs
i,λj
i)w(λj
i)
pΛ(λj
i)L(ωs
i,λj
i)
1
NC
N
i=1
C
j=1
f(ωs
i,λj
i)
p(ωs
i)
w(λj
i)
pΛ(λj
i)L(ωs
i,λj
i),(10)
which is an estimator of a simple, wavelength indepen-
dent, scattering. On the other hand, when scattering
becomes more and more glossy and wavelength depen-
dence is significant, with probability close to one the f
becomes close to zero for all directions except ωs
i. The
rare cases, when f(ωj
i,λj
i)is large and j6=s, have low
weight Ws
i, and therefore cannot affect the estimator
much. Moreover, all the probabilities but the selected
one go to zero, and therefore Wgoes to one, which
leads to estimator equal to:
I1
N
N
i=1
Ws
i
p(ωs
i,λs
i)·
·
C
j=1
f(ωs
i,λj
i)w(λj
i)
pΛ(λj
i)L(ωs
i,λj
i)
1
N
N
i=1
f(ωs
i,λs
i)
p(ωs
i,λs
i)
w(λj
i)
pΛ(λj
i)L(ωs
i,λj
i),(11)
which is equivalent to the one sample estimator. This
behaviour of estimator (7) is presented in Figure 7.
The former approach to spectral rendering separates
scattering into two cases: wavelength independent scat-
tering, and costly simulation of wavelength dependent
phenomena using single spectral sample estimator. On
the other hand, our method does not depend on such
classification. Due to automatically computed weights,
it adjusts itself to these two limit cases, and to the
broad spectrum of intermediate cases, when scattering
is wavelength dependent, but imperfect. The computa-
tional cost of our method depends on strength of wave-
length dependence and optical perfection of material.
These factors cause the cost to increase, but it never ex-
ceeds the cost of single spectral sample estimator.
6 SAMPLING OF LIGHT TRANSPORT
PATHS
In this section we describe an integration of our full
spectral sampling with selected light transport algo-
rithms – a case when there is more than one wave-
length dependent scattering encountered on the same
light path. The extension of single scattering approach
for Path Tracing [10] and Bidirectional Path Tracing
[19] is, however, obvious. The wavelength λs
iis se-
lected once for a whole path, and reused at each scat-
tering. The weight Ws
iis therefore computed for the
Figure 7: Analysis of behaviour of estimator (7) with increasing glossiness and wavelength dependence of scat-
tering. Wavelength independent scattering (leftmost image). Optically perfect wavelength dependent scattering
(rightmost image). Intermediate cases (middle). All the images are rendered with just four clusters.
whole path, using products of probabilities instead of
probabilities of single scatterings. Assuming that the
sampled path is build by recursively sampling fsand
tracing rays in sampled directions, the Ws
iis given by
the following expression:
Ws
i=m
k=1p(ωs
ki,λs
i)
C
j=1m
k=1p(ωs
ki,λj
i),(12)
where kis the number of a scattering event and mis the
length of the sampled path. Intuitively, a weight Ws
iis a
ratio of probability of generating the whole path using
selected wavelength λs
ito the sum of probabilities of
generating such a path using each wavelength from a
cluster. If a light transport algorithm generates a path
in a different way, or does not use a concept of light
transport paths, the weight Ws
ihas to be computed in a
different manner.
The notable case, where spectral sampling causes dif-
ficulties, is Jensen’s Photon Mapping, designed to work
with RGB triplets [8]. There are two issues: first, there
are no light transport paths, which connect light source
and camera, and second, millions of individual photons
have to be stored, causing excessive memory consump-
tion if full spectrum is used to describe them. A recent
work [11] addresses memory issues. Unfortunately, this
algorithm converts photons’ spectra to RGB prior to
storing them in a map, and converts RGB to spectra
again when searching through photons.
Our approach, on the other hand, is designed to con-
verge always to the true result with increased number
of photons, and therefore significant compression of
spectral data is unsuitable. We trace and store clus-
ters of photons with different wavelengths, instead of
describing them by RGB triplets. First, in order to
explore wavelength space properly, each emitted pho-
ton cluster must have individually chosen wavelengths.
The obvious place for optimization is that one emitted
photon cluster typically corresponds to several stored
photon clusters, and therefore cluster wavelengths are
stored once for each emission. Moreover, for storing
energy, one can experiment with a non-standard float-
ing point format instead of IEEE single precision. Us-
ing 8-sample clusters requires 32B of data for individ-
ual stored photon, not to mention an additional 32B for
Figure 8: Full spectral rendering of a non-trivial scene.
Dispersion is slightly exaggerated to render spectral
sampling quality more prominent.
each emission, which is far more than 12B required by
an RGB based implementation. If a compact float for-
mat with shared exponent is used, the latter can be com-
pressed even to 4B, however, with potential loss of im-
age quality. We have left this for further research.
When a photon is about to be stored, its energy is
multiplied by weight given by Equation (12), which ac-
counts for all encountered wavelength dependent scat-
tering events. In the second pass, rendering of photon
map is performed. Camera rays should be weighted
similarly prior to photon map lookups. In the classic
Photon Mapping, photons are searched in a sphere cen-
tered around the intersection point. The sphere radius
should be chosen carefully: too small causes noise and
too large – blurriness. We extend this approach to wave-
length search as well. If a photon cluster is decided to
be used in a flux estimate by a sphere test, additional
tests are performed on individual photons (with associ-
ated wavelengths) using a spectral search distance in a
wavelength space. Similarly as with the spatial radius,
the spectral distance must be chosen carefully.
7 CONCLUSIONS
We have presented an improved approach to full spec-
tral rendering. Full spectral algorithms realize a model
which is necessary to achieve physically plausible il-
lumination in 3D scenes. The result image rendered
with proposed spectral sampling, extended Walter et al.
microfacet refraction [20], and Bidirectional Path Trac-
ing is presented in Figure 8. The computational cost of
a full spectral simulation in comparison with an RGB
model is significant only for simple scenes containing
few primitives. The computational complexity of ray
tracing typically is logarithmic with respect to the num-
ber of primitives, and independent of a color represen-
tation. Therefore, when a scene becomes sufficiently
complex, the overhead of a physically correct algorithm
becomes negligibly small. On the other hand, the mem-
ory overhead depends on a particular algorithm. It is
negligible for Path Tracing and Bidirectional Path Trac-
ing, but is substantial for Photon Mapping.
A MONTE CARLO ESTIMATORS
This section briefly describes Importance and Multiple
Importance Sampling methods. Consult [6] and [19],
for more details. Let Ibe the integral to evaluate:
I=ZΨ
f(x)dµ(x).(13)
The basic Monte Carlo estimator of this integral is:
˜
IFN=1
N
N
i=1
f(Xi)
p(Xi),(14)
where x:f(x)6=0p(x)>0.
A variance of estimator (14) usually can be decreased
if the pis made near proportional to f, or at least to a
part of it. This technique is called Importance Sam-
pling. Particularly, when pf, the variance is zero.
However, to obtain normalization constant, fmust be
integrated analytically. This is impossible, otherwise
Monte Carlo integration would not be necessary.
Suppose that there are ipotentially good probability
densities pifor sampling f. If Importance Sampling is
used, the piused for sampling f(x)has to be chosen at
algorithm design time. This can have disastrous conse-
quences, if the pipoorly matches the actual f(x)shape.
In this case, Importance Sampling can actually increase
variance over sampling with uniform probability. How-
ever, Multiple Importance Sampling [19] has been de-
signed to improve the Importance Sampling when the
appropriate picannot be chosen at the design time. The
algorithm samples from each of these piand calculates
the final estimator as a weighted sum of these samples:
˜
I=
n
i=1
1
m
m
j=1
wi(Xi j)f(Xi j )
pi(Xi j),x
n
i=1
wi(x) = 1.(15)
The appropriate choice of weights wi:
wi(x) = pi(x)
n
j=1pj(x)(16)
is crucial for obtaining low variance results.
REFERENCES
[1] Kate Devlin, Alan Chalmers, Alexander Wilkie, and Werner
Purgathofer. Tone reproduction and physically based spectral
rendering. In State of the Art Reports, Eurographics 2002,
pages 101–123, September 2002.
[2] Weiming Dong. Rendering Optical Effects Based on Spectra
Representation in Complex Scenes. In Computer Graphics In-
ternational, pages 719–726, 2006.
[3] Roman Durikovic and R. Kimura. GPU Rendering of the Thin
Film on Paints with Full Spectrum. In Proceedings of the IEEE
Conference on Information Visualization, pages 751–756, 2006.
[4] Glenn F. Evans and Michael D. McCool. Stratified wavelength
clusters for efficient spectral monte carlo rendering. In Graphics
Interface, pages 42–49, 1999.
[5] Randima Fernando and Mark J. Kilgard. The Cg Tutorial:
The Definitive Guide to Programmable Real-Time Graphics.
Addison-Wesley, Boston, MA, USA, 2003.
[6] George S. Fishman. Monte Carlo: Concepts, Algorithms and
Applications. Springer-Verlag, New York, USA, 1999.
[7] Jay S. Gondek, Gary W. Meyer, and Jonathan G. Newman.
Wavelength dependent reflectance functions. In SIGGRAPH
1994 Proceedings, volume 28, pages 213–220, 1994.
[8] Henrik Wann Jensen. Realistic image synthesis using photon
mapping. A. K. Peters, Ltd., Natick, MA, USA, 2001.
[9] Garrett M. Johnson and Mark D. Fairchild. Full-spectral
color calculations in realistic image synthesis. IEEE Computer
Graphics and Applications, 19(4):47–53, 1999.
[10] James T. Kajiya. The rendering equation. In SIGGRAPH 1986
Proceedings, pages 143–150, New York, NY, USA, 1986.
[11] Gorm Lai and Niels Jorgen Christensen. A compression method
for spectral photon map rendering. In WSCG 2007 Proceedings,
pages 95–102, 2007.
[12] Mark S. Peercy. Linear color representations for full spectral
rendering. In SIGGRAPH 1993 Proceedings, volume 27, pages
191–198, 1993.
[13] Bui Tuong Phong. Illumination for computer generated pic-
tures. Communications of the ACM, 18(6):311–317, 1975.
[14] Gilles Rougeron and Bernard Peroche. An adaptive represen-
tation of spectral data for reflectance computations. In EGRW
1997 Proceedings, pages 127–138, 1997.
[15] Jos Stam. Diffraction shaders. In SIGGRAPH 1999 Pro-
ceedings, pages 101–110, New York, NY, USA, 1999. ACM
Press/Addison-Wesley Publishing Co.
[16] Maureen Stone. A Field Guide to Digital Color. AK Peters,
Natick, MA, USA, 2003.
[17] Yinlong Sun, David F. Fracchia, Mark S. Drew, and Thomas W.
Calvert. Rendering iridescent colors of optical disks. In EGRW
2000 Proceedings, pages 341–352, 2000.
[18] Yinlong Sun, David F. Fracchia, Mark S. Drew, and Thomas W.
Calvert. A spectrally based framework for realistic image syn-
thesis. The Visual Computer, 17(7):429–444, 2001.
[19] Eric Veach and L. J. Guibas. Optimally combining sampling
techniques for monte carlo rendering. In SIGGRAPH 1995 Pro-
ceedings, pages 419–428, 1995.
[20] Bruce Walter, Stephen R. Marschner, Hongsong Li, and Ken-
neth E. Torrance. Microfacet Models for Refraction through
Rough Surfaces. In Eurographics Symposium on Rendering,
pages 195–206, Grenoble, France, 2007.
[21] Gregory J. Ward and Elena Eydelberg-Vileshin. Picture Perfect
RGB Rendering Using Spectral Prefiltering and Sharp Color
Primaries. In EGRW 2002 Proceedings, pages 117–124, 2002.
[22] A. Wilkie, R. Tobler, and W. Purgathofer. Raytracing of Dis-
persion Effects in Transparent Materials. In WSCG 2000 Con-
ference Proceedings, 2000.
... Furthermore, their approach requires the path sampling to be independent of the wavelength, i. e. p(x, λ) = p(λ) · p(x), which forbids proper importance sampling for wavelength-dependent materials. Radziszewski et al. [RBA09] and more recently Wilkie et al. ...
... Each wavelength is treated as a different path sampling strategy and initially a single wavelength, the Hero wavelength, is chosen for path propagation. The sampled path then contributes to a set of wavelengths which are either randomly sampled [RBA09] or deterministically chosen [WND * 14]. ...
Article
Full-text available
Spectral Monte‐Carlo methods are currently the most powerful techniques for simulating light transport with wavelength‐dependent phenomena (e.g., dispersion, colored particle scattering, or diffraction gratings). Compared to trichromatic rendering, sampling the spectral domain requires significantly more samples for noise‐free images. Inspired by gradient‐domain rendering, which estimates image gradients, we propose spectral gradient sampling to estimate the gradients of the spectral distribution inside a pixel. These gradients can be sampled with a significantly lower variance by carefully correlating the path samples of a pixel in the spectral domain, and we introduce a mapping function that shifts paths with wavelength‐dependent interactions. We compute the result of each pixel by integrating the estimated gradients over the spectral domain using a one‐dimensional screened Poisson reconstruction. Our method improves convergence and reduces chromatic noise from spectral sampling, as demonstrated by our implementation within a conventional path tracer.
... Considering the computational power, when it was proposed more than 20 years ago, spectral rendering was overkill even for the most powerful systems, and meanwhile RGB has become a standard light model for rendering. However, with the enormous increase in the available computational power since then and further improvements and optimisation of the original method [101] [102], the additional computational expense of a full spectral simulation in comparison with an RGB model is almost negligible. As also noted in [17] spectral rendering is a promising development for future study of special coating and/or glazing materials widely used in solar architecture. ...
Article
Full-text available
Solar design can take many different forms across disciplines with different methodologies and goals, ranging from acquiring architectural visual effects to assessing illumination for daylighting and solar radiation potential on building surfaces for PV implementation. Furthermore, a capability of solar design methodologies and tools to accurately and time efficiently simulate light phenomena can greatly influence performance results and design decisions. This is especially important in complex cases such as dense urban settings with the significant surface shadowing, and vertical facades including daylighting devices and photovoltaics. Consequently, choosing a suitable approach and tool for each design phase is essential for achieving unique design and performance goals. This paper was carried out within the framework of IEA-PVPS Task 15 – BIPV and it aims to facilitate this decision for all parties involved in solar design process. Here presented, is an overview of almost 200 solar design tools, analyzing their numerous features regarding accuracy, complexity, scale, computation speed, representation as well as building design process integration in about 50 2D/3D, CAD/CAM and BIM software environments. Furthermore, tools from various fields have been analysed in a broad interdisciplinary context of solar design with a particular attention for being used for Daylighting and Building-Integrated Photovoltaics (BIPV) purposes. This approach should open many new perspectives on a potentially wider multidisciplinary usage and interpretation of solar design tools, sometimes well beyond their initial scope of work.
... Spectral rendering encompasses the complete simulation, including texture input, lights, surface material properties, and volume coefficients. If spectral rendering is enabled, up to three wavelengths are simulated simultaneously, each one importance sampled (typically according to the CIE XYZ color matching functions) using equidistant offsets along the spectral dimension (similar to [Wil+14]) and weighted using spectral MIS [RBA09]. By default, the result of spectral rendering is converted to color, but it is also possible to accumulate unweighted averages for up to three wavelength bands. ...
Article
While ray tracing has become increasingly common and path tracing is well understood by now, a major challenge lies in crafting an easy-to-use and efficient system implementing these technologies. Following a purely physically-based paradigm while still allowing for artistic workflows, the Iray light transport simulation and rendering system allows for rendering complex scenes by the push of a button and thus makes accurate light transport simulation widely available. In this document we discuss the challenges and implementation choices that follow from our primary design decisions, demonstrating that such a rendering system can be made a practical, scalable, and efficient real-world application that has been adopted by various companies across many fields and is in use by many industry professionals today.
Thesis
Le dimensionnement de capteur est un enjeu majeur pour le domaine de la détection d’aéronefs dans les bandes infrarouge et visible. Dans cette optique, il est nécessaire de simuler ces capteurs via des modèles et un nombre conséquent d’images spectrales d’aéronefs dans divers scénarios. L’obtention de ces images via des campagnes aériennes de mesure est malheureusement onéreuse, chronophage et difficile. Une simulation rapide et robuste de ces données s’impose donc. Afin de répondre aux besoins de précision, la complexité spectrale des scènes aériennes combinée à l’évolution technologique de la furtivité des aéronefs nous amène à utiliser des algorithmes d’illumination globale à haute dimension spectrale. Dans ces conditions, ces algorithmes posent d’importants problèmes de consommation mémoire et de temps de calcul. Le projet de recherche de cette thèse s’inscrit dans le cadre de ces problématiques.Dans un premier temps, nous nous sommes focalisés sur l’algorithme du Path Tracing et la parallélisation GPU pour le rendu d’images spectrales. Nous avons d’abord analysé les problèmes de ce type de rendu sur GPU. Nous avons ensuite proposé le DPEPT (« Deferred Path Evaluation Path Tracing ») et un schéma de parallélisation spectral qui permettent de réduire significativement la consommation mémoire et les temps de calcul.Dans un second temps, nous avons cherché à réduire la charge de calcul spectrale de la simulation en prenant soin de ne pas dégrader la précision. À cet égard, nous avons proposé de généraliser le rendu spectral stochastique d’image dans l’espace XYZ en rendu d’image spectrale stochastique. Cette nouvelle méthode permet de rendre directement et de manière plus précise et rapide les canaux d’un capteur en diminuant la dimension spectrale de la simulation, quand les données spectrales d’entrée sont complexes.Pour conclure, les travaux de cette thèse permettent de simuler de manière précise des images multi, hyper et ultra spectrales. Le temps interactif peut être atteint dans notre cas (rendu d’image à faible résolution spatiale pour des scènes de complexité géométrique intermédiaire) en multi et hyper spectrale.
Article
We present a compact and efficient representation of spectra for accurate rendering using more than three dimensions. While tristimulus color spaces are sufficient for color display, a spectral renderer has to simulate light transport per wavelength. Consequently, emission spectra and surface albedos need to be known at each wavelength. It is practical to store dense samples for emission spectra but for albedo textures, the memory requirements of this approach are unreasonable. Prior works that approximate dense spectra from tristimulus data introduce strong errors under illuminants with sharp peaks and in indirect illumination. We represent spectra by an arbitrary number of Fourier coefficients. However, we do not use a common truncated Fourier series because its ringing could lead to albedos below zero or above one. Instead, we present a novel approach for reconstruction of bounded densities based on the theory of moments. The core of our technique is our bounded maximum entropy spectral estimate. It uses an efficient closed form to compute a smooth signal between zero and one that matches the given Fourier coefficients exactly. Still, a ground truth that localizes all of its mass around a few wavelengths can be reconstructed adequately. Therefore, our representation covers the full gamut of valid reflectances. The resulting textures are compact because each coefficient can be stored in 10 bits. For compatibility with existing tristimulus assets, we implement a mapping from tristimulus color spaces to three Fourier coefficients. Using three coefficients, our technique gives state of the art results without some of the drawbacks of related work. With four to eight coefficients, our representation is superior to all existing representations. Our focus is on offline rendering but we also demonstrate that the technique is fast enough for real-time rendering.
Article
We present two separate improvements to the handling of fluorescence effects in modern uni‐directional spectral rendering systems. The first is the formulation of a new distance tracking scheme for fluorescent volume materials which exhibit a pronounced wavelength asymmetry. Such volumetric materials are an important and not uncommon corner case of wavelength‐shifting media behaviour, and have not been addressed so far in rendering literature. The second one is that we introduce an extension of Hero wavelength sampling which can handle fluorescence events, both on surfaces, and in volumes. Both improvements are useful by themselves, and can be used separately: when used together, they enable the robust inclusion of arbitrary fluorescence effects in modern uni‐directional spectral MIS path tracers. Our extension of Hero wavelength sampling is generally useful, while our proposed technique for distance tracking in strongly asymmetric media is admittedly not very efficient. However, it makes the most of a rather difficult situation, and at least allows the inclusion of such media in uni‐directional path tracers, albeit at comparatively high cost. Which is still an improvement since up to now, their inclusion was not really possible at all, due to the inability of conventional tracking schemes to generate sampling points in such volume materials.
Article
The wide adoption of path‐tracing algorithms in high‐end realistic rendering has stimulated many diverse research initiatives. In this paper we present a coherent survey of methods that utilize Monte Carlo integration for estimating light transport in scenes containing participating media. Our work complements the volume‐rendering state‐of‐the‐art report by Cerezo et al. [CPP*05]; we review publications accumulated since its publication over a decade ago, and include earlier methods that are key for building light transport paths in a stochastic manner. We begin by describing analog and non‐analog procedures for free‐path sampling and discuss various expected‐value, collision, and track‐length estimators for computing transmittance. We then review the various rendering algorithms that employ these as building blocks for path sampling. Special attention is devoted to null‐collision methods that utilize fictitious matter to handle spatially varying densities; we import two “next‐flight” estimators originally developed in nuclear sciences. Whenever possible, we draw connections between image‐synthesis techniques and methods from particle physics and neutron transport to provide the reader with a broader context.
Article
Full-text available
The photon map method can easily be extended to handle wavelength-dependent phenomena such as dispersion, chromatic aberration, etc. Using the computationally effective approach of point sampling for this extension, the size of the photon map is increased proportionally with the number of samples. In this paper we present a solution for modelling wavelength-dependent phenomena that keeps variance low, while having a memory usage comparable to that of an RGB based renderer. The method is best used for photon mapping, where there is a need to store large amounts of spectral flux directly in the photon map. Our method incurs a slight loss of accuracy for photons in the global map, while photons in the caustics map retain all information. Our tests show negligible loss of accuracy in the image quality.
Conference Paper
Full-text available
Rendering the structural color of natural objects or modern industrial products in the D environment is not possible with RGB-based graphics platforms and software and very time consuming, even with the most efficient spectra representation based methods previously proposed. Our framework allows computing full spectra light object interactions only when it is needed, i.e. for the part of the scene that requires simulating special spectra sensitive phenomena. Achieving the rendering of complex scenes with both the full spectra and RGB light and object interactions in a ray-tracer costs only some additional fractions of seconds. To prove the efficiency of our framework, we implemented a “Multilayer Film” in a simple ray-tracer. However, the framework is convenient for any complex lighting model, including diffraction or fluorescence.
Article
The creation of photorealistic images of three-dimensional models is central to computer graphics. Photon mapping, an extension of ray tracing, makes it possible to efficiently simulate global illumination in complex scenes. Photon mapping can simulate caustics (focused light, like shimmering waves at the bottom of a swimming pool), diffuse inter-reflections (e.g., the bleeding of colored light from a red wall onto a white floor, giving the floor a reddish tint), and participating media (such as clouds or smoke). This book is a practical guide to photon mapping; it provides both the theory and the practical insight necessary to implement photon mapping and simulate all types of direct and indirect illumination efficiently.
Conference Paper
In this paper we present a stochastic add--on extension to standard raytracing which makes it possible to renderdispersion effects more efficiently than hitherto possible. Our method incurs less overhead than previousproposals, is physically accurate and is applicable to most of the currently feasible spectral representations.Keywords: Spectral rendering, dispersion, raytracing1
Conference Paper
Microfacet models have proven very successful for modeling light reflection from rough surfaces. In this paper we review microfacet theory and demonstrate how it can be extended to simulate transmission through rough surfaces such as etched glass. We compare the resulting transmission model to measured data from several real surfaces and discuss appropriate choices for the microfacet distribution and shadowing-masking functions. Since rendering transmission through media requires tracking light that crosses at least two interfaces, good importance sampling is a practical necessity. Therefore, we also describe efficient schemes for sampling the microfacet models and the corresponding probability density functions.
Conference Paper
Accurate color rendering requires the consideration of many samples over the visible spectrum, and advanced rendering tools developed by the research community offer multispectral sampling towards this goal. However, for practical reasons including efficiency, white balance, and data demands, most commercial rendering packages still employ a naive RGB model in their lighting calculations. This results in colors that are often qualitatively different from the correct ones. In this paper, we demonstrate two independent and complementary techniques for improving RGB rendering accuracy without impacting calculation time: spectral prefiltering and color space selection. Spectral prefiltering is an obvious but overlooked method of preparing input colors for a conventional RGB rendering calculation, which achieves exact results for the direct component, and very accurate results for the interreflected component when compared with full-spectral rendering. In an empirical error analysis of our method, we show how the choice of rendering color space also affects final image accuracy, independent of prefiltering. Specifically, we demonstrate the merits of a particular transform that has emerged from the color research community as the best performer in computing white point adaptation under changing illuminants: the Sharp RGB space.