Specular Reflection CS418 Computer Graphics John C. Hart Diffuse - - PowerPoint PPT Presentation

specular reflection
SMART_READER_LITE
LIVE PREVIEW

Specular Reflection CS418 Computer Graphics John C. Hart Diffuse - - PowerPoint PPT Presentation

Specular Reflection CS418 Computer Graphics John C. Hart Diffuse Reflection diffuse reflection Specular Reflection diffuse reflection diffuse + specular reflection Specular Reflection n v l Specular gleem is a diffused mirror


slide-1
SLIDE 1

Specular Reflection

CS418 Computer Graphics John C. Hart

slide-2
SLIDE 2

Diffuse Reflection

diffuse reflection

slide-3
SLIDE 3

Specular Reflection

diffuse reflection diffuse + specular reflection

slide-4
SLIDE 4

Specular Reflection

l n θ θ v Specular gleem is a diffused mirror reflection of the light source

slide-5
SLIDE 5

Specular Reflection

v l n θ θ r

φ

Specular gleem is a diffused mirror reflection of the light source Gleem falls off as eye moves away from mirror-bounce reflection direction

slide-6
SLIDE 6

Specular Reflection (Phong)

v l n θ θ r

φ

Lo= Li ks cosn φ

% of light reflected (rest is absorbed)

slide-7
SLIDE 7

Specular Reflection (Phong)

v l n θ θ r

φ

Lo= Li ks cosn φ = Li ks (v⋅r) n

slide-8
SLIDE 8

Specular Reflection (Phong)

v l n θ θ r

φ

Lo= Li ks cosn φ = Li ks (v⋅r) n l n r

θ n⋅l

slide-9
SLIDE 9

Specular Reflection (Phong)

v l n θ θ r

φ

Lo= Li ks cosn φ = Li ks (v⋅r) n s = (n⋅l)n – l l n r s

θ n⋅l

slide-10
SLIDE 10

Specular Reflection (Phong)

v l n θ θ r

φ

Lo= Li ks cosn φ = Li ks (v⋅r) n s = (n⋅l)n – l r = l + 2s l n r s

θ n⋅l

slide-11
SLIDE 11

Specular Reflection (Phong)

v l n θ θ r

φ

Lo= Li ks cosn φ = Li ks (v⋅r) n s = (n⋅l)n – l r = l + 2s = l + 2(n⋅l)n – 2l = 2(n⋅l)n – l l n r s

θ n⋅l

slide-12
SLIDE 12

Specular Reflection (Blinn)

v l n θ θ

φ

h = (l + v)/||l + v|| Lo= Li ks cosn φ = Li ks (n⋅h) n h

slide-13
SLIDE 13

Specular Reflection (Blinn)

r = 2(n⋅l)n – l Lo= Li ks cosn φ = Li ks (v⋅r) n (Phong) v l n θ θ

φ

h = (l + v)/||l + v|| Lo= Li ks cosn φ = Li ks (n⋅h) n h v l n

θ θ φ

r

slide-14
SLIDE 14

The Phong Lighting Model

  • Monochromatic

Lo = ka La + Li (kd n⋅l + ks (v⋅r)n ) = + +

slide-15
SLIDE 15

The Phong Lighting Model

  • Monochromatic

Lo = ka La + Li (kd n⋅l + ks (v⋅r)n )

  • Tristimulus (RGB) color model

Lo(R) = ka(R) La(R) + Li(R) (kd(R) n⋅l + ks(R) (v⋅r)n ) Lo(G) = ka(G) La(G) + Li(G) (kd(G) n⋅l + ks(G) (v⋅r)n ) Lo(B) = ka(B) La(B) + Li(B) (kd(B) n⋅l + ks(B) (v⋅r)n ) = + +

slide-16
SLIDE 16

The Phong Lighting Model

  • Monochromatic

Lo = ka La + Li (kd n⋅l + ks (v⋅r)n )

  • Tristimulus (RGB) color model

Lo(R) = ka(R) La(R) + Li(R) (kd(R) n⋅l + ks(R) (v⋅r)n ) Lo(G) = ka(G) La(G) + Li(G) (kd(G) n⋅l + ks(G) (v⋅r)n ) Lo(B) = ka(B) La(B) + Li(B) (kd(B) n⋅l + ks(B) (v⋅r)n )

  • Multiple light sources

Lo = ka La + Li(1) (kd n⋅l(1) + ks (v⋅r(1))n ) + Li(2) (kd n⋅l(2) + ks (v⋅r(2))n ) + … = +

slide-17
SLIDE 17

Attenuation

  • Local Illumination

Lo = ka La + Li (kd n⋅l + ks (v⋅r)n ) v l e lp x n x0 x2 x1 Li Lo

slide-18
SLIDE 18

Attenuation

  • Local Illumination

Lo = ka La + Li (kd n⋅l + ks (v⋅r)n )

  • Global Illumination

Li = Fatt(||x-e||) Ls Le = Fatt(||x-e||) Lo e lp x Li Lo Le Ls

slide-19
SLIDE 19

Attenuation

  • Local Illumination

Lo = ka La + Li (kd n⋅l + ks (v⋅r)n )

  • Global Illumination

Li = Fatt(||x-e||) Ls Le = Fatt(||x-e||) Lo e lp x Li Lo Le Ls

Sphere Area = 4 π r2 Physical: Fatt(d) = 1/d2 Plausible:Fatt(d) = 1/(F0 + F1d + F2d2)