cs 563 advanced topics in computer graphics spectral...

27
CS 563 Advanced Topics in Computer Graphics Spectral Rendering by Emmanuel Agu

Upload: others

Post on 18-Jun-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

CS 563 Advanced Topics in Computer GraphicsSpectral Rendering

by Emmanuel Agu

Page 2: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Iridescent Colors

Colors seen change with viewer angleKurt Nassau classic book, Physics and Chemistry of Color: 15 color-causing mechanisms4 of those mechanisms produce iridescent colors

Dispersive refraction: prismScattering: RainbowInterference: oil slicksDiffraction: CD ROMs

Page 3: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Light wavelengths

White light: equal amount of all light wavelengthsDifferent light types: different wavelengths in itVisible spectra: 380nm – 720nm wavelengths

Red - 680nm, Green – 550nm, Blue – 450 nmRGB rendering samples only 3 wavelengths

Page 4: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Iridescence Mechanisms

Non-iridescent materials: All wavelengths reflected/refracted same paths.

Red surface: suppresses most wavelengths except redWavelength variations slow. RGB rendering okay

Page 5: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Iridescence Mechanisms

Iridescent mechanisms: different wavelengths = different paths. Each wavelength has different SPDUndersampling gives wrong final colorRGB sampling inadequate!!Sample more wavelengths

Iridescent surface

Color viewer Sees depends on view angle

Page 6: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Optics models describe per-wavelength behavior f(λ)RGB rendering samples only three wavelengthsGeneral approach:

Generate sample wavelengthsCast rays at sampled wavelengthsEvaluate reflectance function at sampled wavelengthConvert each sample to its RGB valueSum reflectance function at sampled wavelengths

Spectral rendering same for all iridescent phenomenaFunction evaluated at surface is different though

Spectral Rendering

Page 7: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Iridescence Mechanisms

Optics models at different levels of accuracyRay optics: Draw lines depicting light pathsGeometric optics: Add simple interactions at surfacesWave optics: Model light as a wave - polarizationElectromagnetic optics: Model light as wave, add polarizationQuantum optics: Quantum physics, over-kill for graphics

Today: mostly geometric optics, a bit of wave optics

Page 8: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Dispersive Refraction

(e.g. glass prism) index of refraction varies with wavelength. i.e.

1.54 for blue wavelength, 1.5 for red wavelength

Differences in index of refraction causes bending of wavelengths different anglesResult: different view angles, different colorsMusgrave, Graphics Interface 1989, Prisms & Rainbows

)(ληη ⇒

Page 9: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Refraction

Refraction in diamonds

Page 10: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Interference

Oil slicksSki visorsSoap bubblesCar windshieldsThin film layer: different wavelengths interfere constructively in different directions

Thin Film

Color viewer Sees depends on view angle

Page 11: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Thin film: soap bubbles

David Harju's and Simon Que's, Stanford rendering contest ‘08Based on Andrew Glassner, IEEE CG&A 2000 paper

Page 12: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Diffraction

What is diffraction?Diffraction is the ability of waves to “bend” around objects

The most accessible occurrence of this is sound

Page 13: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Diffraction

Single-slit interferenceLarge slit: no effectIf slit width small (compared to wavelength), bends incident light, passes one Huygen wavelet

Page 14: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Diffraction

Double-slit interference

Bent waves from slits interfere:Constructive where the crests meetDestructive where the troughs meetDoesn’t follow simple linear super-position

Page 15: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Diffraction

Huygen’s Principle( 1678 )States that points along a planar wave-front act as secondary point sources themselves( spherical wavelets )

Page 16: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Diffraction

Two general casesFraunhofer diffraction: viewer many wavelengths awayFresnel diffraction: viewer a few wavelengths away

Agu and HillGeometric optics solution, fraunhofer diffraction, N slitsHuygens Fresnel allows superposition, find closed form formula of intensity of each wavelength as function of view angleAlso use Blinn’s halfway vector formula

( )

( )

slitsthe between widthb

d

kb

NN

II

i

i

=

Θ−Θ=

Θ−Θ=

⎟⎟⎠

⎞⎜⎜⎝

⎛⎟⎟⎠

⎞⎜⎜⎝

⎛=

λπα

β

αα

ββ

)sin()sin(

)sin()sin(2

)(sin)(sin)sin(1

2

22

20

Page 17: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Diffraction

Intensity of Fraunhofer diffraction

From http://physics.nad.ru/Physics/English/stri_txt.htm

Page 18: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Agu and Hill

Rendering results

Page 19: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Diffraction

Simpler form used in Nakamae et al, “A Lighting Model Aiming at Drive Simulators”, SIGGRAPH 1990

Image from http://www.eml.hiroshima-u.ac.jp/gallery/ - diffraction from eyelashes and pupils(1990)

Page 20: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Diffraction: Wave Optics

Huygens and the Fresnel-Kirchhoff formulaStam introduced wave optics approach. Wave optics formula relating incoming to outgoing wave is precise mathematical form called Fresnel-Kirchhoff formula

Solving the Kirchoff Formula, Stam arrived at the following wavelength-dependent BRDF

( ) ( )[ ]dArnrnrr

eeikUUrrikti

p ′−′

−= ∫ ∫

′+−

,cos,cos4

)()(0

π

ω

Page 21: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Stam’s Result

Page 22: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Diffraction

Yinlong Sun et al: Alternate technique, modelled CD ROM tracks, composite spectral model

Page 23: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Structural Colors

Iridescent colors caused by some animal skinsMorpho butterflyHummingbird wingsSnakesBeetles

Usually model as multi-layer thin film interference

Page 24: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Morpho Butterfly

Iman Sadeghi, UCSD 2007 rendering contestImplemented 2006 paper by Yinlong Sun

Page 25: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Phosphorescence &Flourescence

PhosphorescenceLight absorbedRe-emitted diffusely at later time (>10-8 secs)Glassner: define delay function, scaling function for incident light

FlourescenceAbsorb light at one wavelengthRe-emit light immediately (>10-8 secs) at another wavelengthGlassner: Declare scaling function from input wavelength to output wavelength

Page 26: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

Flourescence Example

Wilkie et al, EGRW, 2001UV backlight, Walls and object painted with flourescentpigment

Page 27: CS 563 Advanced Topics in Computer Graphics Spectral Renderingweb.cs.wpi.edu/.../cs563/S10/talks/wk12_emmanuel_spectral_renderi… · Phosphorescence & Flourescence Phosphorescence

References

Daniel Mooney, Diffraction, CS 563 presentation, Spring 2003Grant R. Fowels, Introduction to Modern Optics. Dover Publications, Inc., New York, 1975R.W.Ditchburn, Light. Dover Publications, Inc., New York, 1991Yinlong Sun, F.David Fracchia and Mark S. Drew, A Composite Spectral Model and Its ApplicationsYinlong Sun, F.David Fracchia, Mark S. Drew and Thomas W. Calvert, Rendering Iridescent Colors of Optical Disks. School of Computing Science, Simon Fraser University, Burnaby, BC, CanadaEmmanuel Agu and Francis S.Hill Jr., Diffraction Shading Models for Iridescent Surfaces.Garrett M.Johnson and Mark D.Fairchild, Full Spectral Color Calculations in Realistic Image Synthesis. Rochester Inst. of Tech.Brian Smits, An RGB to Spectrum Conversion for Reflectances. University of Utah