introduction to normal mapping
play

Introduction to normal mapping Karl Tarbe Faculty of Mathematics - PowerPoint PPT Presentation

Introduction to normal mapping Karl Tarbe Faculty of Mathematics and Computer Science October 2, 2014 The problem What we want? better graphics better frame rate Karl Tarbe Bump mapping October 2, 2014 2 / 14 Solution - More polygons!


  1. Introduction to normal mapping Karl Tarbe Faculty of Mathematics and Computer Science October 2, 2014

  2. The problem What we want? better graphics better frame rate Karl Tarbe Bump mapping October 2, 2014 2 / 14

  3. Solution - More polygons! What we get? better graphics better frame rate Karl Tarbe Bump mapping October 2, 2014 3 / 14

  4. Solution - More polygons! What we get? better graphics better frame rate Karl Tarbe Bump mapping October 2, 2014 3 / 14

  5. Shading makes the difference Example Karl Tarbe Bump mapping October 2, 2014 4 / 14

  6. Bump mapping Example from wikipedia Karl Tarbe Bump mapping October 2, 2014 5 / 14

  7. Bump mapping Example from wikipedia How to: Simulate displacement of surface. Profit! Karl Tarbe Bump mapping October 2, 2014 5 / 14

  8. Bump mapping Example from wikipedia How to: Simulate displacement of surface. Profit! Topic of today. Karl Tarbe Bump mapping October 2, 2014 5 / 14

  9. Texture mapping Texture Textured plane Karl Tarbe Bump mapping October 2, 2014 6 / 14

  10. Normal compression Normal vector Three components Range − 1 . 0 ≤ n i ≤ 1 . 0 � n = ( x , y , z ) RGB color Three components Range 0 ≤ c i ≤ 255 � color = ( r , g , b ) Karl Tarbe Bump mapping October 2, 2014 7 / 14

  11. Normal compression Normal vector Three components Range − 1 . 0 ≤ n i ≤ 1 . 0 � n = ( x , y , z ) RGB color Three components Range 0 ≤ c i ≤ 255 � color = ( r , g , b ) Compression c i = 127 . 5 ∗ ( n i + 1 . 0) 1 n i = 127 . 5 ∗ c i − 1 . 0 Karl Tarbe Bump mapping October 2, 2014 7 / 14

  12. Normal map example 3D model Corresponding normal map Karl Tarbe Bump mapping October 2, 2014 8 / 14

  13. Height map Texture Corresponding height map Karl Tarbe Bump mapping October 2, 2014 9 / 14

  14. From height map to normal map Gradient x grad = pix ( x − 1 , y ) − pix ( x +1 , y ) y grad = pix ( x , y − 1) − pix ( x , y +1) n ′ = � � n + U · x grad + V · y grad Karl Tarbe Bump mapping October 2, 2014 10 / 14

  15. Revisiting Blinn-Phong lighting model Different terms Diffuse Ambient Specular Final equation I = L A · M A + n T · l · L D · M D + ( r T · v ) c · L S · M S Karl Tarbe Bump mapping October 2, 2014 11 / 14

  16. Applying normal map How to Choose a consistent base. Convert normal to that base. Use that normal in the lighting model. Example from The Cg Tutorial Karl Tarbe Bump mapping October 2, 2014 12 / 14

  17. Disadvantages of bump mapping Example from wikipedia Disadvantages Shadows Outline Karl Tarbe Bump mapping October 2, 2014 13 / 14

  18. Parallax mapping Bump mapping Parallax mapping Karl Tarbe Bump mapping October 2, 2014 14 / 14

Recommend


More recommend