11.07.2015 Views

mental ray Architectural and Design Visualization Shader Library

mental ray Architectural and Design Visualization Shader Library

mental ray Architectural and Design Visualization Shader Library

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.2 Depth of Field / Bokeh 994.2 Depth of Field / Bokeh“Bokeh” is a Japanese term meaning “blur”, that is often used to refer to the perceived “look”of out-of-focus regions in a photograph. The term “Depth of Field” (henceforth abbreviatedDOF) does in actuality not describe the blur itself, but the “depth” of the region that is infocus. However, it is common parlance to talk about “DOF” while refering to the blur itself.This shader is very similar to the physical lens dof in the physics library, but with morecontrol on the actual appearance <strong>and</strong> quality of the blur.declare shader "mia_lens_bokeh" (boolean "on"default on,scalar "plane" default 100.0,scalar "radius" default 1.0,integer "samples" default 4,scalar "bias" default 1.0,integer "blade_count" default 0,scalar "blade_angle" default 0,boolean "use_bokeh" default off,color texture "bokeh")version 4apply lensscanline offend declareon enables the shader.plane is the distance to the focal plane from the camera, i.e. a point at this distance fromthe camera is completely in focus.Focal point near cameraFocal point far awayradius is the radius of confusion. This is an actual measurement in scene units, <strong>and</strong> for areal-world camera this is approximately the radius of the iris, i.e. it depends on the camerasf-stop. But it is a good rule of thumb to keep it on the order of a couple of centimeters in size(expressed in the current scene units), otherwise the scene may come out unrealistic <strong>and</strong> beperceived as a minature 5 .5 The diameter of the iris is the focal length of the lens (in scene units) divided by the f-number. Since thisparameter is a radius (not a diameter) it is half of that, i.e. (focal length / f number) / 2.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!