Bokeh Blur Node


Bokeh Blur Node.

The Bokeh Blur node generates a bokeh type blur similar to Defocus. Unlike defocus an in-focus region is defined in the compositor. There is also more flexibility in the type of blur applied through the Bokeh Image node.

Several performance optimizations are also available such as OpenCL support, calculation area restriction and masking.


Standard image input.
This is an input for the Bokeh Image node.
Size controls the amount of blur. Size can either be a single value across the entire image or a variable value controlled by an input image. In order to use the latter, the Variable Size option must be selected. See the examples section below for more on how to use this.
Bounding Box
This can be used with a Box Mask matte node or with a Mask input node to restrict the area of the image the blur is applied to. This could be helpful, for example, when developing a node system by allowing only a small area of the image to be filtered thus saving composite time each time adjustments are made.


Variable Size
Allows a variable blur radius, if the Size input is an image.
Max blur
Max blur is intended to act as an optimization tool by limiting the number of pixels across which the blur is calculated.


Standard image output.


Three examples of how the size input may be used follow.

An ID masked alpha image can be used so that a background is blurred while foreground objects remain in focus. To prevent strange edges the Dilate Node should be used.

The Z pass can be visualized using a Map Value node and Color Ramp node as described in Render Layers. A multiply Math node can be used following the color-ramp so that a blur value greater than one is used for objects outside the focal range.


Z pass used.

A manually created grayscale image can be used to define the sharp and blurry areas of a pre-existing image. Again, a Multiply Node can be used so that a blur value greater than one is used.


Image used.


Z pass used.


Image used.