SLIDE 1
Specular Reflection CS418 Computer Graphics John C. Hart Diffuse - - PowerPoint PPT Presentation
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 2
SLIDE 3
Specular Reflection
diffuse reflection diffuse + specular reflection
SLIDE 4
Specular Reflection
l n θ θ v Specular gleem is a diffused mirror reflection of the light source
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
Specular Reflection (Phong)
v l n θ θ r
φ
Lo= Li ks cosn φ
% of light reflected (rest is absorbed)
SLIDE 7
Specular Reflection (Phong)
v l n θ θ r
φ
Lo= Li ks cosn φ = Li ks (v⋅r) n
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
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
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
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
Specular Reflection (Blinn)
v l n θ θ
φ
h = (l + v)/||l + v|| Lo= Li ks cosn φ = Li ks (n⋅h) n h
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
The Phong Lighting Model
- Monochromatic
Lo = ka La + Li (kd n⋅l + ks (v⋅r)n ) = + +
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
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
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
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
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)