Shading I June 22, 1999 Motivational Film Graphic Violence - - PowerPoint PPT Presentation

shading i
SMART_READER_LITE
LIVE PREVIEW

Shading I June 22, 1999 Motivational Film Graphic Violence - - PowerPoint PPT Presentation

Shading I June 22, 1999 Motivational Film Graphic Violence Gritz, Bergen, Darken (1991) first use of BMRT Mr Will Goes Sailing June 22, 1999 Logistics Projects Returned proposals Proposal comments Accept /


slide-1
SLIDE 1

Shading I

June 22, 1999

slide-2
SLIDE 2

June 22, 1999

Motivational Film

✔Graphic Violence

– Gritz, Bergen, Darken (1991) – first use of BMRT

✔Mr Will Goes Sailing

slide-3
SLIDE 3

June 22, 1999

Logistics

✔Projects

– Returned proposals – Proposal comments

  • Accept / Please Resubmit
  • Recall: Projects will be judged on what is in the

proposal

– Reminder: Report is bulk of project – Resubmitted proposals due next class

slide-4
SLIDE 4

June 22, 1999

Logistics

✔Projects

– Using Java3d/VRML/directX/….

  • These are tools (much like “C”)
  • Need specifics of what you want to do with it.
  • Best way to learn is to implement

something…be clear on what that something is.

  • I need to know what to expect from your project

and presentation.

slide-5
SLIDE 5

June 22, 1999

Logistics

✔Paper summaries on Shading I

– Any takers?

✔Slides on Web

– Now in B&W and Color

slide-6
SLIDE 6

June 22, 1999

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, esp, a film in a camera.

Yeah, we get it…photography, light…whatever..

slide-7
SLIDE 7

June 22, 1999

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

slide-8
SLIDE 8

June 22, 1999

Today’s Class

✔Shading

– Bidirectional reflectance distribution functions (BRDFs) – Shading Models – Using Empirical Data

slide-9
SLIDE 9

June 22, 1999

Shading

✔Computing the light that leaves a point ✔Shading point - point under investigation ✔Shading model - function or algorithm

used in determining the shading.

✔For efficiency’s sake, most shading

models are approximations.

slide-10
SLIDE 10

June 22, 1999

BDRF

✔Bidirectional Reflectance Function

) , , , (

r r i i r

f BDRF θ φ θ φ =

✔At a given point, gives relative reflected

illumination in any direction with respect to incoming illumination coming from any direction

slide-11
SLIDE 11

June 22, 1999

BDRF

✔BDRF Geometry

slide-12
SLIDE 12

June 22, 1999

BDRF

✔Can return any positive value. ✔Generally wavelength specific.

) , , , , ( λ θ φ θ φ

r r i i r

f BDRF =

slide-13
SLIDE 13

June 22, 1999

Shading Models

✔Shading model - function or algorithm

used in determining the shading.

✔Revise to…

– function or algorithm used in approximating the BDRF.

slide-14
SLIDE 14

June 22, 1999

Shading Models

✔Shading Models and Viewing Direction

– Generally, BRDFs are independent of viewing direction – Most shading models take viewing direction into consideration

slide-15
SLIDE 15

June 22, 1999

Shading Models

✔Geometry

slide-16
SLIDE 16

June 22, 1999

Shading Models

✔Geometry

– N - normal vector – S - direction of incoming light – R - direction of perfect mirror reflection – H - halfway between light direction and viewing direction. – V - viewing direction.

slide-17
SLIDE 17

June 22, 1999

Shading Models

✔Recall from Linear Algebra

θ u v

θ cos v u v u =

slide-18
SLIDE 18

June 22, 1999

Shading Models

✔Lambertian ✔Phong ✔Cook-Torrance ✔Strauss ✔Ward

slide-19
SLIDE 19

June 22, 1999

Shading Models

✔Lambert Model

– Perfectly diffuse surface – reflection is constant in all directions (kd)

slide-20
SLIDE 20

June 22, 1999

Shading Models

✔Lambert Model

θ cos ) (

d Sk

L V L = ) ( ) ( S N k L V L

d S

  • =
slide-21
SLIDE 21

June 22, 1999

Shading Model

✔ Lambert Model

– why cos θ? – Surface has differential area dA – Intensity varies with projected area on surface – Projected area = cos θ

slide-22
SLIDE 22

June 22, 1999

Shading Models

✔Phong Model

– introduces specular (mirror like) reflections – three components

  • ambient - background light (ka)
  • diffuse - lamberian reflection (kd)
  • specular - mirror like reflection(ks)
slide-23
SLIDE 23

June 22, 1999

Shading Models

✔Phong Model

  • specular

diffuse ambient

V) R ( N) S ( ) (

∑ ∑

  • +
  • +

=

i k i i s i i i d a a

e

L k L k L k V L

slide-24
SLIDE 24

June 22, 1999

Shading Models

✔Phong - Blinn

– Uses halfway angle rather than reflected

  • specular

diffuse ambient

V) H ( N) S ( ) (

∑ ∑

  • +
  • +

=

i k i i s i i i d a a

e

L k L k L k V L

slide-25
SLIDE 25

June 22, 1999

Shading Models

✔Any questions

– diffuse vs specular reflections

✔Move on to Cook - Torrance model.

slide-26
SLIDE 26

June 22, 1999

Shading Models

✔Cook-Torrance Model

– based on physics of a surface – components

  • microfacet model - describes geometry of

surface

  • Fresnel term - describes reflectance
  • Roughness - describes microfacet distribution.
slide-27
SLIDE 27

June 22, 1999

Shading Models

✔Cook-Torrance / Microfacets

– surface is composed of V shaped grooves (microfacets) – Light interactions with microfacets

  • Reflect - causes specular reflections
  • Scatter - causes diffuse reflections
slide-28
SLIDE 28

June 22, 1999

Shading Models

✔Cook-Torrance / Microfacets

slide-29
SLIDE 29

June 22, 1999

Shading Models

✔ Cook-Torrance / Microfacets - GeometryTerm

     

  • =

H) (V S) H)(N N ( 2 , H) (V V) H)(N N ( 2 , 1 min G

slide-30
SLIDE 30

June 22, 1999

Shading Model

✔Cook-Torrance / Fresnel Equation

– Describes reflectance – Function of:

  • Wavelength of incident light (λ)
  • index of refraction (η(λ))
  • extinction coefficient (ease at which wave can

penetrate a surface) (κ(λ))

  • angle of incidence (θ)
slide-31
SLIDE 31

June 22, 1999

Shading Models

✔Fresnel Equations

θ θ θ θ

2 2 2 2 2 2

cos cos 2 cos cos 2 + + + + − + = a b a a b a Fs

θ θ θ θ θ θ θ θ

2 2 2 2 2 2 2 2

tan sin tan sin 2 tan sin tan sin 2 + + + + − + = a b a a b a F F

s p

a, b are functions

  • f η, κ, and θ

p s

F F F 2 1 2 1 + =

For unpolarized light

slide-32
SLIDE 32

June 22, 1999

Shading Models

✔Cook-Torrance / Fresnel

– If all quantities known, use Fresnel equations – If not, approximate using reflectance off normal

  • See [Glassner] or [Cook/Torrance81] for details
slide-33
SLIDE 33

June 22, 1999

Shading Model

✔Cook-Torrance / Roughness

– Characterizes the distribution of the slopes

  • f the microfacets

– Roughness parameter, m

  • m between 0 -1
  • small m - smooth surface, specular reflectance
  • large m - rough surface, diffuse reflectance
slide-34
SLIDE 34

June 22, 1999

Shading Model

✔Cook-Torrance / Roughness

2

) / ( m

ce D

γ −

=

γ

γ 4 2 ) / ) ((tan

cos

2

m e D

m −

=

Gaussian Model Beekman Model

slide-35
SLIDE 35

June 22, 1999

Shading Models

✔Cook-Torrance / Roughness

slide-36
SLIDE 36

June 22, 1999

Shading Models

✔Cook-Torrance/putting it all together

  • diffuse

specular d s r

df sf f + =

π 1 =

d

f

V) S)(N N ( 1

  • ×

× = G D F fs π

slide-37
SLIDE 37

June 22, 1999

Shading Models

✔Complete Cook-Torrance Model

  • +

=

i i r i a a r

d f L R L L ϖ ) S)( N (

slide-38
SLIDE 38

June 22, 1999

Shading Models

✔Cook-Torrance -- examples

slide-39
SLIDE 39

June 22, 1999

Shading Models

✔Cook-Torrance summary

– Complicated model based on physics – Components

  • Microfacets
  • Fresnel equation
  • Roughness
slide-40
SLIDE 40

June 22, 1999

Shading Models

✔Strauss Model [Strauss90]

– Designed for ease of use and efficiency – Intuitive parameter set – Takes some liberty with physics.

slide-41
SLIDE 41

June 22, 1999

Shading Models

✔Strauss Model - parameter set

– Color – Smoothness - 0 = perfectly diffuse, 1 = perfectly specular – Metalness - 0 = dielectric, 1 = metal – Transparency – Index of Refraction.

slide-42
SLIDE 42

June 22, 1999

Shading Models

✔Anisotropy

– Isotropic - surfaces reflect equally from any direction of view – Ansiotropic - reflection varies not only with angle of incidence, but also with the angle

  • f the incident light w.r.t some viewing

angle

slide-43
SLIDE 43

June 22, 1999

Shading Models

✔Ansiotropic reflection -- example

slide-44
SLIDE 44

June 22, 1999

Shading Models

✔Ward Model [Ward92]

– Designed for both accuracy and ease of use – Includes model for ansiotropic reflection

slide-45
SLIDE 45

June 22, 1999

Shading Models

✔Ward Model

  • specular

2 / ) (tan diffuse

) 2 cos cos 1 (

2 2

πα δ θ ρ π ρ ρ

α γ −

  • +

= e

s d

slide-46
SLIDE 46

June 22, 1999

Shading Model

✔Ward Model

– ρd - Diffuse reflectance coefficient (can vary with wavelength) – ρs - Speculat reflectance coefficient (can vary with wavelength) – α - Standard deviation of surface slope

slide-47
SLIDE 47

June 22, 1999

Shading Models

✔Ward Model -- w/ansiotropy

  • specular

)) / sin / (cos (tan diffuse

) 2 cos cos 1 (

2 2 2 2 2

y x s d

y x

e α πα δ θ ρ π ρ ρ

α φ α φ γ + −

  • +

=

slide-48
SLIDE 48

June 22, 1999

Shading Models

✔Ward Model w/ ansiotropy

– αx - Standard deviation of surface slope in x-direction – αy - Standard deviation of surface slope in y-direction

slide-49
SLIDE 49

June 22, 1999

Shading Models

✔Ward Model - example

slide-50
SLIDE 50

June 22, 1999

Shading Models

✔Other ansiotropic models (all based on

physics)

– [Kajia85] – [Poulin90] – [He91]

slide-51
SLIDE 51

June 22, 1999

Measuring BDRFs

✔Can use empirical data ✔BDRFs measured using a goniometer ✔See [Ward92]

slide-52
SLIDE 52

June 22, 1999

Measuring BDRFs

slide-53
SLIDE 53

June 22, 1999

Measuring BDRFs

✔Storage using spherical sampling

slide-54
SLIDE 54

June 22, 1999

Measuring BDRFs

✔BDRF Database

– http://www.cs.columbia.edu/CAVE/curet

slide-55
SLIDE 55

June 22, 1999

Summary

✔BDRFs - defines reflection off surface in

each direction as result from light arriving at each direction.

✔Shading models - approximations to

BDRF

✔Can use measured BDRFs

slide-56
SLIDE 56

June 22, 1999

Summary -- Shading Models

✔Lambert Model ✔Phong Model ✔Cook-Torrance (heavy on the physics) ✔Strauss ✔Ward Model (ansiotropic)

slide-57
SLIDE 57

June 22, 1999

Further Reading

✔Glassner, Principles of Digital Image

Synthesis, Chapter 15.

✔See paper list (on Web) for papers on

individual models

– [Cook81] – [Ward92] [Kajiya85] [Poulin90][He91] – [Strauss90]

slide-58
SLIDE 58

June 22, 1999

Next Class

✔Functional Shading

– Texture Mapping – Procedural Textures – Shading Languages

slide-59
SLIDE 59

June 22, 1999

Remember

✔Resubmitted proposals due next class.

slide-60
SLIDE 60

June 22, 1999

Remember

✔Class Web Site:

– http://www.cs.rit.edu/~jmg/virtualPhoto

✔Any questions?