It all started with the release of Cycles – a new GPU based path-tracing rendering engine for Blender. For people unfamiliar with the concept, a rendering engine is a software that turns a computer generated 3D scene into a final picture. A rendering engine has to calculates lights, shadows, surface materials and all the intricate details that make up a believable virtual world. Most rendering engines use all kind of tricks and shortcuts to simulate surfaces and lightings, whereas Cycles rendering is purely based on the physics of light, which means it is very easy to get photo-realistic renderings like this:
However, unlike a real camera, a virtual camera in the 3D world doesn’t use a compound set of lenses and film to capture the image. It relies on a set of equations to do the work. For example, to change the zoom of our virtual camera is a simple process of changing some variables in the perspective calculation equation.
How does this all tie in to photography? Well for a real camera, if you place a small opening in front of a camera lens, it will block off some light entering the lens, and we call this opening the “the aperture”.
Bokeh, as you probably know, refers to the out-of-focus highlights in a photograph as a result of shallow depth-of-field composition. With me so far? Turns out, the shape of the aperture dictates the shape of the bokeh. A typical bokeh of a wide open lens looks like little round disks because the lens aperture is round:

A “stopped-down” lens might produce bokeh that looks like hexagons(because the aperture is made up of distinct blades).
Here comes the coolest part, if you placed a custom shaped opening in front of the lens,

the bokeh will take the shape of that opening.

Back to computer graphics. I was curious to see if the Cycles is as robust as it is advertised. After all, a ‘physical-based’ rendering engine should be able to simulate light interactions just as they behave in the real world. So when I set up a simple scene and placed a heart shaped opening in front of my virtual camera, I expected to see the out-of-focus area being rendered into little heart shapes.
Neat eh?
What’s even more amazing is the bokeh shape is distorted near the frame edge, as if suffering from some kind of spherical abberation. Exactly how my 50mm F1.4 behaves when used wide-open.
This little experienment was nothing more than a test to see what can be accomplished with today’s cutting edge rendering technology, and bring together my two passions – computer graphics and photography.
This article was written by me, and first published at http://www.diyphotography.net/can-you-make-computerized-shaped-bokeh









