Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Making Your Bokeh Fascinating - Real-time Rendering of Physically Based Optical Effect in Theory and Practice - SIGGRAPH 2015 Course

21,114 views

Published on

These slides are a portion of the lecture on "Real-Time Rendering of Physically Based Optical Effects in Theory and Practice" at Siggraph 2015. The whole course is available on the tri-Ace web site. All of the Silicon Studio slides are available from our web site.

Silicon Studio: http://www.siliconstudio.co.jp/rd/presentations/
tri-Ace: http://research.tri-ace.com/s2015.html


このスライドはSIGGRAPH2015のCourse「Real-Time Rendering of Physically Based Optical Effects in Theory and Practice」の講演資料の一部です。Course全体のスライドはトライエースのWebサイトに掲載されています。元のスライドデータは、シリコンスタジオまたはトライエースのWebサイトからダウンロードできます。

シリコンスタジオ:http://www.siliconstudio.co.jp/rd/presentations/
トライエース:http://research.tri-ace.com/s2015.html

Published in: Engineering
  • Be the first to comment

Making Your Bokeh Fascinating - Real-time Rendering of Physically Based Optical Effect in Theory and Practice - SIGGRAPH 2015 Course

  1. 1. Making Your Bokeh Fascinating Real-time Rendering of Physically Based Optical Effect in Theory and Practice SIGGRAPH 2015 Course Masaki Kawase Silicon Studio, Corp. masa@siliconstudio.co.jp
  2. 2. Introduction • Basic idea and theory [Kawase08] – Only circular aperture • Practical implementation and optimization [Kawase12] – Any kind of aperture shapes 2
  3. 3. Contents • Creating the Pencil Map • Creating the Bundle-of-Light-Ray Map (Pencil Map) – “Bundle of Light Rays” or “Pencil Rays” (referred to as “Pencil” here onwards) • Application to Arbitrary Aperture Shapes • Scattering or Gathering? • Results • Conclusion 3
  4. 4. Creating the Pencil Map
  5. 5. Creating the Pencil Map • Precompute light paths from the aberration diagram – Takes spherical and axial chromatic aberrations into account Light paths make up pencil map (small number of rays) Longitudinal aberration diagram Pencil map Amount of aberration Incidentheight 5
  6. 6. Circular Bokeh Rendering • V coordinate represents the distance from the optical axis – Mapping each slice to a circle produces a circular ‘bokeh’ Pencil map Circular bokeh U: Distance from lens V:Distancefrom opticalaxis 6
  7. 7. Discretized Result… 7 • Chromatic aberration is an issue • Three wavelengths (R/G/B) are insufficient to represent the dispersion
  8. 8. Increasing Wavelength Samplings • Calculate the map with more wavelengths • Convert into the RGB space 8
  9. 9. 3-Wavelength Samplings 9
  10. 10. Sufficient Wavelength Samplings 10
  11. 11. Bokeh with Spherical and Chromatic Aberration • Imperfect focus • Front bokeh with red sharp edge • Back bokeh with blue soft edge 11 Zoomed-in view around the focal point
  12. 12. Comparison with photographs Captured in real photographs Generated from pencil map 12
  13. 13. Creating the Pencil Map of Doublet 13 • Calculate the map with the longitudinal aberration diagram • Using actual lens parameters (if they exist) – Only ray paths of each wavelength are required Light paths make up pencil map Longitudinal aberration diagram Pencil map
  14. 14. Pencil Map of Doublet Pencil maps and bokeh Zoomed-in view around the focal point 14
  15. 15. Comparison with photographs 15 • Typical correction – Front bokeh has soft purple edge and the center is darker – Back bokeh has sharp green edge and the center is brighter Front bokeh in photographs Back bokeh in photographs Front and back Bokeh with Pencil map
  16. 16. Different Type of Doublet • Residual chromatic aberration is more visible than residual spherical aberration Light paths make up pencil map Longitudinal aberration diagram Pencil map 16
  17. 17. Pencil Map of Doublet (Different Type) Zoomed-in view around the focal point Pencil maps and bokeh 17
  18. 18. Pencil Map of Doublet (Previous Type) Pencil maps and bokeh Zoomed-in view around the focal point 18
  19. 19. Comparison with photographs Front bokeh in photographs Back bokeh in photographs Front and back Bokeh with Pencil map 19
  20. 20. Optimization of Pencil Map • Wasteful parts in the texture – Sparse, many texels are empty – There is not enough precision around the more important ‘focusing’ texels Wasteful pencil map 20
  21. 21. Optimization of Pencil Map (cont’d) • Normalizing height of bundle at every distance(u-axis) by the maximum height(bokeh size) • Less empty texels, and great improvement in precision around focusing texels Wasteful pencil map Normalized pencil map 21
  22. 22. Spherical lens (with no corrections) Aspherical lens (chromatic aberration is not corrected) Achromatic doublet lens 22
  23. 23. Achromatic doublet lens (different type) Apochromatic (APO) lens Perfect lens (does not actually exist) 23
  24. 24. Application to Arbitrary Aperture Shapes
  25. 25. Various Aperture Shapes • Aperture shape is an important artistic factor – Typically 5~9 diaphragm blades – Changes from rounded to n-gon • How to map pencil onto the polygonal aperture shape? – 3D Textures? • Too large, not practical ? Pencil map Aperture shape 25
  26. 26. Indirect Reference of Pencil Map • Precompute an LUT texture that stores V coordinates of pencil map LUT texture 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 V Vertical slice 26
  27. 27. Indirect Reference of Pencil Map (cont’d) • Sample pencil map indirectly at run-time Pencil map 0 1 V Look up Sampling LUT 27
  28. 28. Indirect Reference of Pencil Map (cont’d) • LUT determines the aperture shape – Independent of pencil map – Can reproduce curved shapes of a diaphragm blade • Prepare a set of LUTs for various diaphragm conditions – Other shapes such as stars, hearts, … can be used 28
  29. 29. Various LUTs • For the number of diaphragm blades and opening levels • Smooth deformation is possible by interpolating between two adjacent LUTs 4 blades 5 blades 6 blades 7 blades Fully opened ClosedClosing 29
  30. 30. Silhouette LUTs for debug Fully opened 4 blades 5 blades 6 blades 7 blades ClosedClosing 30
  31. 31. Scattering or Gathering?
  32. 32. Both can be Implemented • Better quality by scattering – Heavy processing load • Hybrid method is recommended – Both scattering and gathering 32
  33. 33. Hybrid Method • To determine which pixels will be scattered or gathered, use: – The CoC size – Difference in luminance between neighboring pixels Original Result (green: gathering pixels) 33
  34. 34. 34 Gathering
  35. 35. 35 Hybrid of Scattering and Gathering
  36. 36. Optimization • Use a half resolution buffer for scattering – Scattering process can be 16x faster • Split the process into several passes with hierarchical resolution buffers – Use lower resolution for larger bokeh – The process at the 1/4 x 1/4 resolution can be 256x faster • Scatter a pixel every 2x2 pixels for relatively larger bokeh in each resolution – Pixels that have an especially heavy processing load will be 4x faster 36
  37. 37. Results
  38. 38. Back bokeh with cyan fringes Front bokeh with red/purple fringes Bokeh Simulation in Real Time
  39. 39. Diaphragm Simulation 5-blade Aperture
  40. 40. Diaphragm Simulation 6-blade Aperture
  41. 41. Diaphragm Simulation 7-blade Aperture
  42. 42. Diaphragm Simulation 8-blade Aperture
  43. 43. Curved Diaphragm and Optical Vignetting • Opening / Closing – Deformation • Circular aperture • Polygonal aperture – Rotation – Optical Vignetting • Cat’s Eye Effect 43
  44. 44. 5-blade Circular Aperture (with Optical Vignetting) f/1.4 (Fully Opened)
  45. 45. 5-blade Circular Aperture (with Optical Vignetting) f/2 (1 Stop Closed)
  46. 46. 5-blade Circular Aperture (with Less Optical Vignetting) f/2.8 (2 Stops Closed)
  47. 47. 5-blade Circular Aperture (with No Optical Vignetting) f/5.6 (4 Stops Closed)
  48. 48. 5-blade Circular Aperture (with Fake Diffraction Spikes) f/11 (6 Stops Closed)
  49. 49. Various Aberrations and Corrections • Correction of SA and axial CA mostly affect bokeh Focus plane Back bokeh Front bokeh Differences between front and back bokeh 49
  50. 50. 50 Spherical Lens (with No Corrections)
  51. 51. 51 Aspherical Lens (with Chromatic Aberrations) Correction of Spherical Aberration
  52. 52. 52 Achromatic Lens Corrected for Red and Blue Wavelengths
  53. 53. 53 Achromatic Lens (Different Type) Corrected for Red and Blue Wavelengths
  54. 54. 54 APO (Apochromatic) Lens Corrected for 3 Wavelengths (More Expensive Lens)
  55. 55. 55 Almost Perfect Lens Without any Spherical and Longitudinal Chromatic Aberrations
  56. 56. 56 STF (Smooth Transition Focus) Lens Soft Edged Bokeh by Apodization Optical Element Radial gradient ND filter
  57. 57. Residual Aberration Visibility Out of focus: Large Aberrations: Less visible Out of focus: Small Aberrations: Strongly Visible
  58. 58. Residual Aberration Visibility Out of focus: Large Aberrations: Less visible Out of focus: Small Aberrations: Strongly Visible Out of focus: Large Aberrations: Less visible Out of focus: Small Aberrations: Strongly Visible
  59. 59. Comparison with Photographs (Achromat) Real photographs with achromatic lensReal-time simulation results 59
  60. 60. Comparison with Photographs (APO) Real photographs with apochromatic lensReal-time simulation results 60
  61. 61. Conclusion
  62. 62. Conclusion • Reproduce photorealistic bokeh with pencil map and LUT – Pencil map defines bokeh characteristics – LUT defines bokeh shapes • Optimization – Various options available – Combinations can be used to improve performance 62
  63. 63. References • [Kawase08] Kawase, M. “Bokeh Expressions Based on Optics.” Computer Entertainment Developers Conference, 2008. • [Kawase12] Kawase, M. “Practical Implementation of Cinematic Lens Effects.” Computer Entertainment Developers Conference, 2012. • Kawase, M. “Reduce Artifacts Generated by Mipmapped Buffers.” Computer Entertainment Developers Conference, 2009. • Trávník, J. “On Bokeh.” Jakub Trávník's resources. http://jtra.cz/stuff/essays/bokeh/index.html • 安藤幸司 『光と光の記録「レンズ編」』 AnfoWorld http://www.anfoworld.com/LensMF.html • 吉田正太郎(1997)『カメラマンのための写真レンズの科学』地人書館. 63

×