Paper Summaries Any takers? Light and Color Plan for today - - PDF document

paper summaries
SMART_READER_LITE
LIVE PREVIEW

Paper Summaries Any takers? Light and Color Plan for today - - PDF document

Paper Summaries Any takers? Light and Color Plan for today Computer Graphics as Virtual Photography Light and Color real camera photo Photographic Photography: scene (captures processing print Project Possibilities light)


slide-1
SLIDE 1

1 Light and Color

Paper Summaries

  • Any takers?

Plan for today

  • Light and Color
  • Project Possibilities

– Andy Phelps (IT) – Paul Craig (Chemistry) Computer Graphics as Virtual Photography

camera (captures light) synthetic image camera model (focuses simulated lighting)

processing

photo processing tone reproduction real scene 3D models Photography: Computer Graphics: Photographic print

Photography and Light

pho•tog•ra•phy, n., the process or art of producing images of objects by the action of light on a sensitized surface, e.g., a film in a camera.

Photography = writing with light

Light

  • Why important? (photorealistic images!)
  • What it is
  • How it is measured

– Radiometric – Photometric

  • How it behaves
  • How it is specified
  • Light and color
slide-2
SLIDE 2

2

Light -- What it is

  • Electromagnetic radiation

power induction heating radio waves infrared ultra violet x-rays gamma rays 1016 1014 1010 108 1012 106 102 1 10-2 10-4 10-6 10-8 Wavelength (nm) 104 visible light secondary cosmic rays

Red

  • range

yellow green blue violet 700 nm 650 nm 600 nm 550 nm 450 nm 400 nm

Light -- How it is measured Radiometric Units

  • Light is radiant energy
  • Measure in Joules (Q)
  • One joule is the equivalent of one watt of

power radiated or dissipated for one second.

  • CG uses particle model of light

– Light travels in localized particles or wave packets.

Light – Radiant Flux

  • Radiant Flux (Φ -Radiant Power/Watt)

– Amount of energy / unit time – Joules (Q) per second

dt dQ = Φ

Light – Radiant Flux Density

  • Radiant Flux Density (Irradiance/Radiant

Exitance)

– Amount of flux per unit area arriving at or leaving from a point on the surface – Measured in Watts / m2 – (Remember a Watt is Joules/sec.)

Light -- Irradiance

  • Irradiance ( E )– radiant flux density coming in

dA d E Φ =

dA

Light – Radiant Exitance

  • Radiant exitance (M)- radiant flux leaving the

surface

dA

dA d M Φ =

slide-3
SLIDE 3

3

Light -- Radiance

  • Radiance (L)

– Flux arriving at or leaving from a given point or surface in a given direction. – Measured in Watts / m2 / steradian

dA(dω cos θ) d 2Φ L=

steradian

Light -- How it is measured

  • Steradian (sr) - Standard International unit of

solid angular measure. There are 4 pi steradians in a complete sphere – (See

http://whatis.techtarget.com/definition/0,289893,sid9 _gci528813,00.html) dω is the measurement of the cone size

Process of Creating Images

scene Viewing window light

Direct light Reflected light

Images are a view of the world from a given perspective

Light – Radiant Intensity

  • Radiant Intensity (I) – point source

– Amount of radiant flux in a given direction – Watts / steradian – Point light sources

ω d d I Φ =

Light – Measurement Summary

  • Radiant Flux - energy / time - (Joules/sec)
  • Radiant Flux Density - total flux entering

(irradiance) or leaving (radiant excitance) a point or surface - (Watts/m2)

  • Radiance - total flux entering or leaving a point or

surface in a given direction - (Watts/m2/ steradian)

  • Radiant intensity - flux in a given direction for

point light sources - (Watts/steradian)

  • All measures can vary with wavelength!!!

Light -- How it is measured Photometric Units

  • Photometry measures visible light according to the

sensitivity of human eye:

– Cones: blue – short, green – medium, red – long – Rods: low illumination – Eye sensitivity varies with wavelength, e.g.., green light appears brighter than red/blue of same intensity!

  • So, photometric units are radiometric units scaled

by the luminosity function

  • Same concepts -> different units
slide-4
SLIDE 4

4 Light – CIE Luminous Efficiency Curve

  • Created using perception matching brightness of

monochromatic light at different wavelengths

  • Provides weighting curve/function used to convert from

radiometric to photometric measurements

20 40 60 80 100 120 3 7 5 4 4 2 5 4 5 4 7 5 5 5 2 5 5 5 5 7 5 6 6 2 5 6 5 6 7 5 7 7 2 5 7 5 Wavelength % Efficiency

Light – Photometric Units

  • Luminous Flux - energy / time - (lumen)
  • Luminous Flux Density - total flux entering or leaving a

point or surface - (lux = lumen/m2)

  • Luminance - total flux entering or leaving a point or

surface in a given direction - (nit = lumen/m2/steradian)

  • Luminance intensity - flux in a given direction for point

light sources - (candela = lumen / steridian)

  • All scaled by CIE Luminous Efficiency Curve

Light -- How it is measured

  • Example

– The luminance at a surface due to a blue light

  • f a given intensity would be less than the

luminance at the same surface due to a yellow light of the same intensity. – Why? Humans perceive yellow light to be brighter than blue light

Light -- How it behaves

  • Reflection
  • Absorption
  • Refraction
  • Scattering
  • Diffraction / Interference
  • All can be wavelength dependent!!!

Light - Reflection

  • Angle of incidence = Angle of reflectance
  • Perfect mirror surface

i

θ

r

θ

Light - Absorption

  • What is not reflected, can be absorbed
slide-5
SLIDE 5

5

Light - Refraction

  • Bending of light as it travels through different media

i

η

t

η

i

θ

t

θ

d t n Where and are the indices of refraction. (http://www.physics.nwu.edu/ugrad/vpl/optics/snell.html)

i

η

t

η

t t i i

θ η θ η sin sin =

Light - Scattering

  • Light is scattered by small particles in its path (e.g. haze,

smoke, etc.)

  • Given by fraction of light with respect to direction from

particle light impact.

  • Size of particles are on the order of wavelengths of light.

α

r

Light -- Scattering

  • r << λ total absorption (no scattering)
  • r < λ

Rayleigh Scattering

  • r ≈ λ

Mie scattering

  • r >> λ Geometric optics

α

r

Light – Raleigh Scattering

  • Raleigh scattering (smoke / dust ), the

probability that the light will scatter in direction α.

) cos 1 ( 4 3 ) (

α + = P

Light – Mie Scattering

  • Mie Scattering (haze / fog)

8

2 cos 1 9 1 ) ( ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ + + = α α P

Sparse / hazy

32

2 cos 1 50 1 ) ( ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ + + = α α P

Dense / murky

Light -- How it behaves

  • Diffraction

– Bending of light around objects – Contributes to soft shadows, color bleeding

  • Interference

– Superimposition of two waves – Accounts for colors in thin films, bubbles, oil slicks, peacock feathers

slide-6
SLIDE 6

6

Light -- How it behaves

  • And of course…

– All can be wavelength dependent!!!

Light – How we specify

  • When placing lights in a virtual scene, you

must specify the following:

– Position / Direction – Intensity – Distribution – And of course…color

Light - Intensity

  • Describes the quantity of light emitted.
  • Most APIs use 0 – 1…This can be a problem,

we’ll see this later with tone reproduction

  • Assuming physical units:

– Radiometric

  • Point light source - radiant intensity
  • Area light source - radiant exitance / radiance

– Photometric

  • Point light source - luminous intensity
  • Area light source - luminance exitance / luminance

Light – Distribution

  • The strength of light emitted in different

directions

– Simple Point Light Source – Directional Light – Spotlight

  • Beam Shape
  • Beam Falloff
  • Intensity Falloff

Light - Simple Point Light Source

  • Light distributed equally in all directions

Light - Directional Light

  • Light distributed equally from a given

direction

  • Point light source at infinity is an estimation

for sunlight

slide-7
SLIDE 7

7

Light - Spotlight

  • Basic CG Spotlight

A

Light - Stage Lighting

  • Basic Shape -- cone

[Advanced Renderman]

Light - Stage Lighting

  • Shape

– Barn doors (beam shape)

Light - Stage Lighting

  • Shape – Gobos (use go between to shape beam)

Light - Stage Lighting

  • Beam Falloff

Light - Stage Lighting

  • Beam Falloff (at edge)
slide-8
SLIDE 8

8

Light -- Stage Lighting

  • Intensity Falloff

Light - Distribution

  • Area Light Sources

– sampled point sources within area

Light - Distribution

  • The Five-Times Rule

– Light can be considered a point light source if the distance from the lumiere to the surface is at least 5 times the largest dimension of the lumiere, i.e.., the largest dimension of the light. – Break

Light and Color

  • “Indeed rays, properly expressed, are

not colored”

  • - Sir Isaac Newton
  • I.e., light rays are not colored; we

perceive them as colored!

Light - Color

  • Color is the perceptual response to

light of wavelengths 400 - 700 nm hitting the retina.

  • Spectral power distributions exist in

the physical world but color exists only in the eye and brain, e.g., there is no real white light!

Light – Spectral Density Functions (SDF)

  • AKA spectral power distributions
  • Describes the distribution of the strengths of

light at given wavelengths emitted from a source.

slide-9
SLIDE 9

9

Light - Color

Black Body Radiators

Spectrum resulting from heating a standard

“body” to a given temperature

Plank’s formula:

) 1 ( ) , (

/ 5 1

2

− =

λ

λ λ

T c

e c T M

16 1

10 7418 . 3

× = c

2 2

10 4388 . 1

× = c

Light - Color

  • Black Body Radiators and daylight

– Daylight from the sun & total sky (5000K - 7000K) – D65 - Average daylight (6504K) – Daylight w/occluded sun (> 7000K) – Daylight from sun alone (< 5000K)

Light -- Color

  • Black Body Radiators and other light sources

Light - Color

  • Not all lighting sources have smooth SDFs

Light -- Color

Light Filters

Absorbs light at given

wavelengths

Allows light at other

wavelengths through

Using filters

Actual SDF is determined

by multiply SDF of light by SDF of filter wavelength by wavelength. SDF for a filter

Light and color

  • Absorption

– Material can absorb light on a wavelength by wavelength basis – Responsible for object color

slide-10
SLIDE 10

10

Light and color

  • The “color” of an object we see is a function of:

– Spectral qualities of the material being viewed:

  • Absorption
  • Reflection
  • Diffraction
  • Etc.

– Spectral qualities of the illuminating light.

Light and color

  • Color appearance applets

http://www.cs.rit.edu/~ncs/color/a_spectr.html http://www.cs.brown.edu/exploratories/freeSoftware /repository/edu/brown/cs/exploratories/applets/spe ctrum/reflection_guide.html

Light and Color

  • Color is the perceptual response to light of

wavelengths 400 - 700 nm hitting the retina.

  • When rendering, spectrum must be

sampled.

  • Color vision is inherently trichromatic.

Light and Color

  • CIE Experiments – used X,Y,Z values to quantify

chromatic characteristics of color stimuli

Light and Color

  • Color matching applet

http://www.cs.rit.edu/~ncs/color/a_game.html

  • There are lots of color spaces and most of the time

we can convert between them, but not always.

Light and Color

  • CIE RGB curves
  • 20
  • 10

10 20 30 40 3 7 5 4 4 2 5 4 5 4 7 5 5 5 2 5 5 5 5 7 5 6 6 2 5 6 5 6 7 5 7 7 2 5 7 5 Wavelength R G B

slide-11
SLIDE 11

11

Light and Color

  • CIE XYZ color matching curves

50 100 150 200 3 7 5 4 4 2 5 4 5 4 7 5 5 5 2 5 5 5 5 7 5 6 6 2 5 6 5 6 7 5 7 7 2 5 7 5 Wavelength X Y Z

Light and Color

  • Chromaticity coordinates (X,Y,Z have no

perceptual correlates, although Y is luminance, and x and z provide hue information)

Z Y X X x + + = Z Y X Y y + + = Z Y X Z z + + =

1 = + + z y x

Chromaticity Coordinates

  • often given in xyY
  • xy give the

chromaticity

  • Y gives brightness

x y

Light and Color

  • RGB (or any primary set) can be

determined from XYZ

– Need chromaticies of primaries and white point.

  • Primaries generally determined by device.
  • RGB values are incomplete without

specification of primaries & white point.

Light and Color

  • sRGB

– Standard proposed by Microsoft and HP – Based on ITU-R 709.BT – It is a lighting model for “many” CRTs

Z Y X B Z Y X G Z Y X R 0570 . 1 2040 . 0556 . 0416 . 8760 . 1 9692 . 4986 . 5374 . 1 2410 . 3 + − = + + − = − − =

Light and Color

  • sRGB

http://www.cs.rit.edu/~ncs/color/a_chroma.html

slide-12
SLIDE 12

12

Light and Color

  • Other color spaces

– HSV (hue-saturation-value) – CMYK (printing) – CIELAB / CIELUV (perceptual)

  • Why does CG use RGB?

– Convenience

Light -- Color

  • Full spectral renderers are hard to find

– Expensive in time and memory – Most renderers specify color using RGB triplet (red, green, blue) – For accuracy, must convert from SDF to RGB

  • Full spectral rendering going on at RIT

Munsell Color Lab (Mark Fairchild)

Light - Color

  • Converting from SDF to RGB.
  • 20
  • 10

10 20 30 40 3 7 5 4 4 2 5 4 5 4 7 5 5 5 2 5 5 5 5 7 5 6 6 2 5 6 5 6 7 5 7 7 2 5 7 5 Wavelength R G B

Light - Color

  • Converting from SDF (S) to RGB

=

λ

λ λ λ d S r R ) ( ) (

=

λ

λ λ λ d S g G ) ( ) (

=

λ

λ λ λ d S b B ) ( ) (

Light - Color

  • Converting from SDF to RGB

* * * = R = G = B Based on how “average” eye works

Light - Color

  • Problems with direct conversion to RGB

– Negative values – Which RGB? (may not match RGB of monitor)

  • Solution: Use XYZ space
slide-13
SLIDE 13

13

Light - Color

  • Converting SDF to XYZ

50 100 150 200 3 7 5 4 4 2 5 4 5 4 7 5 5 5 2 5 5 5 5 7 5 6 6 2 5 6 5 6 7 5 7 7 2 5 7 5 Wavelength y x z

Light - Color

  • Converting SDF to XYZ

=

λ

λ λ λ d S x X ) ( ) (

=

λ

λ λ λ d S y Y ) ( ) (

=

λ

λ λ λ d S z Z ) ( ) (

Light - Color

  • Converting from SDF to XYZ

* * * = X = Y = Z

Light - Color

  • Problems with using XYZ

– Non-intuitive – Not an abundance of XYZ renderers

  • Good if you are starting with SDFs
  • Good as an interchange space

Light - Color

  • Converting XYZ -> RGB

– need definition of your primaries (R, G, B) in terms of XYZ coordinates

Z r Y r X r R

Z Y X

+ + = Z g Y g X g G

Z Y X

+ + = Z b Y b X b B

Z Y X

+ + =

Light - Color

  • Converting XYZ -> RGB

– Construct the following matrix:

= ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡

Z Z Z Y Y Y X X X

b g r b g r b g r M

slide-14
SLIDE 14

14

Light - Color

  • Converting from XYZ->RGB

⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ = ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ Z Y X B G R

⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡

Z Z Z Y Y Y X X X

b g r b g r b g r Light - Color

  • Converting from RBG -> XYZ

– Invert matrix – For any color (R, G, B) we can calculate (X,Y,Z)

⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ = ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ B G R Z Y X

⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡

Z Z Z Y Y Y X X X

b g r b g r b g r

  • 1

Light - Color

  • White Point

– Chromaticity of point (1, 1, 1)

⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ = ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ 1 1 1 Z Y X

⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡

Z Z Z Y Y Y X X X

b g r b g r b g r

  • 1

Light - Color

  • Color space conversion applet

http://www.cs.rit.edu/~ncs/color/a_spaces.html

Light -- Color

  • A SDF will result in a single RGB triplet.
  • However, an RGB triplet can be the result of many

SDFs.

  • Metamer -- Separate SDFs that produce the same

sensation of color.

  • Interestingly though, reflectance and transmission

reactions are not necessarily the same, nor need the response be the same under different light sources!

Light - Color

  • Example of Metamers (perceived the same)
slide-15
SLIDE 15

15

Light - Color

  • Metamers applet

http://www.cs.brown.edu/exploratories/freeSoftware /repository/edu/brown/cs/exploratories/applets/spe ctrum/metamers_guide.html

Light – Color Summary

  • In order to produce photorealistic images, we

really need to know a lot about light, color and perception!

  • Physical world -- light expressed using SDFs

– Standards based on physics – Filters

  • Perceptual World - color triplets

– RGB / XYZ – Metamers

Further Reading

  • Ashdown, Ian, “Photometry and Radiometry: A

Tour for Computer Graphics Enthusiasts”

  • Gartaganis, Tartar, “Wave-Based Spectrum

Rendering”, TR

  • Wyszecki, Stiles, “Color Science Concepts and

Methods”

  • Poynton, Technical Introduction to Digital Video
  • http://www.cs.rit.edu/~ncs/color/