2018-10-26 – Blender Conference 2018 Lightning Talk: Optical Elements in Cycles

The content of this article was first presented at the Blender Conference 2018, Amsterdam.

Summary

The idea to simulate optical lenses came to me after renderings of a 3D-scanned rock came out disappointing. The particle system that I used to make hundreds of light points produced mathematically perfect bokeh circles, as always – but I wanted a more realistic, imperfect photographical look. Adding a virtual aperture with arbitrary-shaped holes is a well-known technique to manipulate the shape of bokeh circles, but this works more like a mask and wasn't enough for me.

Since bokeh is a direct result of the optical system that was used to make a photo, the bokeh can be manipulated in a path tracer such as Cycles, by creating actual lens elements in front of the virtual camera. However, some knowledge about optical design is required to get functioning constructions.

With the help of OpticalRayTracer, I built a lens design that produces a focussed area in the middle of the picture, but has a strong blur in the outer areas. The bokeh produced by this construction is far from perfect, but it adds a strong artistic effect to the image – which was my ultimate goal.

This approach currently has these problems:

  • Hard to construct and control. Basic knowledge about optical design becomes mandatory.
  • Longer render times.
  • Not all optical abberations can be simulated in Cycles, since it doesn't support wavelength tracing (i.e. no chromatic abberation), but it might work in Physically Based Renderers that support it.
  • Have to deal with the same optical problems (i.e. pincushion distortion, coma etc.) as in reality.

/projects/02_projects/2018-10-26_bcon18_lightning_talk_bokeh/thumbnail/936d6c640dc47f7b2767a5c663f9a3ad_01-Lens02.jpg
/projects/02_projects/2018-10-26_bcon18_lightning_talk_bokeh/thumbnail/bec6e1a67826b42edf817426d89e48aa_02-Lens03.jpg
/projects/02_projects/2018-10-26_bcon18_lightning_talk_bokeh/thumbnail/c0c7d1406f8ea9112a6329337dd4728f_03-Lens04.jpg
/projects/02_projects/2018-10-26_bcon18_lightning_talk_bokeh/thumbnail/bdce509c2107db7c2c6181be7dbae13d_04-Lens5_wide.jpg
/projects/02_projects/2018-10-26_bcon18_lightning_talk_bokeh/thumbnail/222b6327de874e2af0faab1bf3d47dc9_05-Lens5_Balkon2.jpg
/projects/02_projects/2018-10-26_bcon18_lightning_talk_bokeh/thumbnail/52ab841745ca6f58064c9d6f5ca46e9a_07Lens1_1-wide1.jpg
/projects/02_projects/2018-10-26_bcon18_lightning_talk_bokeh/thumbnail/16dcd3cfd15684d34d770225ba2d2afc_06-Lens5-setup.png