image based lighting
play

Image Based Lighting dr. Francesco Banterle - PowerPoint PPT Presentation

Image Based Lighting dr. Francesco Banterle francesco.banterle@isti.cnr.it Image Based Lighting: why? Image Based Lighting (IBL): To (re)light synthetic objects with real-world lighting Image Based Lighting: why? IBL is very


  1. Image Based Lighting dr. Francesco Banterle francesco.banterle@isti.cnr.it

  2. Image Based Lighting: why? • Image Based Lighting (IBL): • To (re)light synthetic objects with real-world lighting

  3. Image Based Lighting: why? • IBL is very important: • advertisement: cars, forniture, etc. • visual effects: CGI, live motion, etc. • augmented reality • cultural heritage

  4. IBL: Capturing Lighting • The input of IBL is real-world lighting • HDR imaging is the key • A HDR photograph captures a limited portion of light coming from the point of capture

  5. IBL: Capturing Lighting

  6. IBL: Capturing Lighting • Solution: • To capture HDR panoramic image 360x180 • These images are typically called either environment map or lightprobe

  7. IBL: Capturing Lighting

  8. IBL: Capturing Lighting • How capturing spherical (360x180) images? • Single shot panorama cameras: • SpheronVR: 50Mpix and 24 f-stops • iSTAR 360: 50Mpix and 27 f-stops • Roundshot: 160Mpix • These cameras may be expensive…

  9. IBL: Capturing Lighting • to capture a mirror sphere (e.g. xmas ball) • to capture a panoramic image from multiple directions and exposure times. This requires post-processing; e.g. image stitching: • PTGui: • http://www.ptgui.com • Hugin (open source): • http://hugin.sourceforge.net/download/

  10. IBL: Capturing Lighting

  11. IBL: Capturing Lighting

  12. IBL: Capturing Lighting 0.289

  13. IBL: Capturing Lighting 0.289

  14. IBL: Capturing Lighting 0.289

  15. IBL: Capturing Lighting 0.289 0.537

  16. IBL: Capturing Lighting y z θ φ x x

  17. IBL: Longitude Latitude Mapping φ θ 2 3 ✓ ◆ sin θ cos φ j 1 − 1 � � θ = π 1 − 2 height 2 cos θ D = 4 5 π 2 i sin θ sin φ φ = width

  18. IBL: Longitude Latitude Mapping • Advantages: • easy mapping to understand/implement • Disadvantages: • not equal-area —>pixels cover different areas on the sphere • squeezed at the poles —> to take this into account

  19. IBL: angular mapping   cos φ sin θ sin φ sin θ D =   − cos θ φ = arctan(1 − 2 y, 2 x − 1) (2 x − 1) 2 + (2 y − 1) 2 p θ = π

  20. IBL: angular mapping • Advantages: • avoiding undersampling at edges • Disadvantages: • not equal-area —>pixels cover different areas on the sphere • a bit more complicated

  21. IBL: cube mapping 2 3 2 x − 1 1 2 y − 1 D = 4 5 1 + (2 x − 1) 2 + (2 y − 1) 2 p 1  1 �  1 � 3 , 2 2 , 3 x ∈ ∧ y ∈ . 3 4 y x

  22. IBL: cube mapping 2 3 2 x − 1 1 2 y − 1 D = 4 5 1 + (2 x − 1) 2 + (2 y − 1) 2 p 1  1 �  1 � 3 , 2 2 , 3 x ∈ ∧ y ∈ . 3 4 y x

  23. IBL: cube mapping • Advantages: • hardware support on the GPU • Disadvantages: • not equal-area (pixels are bigger at edges) —>pixels cover different areas on the sphere

  24. … and now?

  25. Rendering ~ ! o ~ ! i ~ n x

  26. Rendering Z L o ( x , ~ ! o ) = L e ( x , ~ ! o ) + Ω + L i ( x , ~ ! i ) f r ( x , ~ ! o ) | ~ n · ~ ! i | d ~ ! i , ~ ! i

  27. Rendering

  28. Rendering Z L o ( x , ~ ! o ) = L e ( x , ~ ! o ) + Ω + L i ( ~ ! i ) f r ( x , ~ ! o ) | ~ n · ~ ! i | d ~ ! i , ~ ! i

  29. Rendering Z L o ( x , ~ ! o ) = L e ( x , ~ ! o ) + Ω + L i ( ~ ! i ) f r ( x , ~ ! o ) | ~ n · ~ ! i | d ~ ! i , ~ ! i

  30. Rendering • How to solve this integral? • Creating light sources from the environment map • Sampling the environment map

  31. Light sources generation • Direction light sources are extracted from the environment map. • Properties: direction, and HDR color • The integral is converted into: N X L j ! j ! j L o ( x , ~ ! o ) = L e ( x , ~ ! o ) + i f r ( ~ ! o ) | ~ n · ~ i | i , ~ j =1 • Number of light sources is a parameter: more lights more time. Few lights —> bias (integral not converged)

  32. Light sources generation: uniform sampling Subdivide the panorama in regular regions

  33. Light source generation: uniform sampling Extracted light sources

  34. Light sources generation: median-cut sampling Subdivide the panorama in regions of equal luminance

  35. Light sources generation: median-cut sampling Subdivide the panorama in regions of equal luminance

  36. Light sources generation: median-cut sampling Subdivide the panorama in regions of equal luminance

  37. Light sources generation: median-cut sampling Subdivide the panorama in regions of equal luminance

  38. Light sources generation: median-cut sampling Subdivide the panorama in regions of equal luminance

  39. Light sources generation: median-cut sampling Subdivide the panorama in regions of equal luminance

  40. Light sources generation: median-cut sampling Subdivide the panorama in regions of equal luminance

  41. Light sources generation: median-cut sampling Subdivide the panorama in regions of equal luminance

  42. Light source generation: median-cut sampling Extracted light sources

  43. Light source generation: median-cut sampling Extracted light sources

  44. Light source generation: median-cut sampling

  45. Light source generation: median-cut sampling

  46. Sampling the Environment Map • Solving: Z L o ( x , ~ ! o ) = L e ( x , ~ ! o ) + Ω + L i ( ~ ! i ) f r ( x , ~ ! o ) | ~ n · ~ ! i | d ~ ! i , ~ ! i • with monte-carlo methods; generating samples according to a probability distribution: N ! x j ! x j ! x j ! o ) + 1 L i ( ~ i ) f r ( ~ ! o ) | ~ n · ~ i | i , ~ X L o ( x , ~ ! o ) = L e ( x , ~ p ( x j ) N j =1 • Few samples —> noise

  47. Sampling the Environment Map

  48. Sampling the Environment Map

  49. how to insert virtual objects?

  50. Differential Rendering

  51. Differential Rendering

  52. Differential Rendering

  53. Differential Rendering

  54. Differential Rendering Images are courtesy of Karsch

  55. Differential Rendering / Synthetic Objects + Support Geometry Only Support Geometry

  56. Differential Rendering Shadows to insert into the photograph (table)

  57. Differential Rendering x

  58. Differential Rendering

  59. Differential Rendering ( ) + x

  60. Differential Rendering

  61. there is more…

  62. nobody expects… the Spanish Inquisition

  63. Spatial IBL • A single environment can capture only distant light sources • Nearby light sources are not modeled as local light but as distant ones • To increase realism there is the need to model them properly

  64. Spatial IBL

  65. Spatial IBL

  66. Spatial IBL

  67. Spatial IBL

  68. Spatial IBL

  69. Questions?

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend