specular reflection
play

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


  1. Specular Reflection CS418 Computer Graphics John C. Hart

  2. Diffuse Reflection diffuse reflection

  3. Specular Reflection diffuse reflection diffuse + specular reflection

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

  5. Specular Reflection n r l θ θ φ v Specular gleem is a diffused mirror reflection of the light source Gleem falls off as eye moves away from mirror-bounce reflection direction

  6. Specular Reflection (Phong) n r l θ θ φ v L o = L i k s cos n φ % of light reflected (rest is absorbed)

  7. Specular Reflection (Phong) n r l θ θ φ v L o = L i k s cos n φ = L i k s ( v ⋅ r ) n

  8. Specular Reflection (Phong) n n r l r l θ θ φ v n ⋅ l θ L o = L i k s cos n φ = L i k s ( v ⋅ r ) n

  9. Specular Reflection (Phong) n n r l r s l θ θ φ v n ⋅ l θ L o = L i k s cos n φ s = ( n ⋅ l ) n – l = L i k s ( v ⋅ r ) n

  10. Specular Reflection (Phong) n n r l r s l θ θ φ v n ⋅ l θ L o = L i k s cos n φ s = ( n ⋅ l ) n – l = L i k s ( v ⋅ r ) n r = l + 2 s

  11. Specular Reflection (Phong) n n r l r s l θ θ φ v n ⋅ l θ L o = L i k s cos n φ s = ( n ⋅ l ) n – l = L i k s ( v ⋅ r ) n r = l + 2 s = l + 2( n ⋅ l ) n – 2 l = 2( n ⋅ l ) n – l

  12. Specular Reflection (Blinn) n h l φ θ θ v h = ( l + v )/|| l + v || L o = L i k s cos n φ = L i k s ( n ⋅ h ) n

  13. Specular Reflection (Blinn) (Phong) n n r h l l φ θ θ θ φ θ v v r = 2( n ⋅ l ) n – l h = ( l + v )/|| l + v || L o = L i k s cos n φ L o = L i k s cos n φ = L i k s ( n ⋅ h ) n = L i k s ( v ⋅ r ) n

  14. The Phong Lighting Model • Monochromatic L o = k a L a + L i ( k d n ⋅ l + k s ( v ⋅ r ) n ) = + +

  15. The Phong Lighting Model • Monochromatic L o = k a L a + L i ( k d n ⋅ l + k s ( v ⋅ r ) n ) • Tristimulus (RGB) color model L o(R) = k a(R) L a(R) + L i(R) ( k d(R) n ⋅ l + k s(R) ( v ⋅ r ) n ) L o(G) = k a(G) L a(G) + L i(G) ( k d(G) n ⋅ l + k s(G) ( v ⋅ r ) n ) L o(B) = k a(B) L a(B) + L i(B) ( k d(B) n ⋅ l + k s(B) ( v ⋅ r ) n ) + + =

  16. The Phong Lighting Model • Monochromatic L o = k a L a + L i ( k d n ⋅ l + k s ( v ⋅ r ) n ) • Tristimulus (RGB) color model L o(R) = k a(R) L a(R) + L i(R) ( k d(R) n ⋅ l + k s(R) ( v ⋅ r ) n ) L o(G) = k a(G) L a(G) + L i(G) ( k d(G) n ⋅ l + k s(G) ( v ⋅ r ) n ) L o(B) = k a(B) L a(B) + L i(B) ( k d(B) n ⋅ l + k s(B) ( v ⋅ r ) n ) • Multiple light sources L o = k a L a + L i(1) ( k d n ⋅ l (1) + k s ( v ⋅ r (1) ) n ) + L i(2) ( k d n ⋅ l (2) + k s ( v ⋅ r (2) ) n ) + … = +

  17. Attenuation • Local Illumination L o = k a L a + L i ( k d n ⋅ l + k s ( v ⋅ r ) n ) lp n l e v L i x 2 L o x x 1 x 0

  18. Attenuation • Local Illumination L o = k a L a + L i ( k d n ⋅ l + k s ( v ⋅ r ) n ) • Global Illumination L i = F att (|| x - e ||) L s L e = F att (|| x - e ||) L o lp e L s L e L i L o x

  19. Attenuation • Local Illumination L o = k a L a + L i ( k d n ⋅ l + k s ( v ⋅ r ) n ) Physical: F att ( d ) = 1/ d 2 • Global Illumination Plausible: F att ( d ) = 1/( F 0 + F 1 d + F 2 d 2 ) L i = F att (|| x - e ||) L s L e = F att (|| x - e ||) L o lp e L s L e L i L o x Sphere Area = 4 π r 2

Recommend


More recommend