Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of...

67
Rendering Light Reflection Models Visual Imaging in the Electronic Age Donald P. Greenberg October 17, 2019 Lecture #14

Transcript of Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of...

Page 1: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

RenderingLight Reflection Models

Visual Imaging in the Electronic Age

Donald P. GreenbergOctober 17, 2019

Lecture #14

Page 2: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Ivan Sutherland - 1963

Page 3: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Program of Computer Graphics, Cornell University

General Electric - 1967

Page 4: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Program of Computer Graphics, Cornell University

DPG - 1967

Page 5: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Program of Computer Graphics, Cornell University

Cornell in Perspective Film

Page 6: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)
Page 7: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Model

Camera

Perspective

RasterOperations

ImageStorage

Display

Direct Illumination

Page 8: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

• Perspective transformationMatrix multiplication

• Clipping

• Culling

Model

Camera

Perspective

RasterOperations

ImageStorage

Display

Perspective Transformation

Page 9: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Goal of Realistic Imaging

“The resulting images should be physically accurate and perceptually indistinguishable from real world scenes”

Page 10: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

From Strobel, Photographic Materials and Processes © Focal Press, 1986.

Goal of Realistic Imaging

Page 11: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

The geometry is better understood with correct lighting and shading.

Lighting

Jeremy Birn, “[digital] Lighting & Rendering”, 2000 New Riders Publishers

Page 12: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

9999766

997333

9914111

77977

557999

555799

555799

6 6 9 9 9 97

9999766

997333

9914111

77977

557999

555799

555799

6 6 9 9 9 97

Direct Lighting and Indirect Lighting

Direct

Indirect

Direct

Page 13: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Direct Lighting and Indirect Lighting

Page 14: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Assumptions In Direct LightingLight travels directly from light source to all object surfaces (no occlusion) ∴ no shadows

All light sources are point light sources (no geometric area)

No interreflections from any surfaces

Lights maybe “directional”, “spot” or “omni lights”

Page 15: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Cornell Box with Cameras

Page 16: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Photograph

Page 17: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Rendering Framework 1997

Page 18: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

• Conversion from polygonsto pixels

• Hidden surface removal(z-buffer)

• Incremental shading

Model

Camera

Perspective

RasterOperations

ImageStorage

Display

Raster Operations

Page 19: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Smooth Surface, Rough Surface, Combination

Roy S. Berns. “Billmeyer and Saltzman’s Principles of Color Technology, 3rd Ed. 2000, John Wiley & Sons, Inc. p. 12.

Page 20: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Reflectance - Three Forms

Ideal diffuse (Lambertian)

Directionaldiffuse

Idealspecular

Page 21: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

N Light Source

θ

Observer

I

I = kd cosθ

L

Diffuse Reflections

Page 22: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

How do you find the angle 𝛳𝛳?

• If you know the surface definition (it’s planar equation), you can find it’s normal direction 𝑁𝑁. A unit normal in this direction is �𝑁𝑁 |𝑁𝑁|

• If you know the location of the light source 𝐿𝐿, you can find the illumination direction 𝐿𝐿. A unit normal in this direction is �𝐿𝐿 |𝐿𝐿|

Page 23: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Cosine Calculations

Dot Product Definition

LL

NN

LNLN

LNLN

⋅=⋅

=

=⋅

θ

θ

cos

cos

Usually, the normal and light source vector directions are given as unit normals.

Page 24: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Gouraud Thesis

Gouraud Flat Polygon Shading

Each polygon is shaded based on a single normal.

Page 25: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

D

CB

A

P R Qscan line

12

34

The shading at point R is computed as

two types of successive linear interpolations:

across polygon edges: P between A and B,

Q between A and D;

across the scan line: R between P and Q.

Four polygons approximating a surface in the vicinity of point A.

Gouraud Smooth Shading

Gouraud Thesis

Page 26: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Gouraud Thesis

Gouraud Smooth Shading

Each pixel is shaded by interpolating intensities computed at each of the polygon’s vertices.

Page 27: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Steps in Gouraud Shading• For each polygon

– Compute vertex intensities (using any illumination model)– Compute slopes (linear interpolation) in spatial (image)

domain (picture plane) and intensity domain (real environment)

– Increment by scan line

• For each scan line– Compute slope in intensity domain (real environment)– Render each pixel

Note the intensity computations are based on object space data, but all interpolation is done in image space.

Page 28: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Jeremy Birn. Digital Lighting & Rendering , p. 74.

Diffuse Shading

Page 29: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Between Analogue and Digital

Daniel Rozin, “Wooden Mirror”

Page 30: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Daniel Rozin, “Wooden Mirror” close-up

Page 31: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Specular Shading

Viennese Siler, Modern Design 1780-1918) Teapot, Jakob Krautauer, Vienna 1802 – Silver, fruitwood, H 14.8 cm/5.9 in.

Page 32: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Phong Model Assumptions

• The reflection function can be represented by three components: a constant ambient term, and diffuse and specular components

• Isotropic (rotationally symmetric)

• Point or parallel light source (one vector direction)

• Computationally simple

Page 33: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

N Light Sourceθrβ

I = ks cosnβ

R

I

ObserverV

θi L

Phong Model Specular Reflection

Page 34: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

How do you find the angle 𝜷𝜷?

• If you know the illumination direction 𝐿𝐿, you can find the reflection direction 𝑅𝑅 (angle of reflection = angle of incidence)

• If you know the location of the observer, you can find the view direction 𝑉𝑉

• The specular reflection component is a function of the angle 𝜷𝜷, the angle between the view direction and the reflection vector

Page 35: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Variation of cosnβ

Page 36: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Diffuse =Specular =

Mirror Reflection VectorDiffuse SpecularIj

V

)( LNkd ⋅n

s VRk )( ⋅

Phong Reflection Model

R

Page 37: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Phong Goblet

Bui Toung Phong Thesis

Page 38: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Phong Equation𝐼𝐼 = 𝐼𝐼𝑎𝑎 + 𝐼𝐼𝑑𝑑 + 𝐼𝐼𝑠𝑠

= [𝑘𝑘𝑎𝑎+𝑘𝑘𝑑𝑑(𝑁𝑁 � 𝐿𝐿)](𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜 𝑜𝑜𝑜𝑜𝑐𝑐𝑜𝑜𝑐𝑐) + 𝑘𝑘𝑠𝑠(𝑅𝑅 � 𝑉𝑉)2(𝑐𝑐𝑙𝑙𝑙𝑙𝑙𝑜𝑜 𝑜𝑜𝑜𝑜𝑐𝑐𝑜𝑜𝑐𝑐)

Where 𝑘𝑘𝑎𝑎= constant ambient term and 𝑘𝑘𝑎𝑎+𝑘𝑘𝑑𝑑 + 𝑘𝑘𝑠𝑠 = 1

Page 39: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Phong Model with Constant Ambient Term and Variations of Specular Exponent

Roy Hall

Page 40: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Phong Model with Constant Specular Exponent and Variation of Ambient Term

Roy Hall

Page 41: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

dωidωr

θi θr

ϕi ϕr

Reflection Geometry (BRDF)

Bidirectional Reflection Distribution Function

Page 42: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Light Measurement Laboratory

Page 43: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

SpectroradiometerMirror

Light Source

SampleMirror

Gonioreflectometer

Page 44: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Bidirectional Reflectometer

Page 45: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

First surface reflections

Multiple surface reflections

Subsurface reflections

Reflection Processes

Page 46: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Gaussian Distribution

m = 0.2

m = 0.6

Where m=root mean square slope of the microfacets

Page 47: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Aluminum, σ0=0.28µ

Experiment Data

Page 48: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Comparison of experiment and theory

Aluminum σ0= 0.28µ, τ =1.77µ

Page 49: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

λ

θ

specular

uniform diffuse

directional diffuse

τ σ

Bidirectional Reflectance (BRDF)

Page 50: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Retro-Reflection

Page 51: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Retroreflection

Page 52: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Reflectance of Copper Mirror

Page 53: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Light Reflected from Copper

Page 54: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Cook’s Fresnel Approximation

Page 55: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Cook’s Copper Spheres

Page 56: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Cook-Torrance Renderings

Page 57: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Copper-colored plastic Copper

Copper Vase

Page 58: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Vinyl Substrate(white)

Pigment Particles(colored)

Specular Reflection(white)

Diffuse Reflection(colored)

Incident Light

Reflection from Plastic

Page 59: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

The geometry of scattering from a layered surfaceACM Computer Graphics, SIGGRAPH 1993 p. 166

Page 60: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Phong Goblet

Bui Toung Phong Thesis

Page 61: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Brushed Stainless Steel

Page 62: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Henrik Wann Jensen, Stephen R. Marschner, Marc Levoy, Pat Hanrahan. “A Practical Model for Subsurface Light Transport,” ACM Siggraph 2001, August 2001, Los Angeles, CA, pp. 511-518.

Page 63: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

Schematic model of the image processACM Transactions on Graphics, SIGGRAPH 2003 p. 773

Page 64: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)
Page 65: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

3D Studio Max: Material Editor

Page 66: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

3D Studio Max: Material Editor

Page 67: Light Reflection Models - Computer Graphics · Lecture #14. Ivan Sutherland - 1963. Program of Computer Graphics, Cornell University. ... (angle of reflection = angle of incidence)

End. . .