• 沒有找到結果。

Color and Radiometry

N/A
N/A
Protected

Academic year: 2022

Share "Color and Radiometry"

Copied!
10
0
0

加載中.... (立即查看全文)

全文

(1)

Color and Radiometry

Digital Image Synthesisg g y Yung-Yu Chuang

10/22/2009 10/22/2009

with slides by Pat Hanrahan and Matt Pharr

Radiometry

• Radiometry: study of the propagation of electromagnetic radiation in an environment electromagnetic radiation in an environment

• Four key quantities: flux, intensity, irradiance d di

and radiance

• These radiometric quantities are described by their spectral power distribution (SPD)

• Human visible light ranges from 370nm to 730nmg g

1 1 02 1 04

1 06 1 08

1 01 0 1 01 2

1 01 4 1 01 6

1 01 8 1 02 0

1 02 2 1 02 4

1 02 6

Cosm ic Ra y s Ga m m a

Ra y s X -Ra y s Ultra - V iolet Infra -

Red Ra d io H ea t Pow er

1 01 61 01 41 01 21 01 01 08 1 06 1 04 1 02 1 1 0-2 1 0-4 1 0-6 1 0-8 Ra y s Ra y s V iolet

Red

W a velength (N M )

7 0 0 6 0 0 5 0 0 4 0 0

IR R G B UV

Basic radiometry

• pbrt is based on radiative transfer: study of the transfer of radiant energy based on radiometric transfer of radiant energy based on radiometric principles and operates at the geometric optics level (light interacts with objects much larger level (light interacts with objects much larger than the light’s wavelength)

It i b d th ti l d l H

• It is based on the particle model. Hence, diffraction and interference can’t be easily

t d f accounted for.

Basic assumptions about light behavior

• Linearity: the combined effect of two inputs is equal to the sum of effects

equal to the sum of effects

• Energy conservation: scattering event can’t produce more energy than they started with produce more energy than they started with

• Steady state: light is assumed to have reached equilibrium so its radiance distribution isn’t equilibrium, so its radiance distribution isn t changing over time.

• No polarization: we only care the frequency of

• No polarization: we only care the frequency of light but not other properties (such as phases)

• No fluorescence or phosphorescence:

• No fluorescence or phosphorescence:

behavior of light at a wavelength or time doesn’t affect the behavior of light at other g wavelengths or time

(2)

Fluorescent materials Spectral power distribution

fl li h (日光燈)

400nm

(bluish) 650nm

(red) 550nm

(green)

fluorescent light (日光燈)

Spectral power distribution

lemmon skin

400nm (bluish)

650nm (red) 550nm

(green)

lemmon skin

Color

• Need a compact, efficient and accurate way to represent functions like these

represent functions like these

• Find proper basis functions to map the infinite- di i l f ll ibl SPD f ti dimensional space of all possible SPD functions to a low-dimensional space of coefficients

• For example, B(λ)=1 is a trivial but bad approximation

(3)

Color matching experiment

p1= 645.2 nm p2= 525.3 nm

444 4

Foundations of Vision, by Brian Wandell, Sinauer Assoc., 1995

p1 p2 p3 p1 p2 p3

p3= 444.4 nm

Color matching experiment

Color matching experiment

• To avoid negative parameters

Human Photoreceptors

(4)

Metamers

different spectrum same perception different spectrum, same perception

t t (鎢絲) b lb l i i i

tungsten (鎢絲) bulb television monitor

Why reflecting different colors

high

heat/ light

heat/

chemical

g

low low

Light with specific wavelengths b b d

Fluorescent are absorbed.

(5)

Primary colors

Primary colors for

addition (light sources) Primary colors for subtraction (reflection) ( g ) subtraction (reflection)

Heat generates light

• Vibration of atoms or electrons due to heat generates electromagnetic radiation as well If generates electromagnetic radiation as well. If its wavelength is within visible light (>1000K), it generates color as well

it generates color as well.

• Color only depends on temperature, but not t f th bj t

property of the object.

• Human body radiates IR light under room temperature.

• 2400-2900K: color temperature of incandescent p light bulb

Spectrum

• In core/color.*

N l i i li f f

• Not a plug-in, to use inline for performance

• Spectrumstores a fixed number of samples at a fixed set of wavelengths. Better for smooth functions. Why is this possible? Human vision system

#define COLOR_SAMPLE 3 class COREDLL Spectrum {

We actually sample RGB

p public:

<arithmetic operations> component-wise + - * / comparison

private:

float c[COLOR_SAMPLES];

+ / comparison…

...

}

Human visual system

• Tristimulus theory: all visible SPDs S can be accurately represented for human observers accurately represented for human observers with three values, xλ, yλ and zλ.

Th b i th t l t hi X(λ)

• The basis are the spectral matching curves, X(λ), Y(λ) and Z(λ) determined by CIE (國際照明委員 會)

會).

SXdx ( ) ( )

Y d S

y ( ) ( ) ) ( ) (

Z d S

z ( ) ( )

(6)

XYZ basis

pbrt has discrete versions (sampled every 1nm) of these bases in core/color.cpp

360 830

XYZ color

• Good for representing visible SPD to human observer, but not good for spectral computation. g p p

• A product of two SPD’s XYZ values is likely different from the XYZ values of the SPD which is the product of th t i i l SPD

the two original SPDs.

• Hence, we often have to convert our samples (RGB) into XYZ

into XYZ

void XYZ(float xyz[3]) const { xyz[0] = xyz[1] = xyz[2] = 0.;

for (int i = 0; i < COLOR_SAMPLES; ++i) { xyz[0] += XWeight[i] * c[i];

[1] + YW i ht[i] * [i]

xyz[1] += YWeight[i] * c[i];

xyz[2] += ZWeight[i] * c[i];

} } }

Conversion between XYZ and RGB

float Spectrum::XWeight[COLOR_SAMPLES] = { 0.412453f, 0.357580f, 0.180423f

};

float Spectrum::YWeight[COLOR_SAMPLES] = { 0.212671f, 0.715160f, 0.072169f

};

float Spectrum::ZWeight[COLOR_SAMPLES] = { 0.019334f, 0.119193f, 0.950227f, ,

};

Spectrum FromXYZ(float x, float y, float z) { float c[3];

float c[3];

c[0] = 3.240479f * x + -1.537150f * y + - 0.498535f * z;

c[1] = -0 969256f * x + 1 875991f * y + c[1] 0.969256f x + 1.875991f y + 0.041556f * z;

c[2] = 0.055648f * x + -0.204043f * y + 1.057311f * z;

return Spectrum(c);

}

Conversion between XYZ and RGB

vector sampled at several

wavelengths such as (R,G,B)g ( , , ) (R,G,B)

950227 . 0 119193 . 0 019334 . 0

072169 . 0 715160 . 0 212671 . 0

180423 . 0 357580 . 0 412453 . 0

057311 1 204043 0 055648 0

041556 . 0 875992 . 1 969256 . 0

498535 . 0 537150 . 1 240479 .

device dependent 3

xλ, yλ, zλ

xλ, yλ, zλ

S X d

x ( ) ( )



0.055648 0.204043 1.057311

d Z S

d Y S y

d X S x

) ( ) (

) ( ) (

) ( ) (

S Z d

z ( ) ( )

(7)

Basic quantities

Fl (W)

non-directional Flux: power, (W)

Irradiance: flux density per area, (W/m2)

Intensity: flux density per solid angle directional Intensity: flux density per solid angle

Radiance: flux density per solid angle per area

Flux (Φ)

• Radiant flux, power

T l f i h h

• Total amount of energy passing through a surface per unit of time (J/s,W)

Irradiance (E)

• Area density of flux (W/m2)

dA Ed

E 2 E Ecos

Lambert’s law Inverse square law

4 r 2 A A

Angles and solid angles

• Angle rrl

 circle has 2 radians

• Solid angle   A

• Solid angle 2

  R

The solid angle subtended by a surface is defined as the surface area of a unit sphere covered by the surface's projection onto the sphere.

sphere has 4 steradians

(8)

Intensity (I)

• Flux density per solid angle

I i d ib h di i dl di ib i

I d

• Intensity describes the directional distribution of light

( ) d I ( )  

d

Radiance (L)

• Flux density per unit area per solid angle

d

dA d L d

• Most frequently used, remains constant along ray remains constant along ray.

• All other quantities can b d i d f di be derived from radiance

Calculate irradiance from radiance )

, ( xL

d

d

x

dA

 

L x  d

dA x d

E( ) ( , )cos Light meter

dA

Irradiance Environment Maps

R N

( , )

L   E ( , )  

Radiance Environment Map

Irradiance Environment Map Environment Map Environment Map

(9)

Differential solid angles

Goal: find out the relationship between dand dθ d

d

between dand dθ, d Why? In the integral, d

d

r

2

) (

S

d f  

y g

dω is uniformly divided.

To convert the integral to



f(,)dd

We have to find the relationship We have to find the relationship between dand uniformly divided dθ and d.

Differential solid angles

• Can we find the surface area of a unit sphere b ?

 

2 

by ?

 

02 0 dd

 

02 0 dd

Differential solid angles

Goal: find out the relationship between dand dθ d

d

between dand dθ, d

By definition, we know that dA

sin r

d

d

r 2

r d  dA

2

( )( sin )

sin

dA r d r d

r d d

  

  

 

2 sin

d  dA2 sin  d d

d d d

r   

d d cos

Differential solid angles

We can prove that

d4

d sin

r S2

d

d

d

r

sin

2

2

 

d d

S

   

sin

sin

0 2 0

0 0

 

d d

d d

cos 2

1

1 0 0

d

 4

1

(10)

Isotropic point source

If the total flux of the light source is Φ light source is Φ, what is the intensity?

I d

  

2

4

S

I

4 I

I 4

 

Warn’s spotlight

If the total flux is Φ, what is the intensity?

I(

)ccosS

2



otherwise ) 0

(

2

1 1

2

cosS

dcos

d

2 c

cosS

dcos

0 0

0

c

 

S

d

d

S

d

1 S

c 2 0 1 1

S c y 2

1 S

 

y

y   

2

1 c S

1 S 0 1

S y  2

參考文獻

相關文件

Too good security is trumping deployment Practical security isn’ t glamorous... USENIX Security

So we check derivative of f and g, the small one would correspond to graph (b) and the other to (c)(i.e.. Moreover, f is

The tangential component of a is the length of the projection of a onto T, so we sketch the scalar projection of a in the tangential direction to the curve and estimate its length to

To proceed, we construct a t-motive M S for this purpose, so that it has the GP property and its “periods”Ψ S (θ) from rigid analytic trivialization generate also the field K S ,

If the life time of the particle is a distribution with density (1/2)te − t , then the corresponding continuous time branching process is not Markovian.7. Chapter 4: Second

Orient the cone so that its axis is the -axis and its base lies in the -plane, as shown in the figure..

Population: the form of the distribution is assumed known, but the parameter(s) which determines the distribution is unknown.. Sample: Draw a set of random sample from the

Son and Spivak (2013) -- assumed local equilibrium at each Weyl node each specified by chemical potential. chemical potential difference related to chiral anomaly