Related mental ray shader: mia_lens_bokeh
"Bokeh" is a Japanese term meaning "blur", that is often used to describe how the out-of-focus regions in a photograph are perceived. The term Depth of Field (DOF) does not actually describe the blur itself, but the depth of the region that is in focus. The Bokeh shader is essentially a depth of field shader.
Image rendered with Focal = 40, CoF = 0.5, Samples = 20, and Use Bokeh = On.
You can use the Bokeh Lens shader with an RGB Bokeh map to simulate chromatic aberration of the lens. Chromatic aberration is an artifact often seen when using low-end or wide angle lenses, and it is seen as "fringes" of color around the elements in an image. When using the Bokeh Lens shader, you will notice that you only get the chromatic aberration effect on the out-of-focus regions of the rendered image.
Use Bokeh Image |
Enables the use of a specific bokeh map. By default the noIcon_pic image clip is connected to the bokeh input port. To apply your own bokeh map, add the image to the scene as a clip (Get > Clip > Create Clip From File), and then add it to the render tree from the Clips menu. Connect the new clip node to the bokeh input port to replace the noIcon_pic image. For more information about working with image clips and sources, see Managing Image Sources & Clips [Data Management]. When enabled, the Sampling Bias, Blade Count and Angle parameters have no effect. The bokeh map defines the shape of the depth of field, so that a filled white circle on a black background is equivalent to the standard blur. Generally, you need more samples to accurately resolve a custom bokeh map. |
This shader can be applied directly to the camera in the lens shader stack. See Applying Lens Shaders to Cameras [Cameras and Motion Blur].