Anda di halaman 1dari 22

Linear Color Representation for Full

Spectral Rendering

Mark Peercy




Presented by Weidong Shi, 2001
Overview
Use full color distribution, not tri-stimulus RBG.

Decompose color distribution into a linear space of basis
functions.

Represent color distribution as a coefficient vector.

Model surface reflectance as matrices.

Convert results into tri-stimulus RGB.

Find optimal set of basis functions.
Why Full Spectral Information?
Non-uniform spectral distribution. Photo-realistic
rendering needs more samples of wavelengths than tri-
stimulus.

Existing Methods of Handling Full Spectrum
Point sampling.

- Sample surfaces and lights at certain number of
wavelengths.

- Numerically integration into RGB required for display.

Polynomial representation of light.

Linear models of surfaces and light.

Point Sampling
wavelength
Spectral power
S3 Sn S1 S2
i
N
i
i
S R Rd

=
=
1
i
N
i
i
S G Grn

=
=
1
i
N
i
i
S B Bl

=
=
1
) ( I
Basis Function and Linear Representation

Orthonomal basis functions, a set of functions f
1
(x), f
2
(x),

Given a function g(x), compute coefficient by,


g(x) is approximated by a vector of m-length.

dx x f x f
x
j i

= ) ( ) ( 0
dx x f x f
x
i i

= ) ( ) ( 1
dx x f x g
x
i i

= ) ( ) ( c

=
~
m
i
i i
x f x g
1
) ( ) ( c
For any f
i
(x)
For any two different functions f
i
(x) and f
j
(x)
orthogonal
normal
Linear Representation of Power Distribution
Describe spectral power distribution of light as a
linear combination of m orthonormal basis
functions

c

d E I
i i
) ( ) (

=
~
m
i
i i
E I
1
) ( ) ( c
E1
E2
E3

=
m
i
i i
E
1
) ( c
Surface Reflectance
Lighting Model
) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) , (
s s s s d d a a o
I R G I R G I R I O + O + = O
) (
s
I
) ( ) ( ) (
s d d
I R G O
) ( ) ( ) (
s s s
I R G O
reflected light as
a function of wavelength
and surface geometry
ambient light
input light BRDF diffuse terms
BRDF specular terms
Surface Reflectance- cont
Represent ambient light, directional light, and reflected
light as coefficient vectors.
|
|
|
|
|
|
.
|

\
|

a
m
a
c
c
1
|
|
|
|
|
|
.
|

\
|

s
m
s
c
c
1
|
|
|
|
|
|
.
|

\
|

o
m
o
c
c
1
) , ( O
o
I
) (
s
I
) (
a
I
ambient light
light source
reflected light
= = =
Surface Reflectance - cont
Through math deduction, surface reflectance can
be represented by m*m matrices
) (
a
R
) ( ) (
d d
R G O
) ( ) (
s s
R G O
|
|
|
|
|
.
|

\
|




a
R
11
|
|
|
|
|
.
|

\
|




d
R
11
|
|
|
|
|
.
|

\
|




s
R
11
) (O
d
G
) (O
s
G

d E E R R
j i d
d
ij
) ( ) ( ) (

d E E R R
j i s
s
ij
) ( ) ( ) (

d E E R R
j i a
a
ij
) ( ) ( ) (

=
surface ambient property surface diffuse property
surface specular property
) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) , (
s s s s d d a a o
I R G I R G I R I O + O + = O
Surface Reflectance - cont
New lighting equation
|
|
|
|
|
|
.
|

\
|

a
m
a
c
c
1
|
|
|
|
|
.
|

\
|




a
R
11
|
|
|
|
|
.
|

\
|




d
R
11
|
|
|
|
|
|
.
|

\
|

s
m
s
c
c
1
) (O
d
G
|
|
|
|
|
.
|

\
|




s
R
11
|
|
|
|
|
|
.
|

\
|

s
m
s
c
c
1
) (O
s
G
|
|
|
|
|
|
.
|

\
|

o
m
o
c
c
1
=
+
+
ambient term
diffuse term
specular term
) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) , (
s s s s d d a a o
I R G I R G I R I O + O + = O
output light
ambient light
light source
light source
Light Distribution at Each Pixel
The next step is to convert it into RGB.

=
=
m
i
i
p
i p
E I
1
) ( ) ( c
|
|
|
|
|
|
.
|

\
|

p
m
p
c
c
1


Lights arrive at each pixel is also represented as a m-length
vector

Spectrum to RGB Conversion
CIE (International
Commission on Illumination)
defines tri-stimulus value X,
Y, and Z. A color matching
function is associated with
each tri-stimulus value, called
x, y, and z.
) (
p
I

d I x X
p
) ( ) (

d I y Y
p
) ( ) (

d I z Z
p
) ( ) (

Z
Y
X
M
B
G
R
3 * 3
Convert Light at Each Pixel to RGB
c

d E x d I x X
i
m
i
p
i p
) ( ) ( ) ( ) (
1

=
= =
c

d E y d I y Y
i
m
i
p
i p
) ( ) ( ) ( ) (
1

=
= =
c

d E z d I z Z
i
m
i
p
i p
) ( ) ( ) ( ) (
1

=
= =
Integrate lights at each pixel (m-length vector) over three
color matching functions X,Y, and Z.

Selection of Basis Function
Consider computation complexity

Nature of the spectral power distribution in the
scene. Point sampling is sufficient if power
distribution is smooth.

Method 1 - Point Sampling
Point Sampling is a special case where basis function is
zero everywhere except the sample point at which it is 1.

Equal distance sample of wavelength, four is enough for
most situations, usually, 460mm, 520mm, 580mm, and
640mm (60mm distance).
Method2 - Character Vector Analysis (CVA)
Given a representative set of spectral distributions
in a scene (I
1
(), I
2
(), ), find m basis function
automatically
The set of basis functions minimizes

The representative set of lights may contain light sources,
once-reflected light, and multi-reflected light

c d E I Err
l
m
i
i l i l
2
1
,
) ( ) (

=
=
Examples
Scene under fluoresecnt light, CVA on light source, first
order, and second order surface reflectance from four
sample of the surface

Examples - Result basis functions
Rendering Result
2 3
4 5
4 9 16
25
Summary of Rendering Procedure
Determine Basis Functions
Represent Lights as Coefficient Vector
Represent Surface Reflectance as Matrices
Render
Convert Results at Each Pixel into XYZ
Convert XYZ into RGB
Conclusion
Provide a general efficient way of full spectral color
rendering
Represent color distribution by linear combination of basis
functions
Capture surface reflectance by matrices
Linear lighting equation
Better photo-realistic rendering result
Easy to implement

Anda mungkin juga menyukai