Works in progress: Bokeh

I’ve been fiddling with some new plugins/effects that are in constant state of change. Not everything (ok, almost nothing) I work on gets polished enough for a release, or ever gets to a point where its remotely usable even for me. Add the changes that 10.6 brings with QTKit, 64 bit API changes etc, and this means a lot of things that were ready to go pre-10.6, are now in a weird state of upheaval and need serious attention. Im looking at you DV output plugin and v002 Movie player 2.0…

However I do try and experiment with some new things and get back to some basic fun image processing & effects.


I’ve always been inspired by cinema and photography. One of the things I initially wanted to do with the v002 Blurs was make a nice lens style blur. This is very hard, as lenses have all sorts of interesting caustics and shaped artifacts. That does not lend itself to common blurring methods like convolution at least not for deep blurs with shaped kernels. If you want to add bokeh, it gets even harder as they only appear where there is enough light, and they are much larger than a few pixels across. One method I inadvertently stumbled on in experimentation is called ‘point splatter’ or ‘point splatting’. The basic idea is you render your image not as pixels, but as point geometry with textures. Your texture is your shaped ‘circle of confusion’ or iris/bokeh effect. This ends up code wise doing similar things that the Rutt Etra does, except sans ‘Z’ extrusion, and with luma based ‘size’ modulation. OpenGL nerd talk aside, the effect is fairly convincing:

Compare an original image focused, unfocused camera blur and bokeh to v002 bokeh and gaussian blur. Original camera reference images from CGEducation

4 Responses to “Works in progress: Bokeh”

  1. Garret Kelly Says:

    Very neat effect. Have you considered using data with a Z value? Seems like you could render a very believable depth-sensitive Bokeh effect if you took depth slices of a scene and modulated the strength of the effect on each slice by its depth.

  2. vade Says:

    Thanks! Yeah, Ive 100% considered that. I still need to figure out how the whole thing will ‘work’ so to speak, but having an optional ‘depth map’ image input is doable, 100%

  3. dan winckler Says:

    Gorgeous! Could you clarify what the second image is? From your description I’m not sure whether the original photo was defocused (optically) or whether it’s a v002 Blur.

  4. vade Says:

    The second image is from an actual camera out of focus optically, as a comparison to the computer generated out of focus below it. The v002 blur is a gaussian blur and would destroy the highlights. The last image is actually v002 Blur + v002 Bokeh. Im working on a lens blur that keeps some of the highlights using a gaussian style blur, but man, its hard to get right, as well as be a deep blur. I think the two bluts will have to be used together to make something close to convincing.

Leave a Reply