Bokeh (mia)
 
 
 

| Render Tree Usage

Category: Lens

Shader Family: Lens

Output: Color

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.

Enabled

Enables or disables the shader.

Focus Settings

Focal Plane Distance

The distance to the focal plane from the camera: a point at this distance from the camera is completely in focus.

CoF Radius

Radius of the circle of confusion. This is an actual measurement in scene units, and for a real-world camera this is approximately the radius of the iris (and it depends on the cameras f-stop). It is a good rule of thumb to keep it at a couple of centimeters in size (expressed in the current scene units), otherwise the scene may look unrealistic and be perceived as miniature.

Keep in mind that a small radius of confusion creates a deeper depth of field effect, while a large radius of confusion creates a more shallow depth of field effect.

Samples

Defines how many rays are shot. Fewer samples are faster to render, but produce grainier results. More samples are slower to render, but create smoother results.

Sampling Bias

When Sampling Bias is 1.0, the circle of confusion is sampled as a uniform disk.

Lower values push the sample probability towards the center, creating a "softer" looking DOF effect with a more "misty" look.

Higher values push the sample probability towards the edge, creating a "harder" looking DOF effect where bright spots actually resolve as small circles.

Shutter Blades

Blade Count

The blade count defines how many "edges" the circle of confusion has. A zero value makes it a perfect circle.

Angle

Sets the angle for the blade, which is expressed such that 0.0 is zero degrees and 1.0 is 360 degrees.

Bokeh

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.

Render Tree Usage

This shader can be applied directly to the camera in the lens shader stack. See Applying Lens Shaders to Cameras [Cameras and Motion Blur].