Can You Make Computerized Shaped Bokeh?
As you probably know DIYP has a small feish for shaped boekh (we even made a kit).
Mike Pan was interested to see if a similar effect can be computer generated. well, it can using blender and cycles. Here is what Mike has to say about it.
It all started with the release of Cycles - a new GPU based (read: Fast) path-tracing (read: Nice) rendering engine for the 3D software 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 uses all kind of tricks and shortcuts to simulate surfaces and lighting, whereas Cycles rendering is purely based on the physics of light, which means it is very easy to get photo-realistic renderings like this:

Unlike a real camera, a virtual camera in the 3D world doesn't use a compound set of lenses and a film plane to capture the image. 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? In 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". 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.
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?
or
A "stopped-down" lens might produce bokeh that looks like hexagons (because the aperture is made up of distinct blades) as displayed with Magic Bokeh by Jah-hoo-ah.
An anamorphic lens produces bokeh that is stretched (because the lens squeezes the image non-proportionally to fit 2.35:1 aspect ratio into a 3:2 image circle):

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:

and

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, this is what I got.

Notice how the light source behind the monkeys turned into little heart shapes. Neat eh? What even more amazing is that I noticed the bokeh is distorted near the frame edge, exactly how my 50mm F1.4 behaves when used wide-open.
This little experiment was nothing more than a test to see what can be accomplished with today's cutting edge graphic technology, and bring together my two passion - computer graphics and photography - together.
Mike is a 3D computer graphics artist and an amateur photographer. You can find him on Twitter, Flickr or his website.
Get the DIYP greatness via RSS, newsletter and Twitter
Connect with the community: Facebook Page, Discussions
Share Ideas, Setups, Images and Projects on DIYP's Flickr, visit Readers Photos














Comments
Amazing Bokeh for Suzi
I love Blender and now i cant wait to use Cycles too :-) Thx for this experiment Mike!
It seems Cycles simulates physics perfect.
best regards
Tom
hearts
it's a nice effect just playing with the shapes in front of your lens...
Same results using Yafaray
I tried to reproduce the same results of Mike Pan using Yafaray:
http://bit.ly/o1zK3r
Phisically accurate
Wow, I wasn't thinking that algorithms used were that physically accurate. Thanks for experimenting!
I blogged about bokeh and heart-shaped aperture here: http://blog.steren.fr/2011/04/18/bokeh/
Amazing
That's simply amazing, Mike! I still really didn't think that the term 'physical' in such render engines were physical at all. ;)
-Reyn
Or if you're lazy, you can
Or if you're lazy, you can use shaped blur in photoshop.
Tutorial (-ish)
Hey,
I've tried to set up the exact same thing in Blender, but it doesn't seem to work? What settings have you used that I may have missed? I used DOF, Aperture and Blades but it still doesn't work ...
Thanks in advance
Frederick
Post new comment