Overview
Camera Depth of Field (DOF) refers to the range of distances within a photograph where objects appear in sharp focus. In other words, DOF determines the area in an image that is acceptably sharp, both in front of and behind the subject that is in focus.
Enabling Depth of Field
When rendering from a VRayPhysical Camera:
Simply enable the Depth of Field checkbox in the VRayPhysical Camera you are rendering from (DOF & Motion Blur > Depth of Field):
Once the checkbox is enabled, all Depth of Field options become active in the VRayPhysical Camera and are considered when calculating the Depth of Field effect (bokeh shape, center bias, vignetting, etc).
When rendering from a 3ds Max Physical Camera:
Check the "Enable Depth of Field" checkbox in the currently used 3ds Max Physical Camera. Depth of field is then controlled using the provided photographic controls.
When rendering from a standard 3ds Max camera:
Go to Render Setup > Camera > Camera > Dept of Field and check the "Enable" checkbox. You can then use the settings available in the Camera tab of the Render Setup window to control the Depth of Field effect:
Notes:
- It is not possible to enable Depth of Field for a free (non-camera) view.
- The "Enable" Depth of Field checkbox in the Camera tab of the Render Setup window does not affect DOF settings when rendering from a VRay Physical Camera or a 3ds Max Physical Camera. The in-camera settings have a higher priority over this.
Denoising
You can enable denoising to reduce noise in the DOF highlights and all other areas of the image. Denoising smartly blurs noise in the rendered image. Remember that too strong denoising may blur too much detail.
Examples
DOF is influenced by several factors. We will list them one by one with examples for each.
F-number:
The F-number, also known as the f-stop or aperture, is a numerical value that represents the size of the aperture opening in a camera lens. It is a crucial parameter in photography and directly influences the exposure and depth of field in an image.
Just like in photography, increasing the F-stop value makes the DoF effect more subtle. Decreasing the F-stop value makes it more pronounced.
F-number: 2 | F-number: 8 |
Focal Length:
Focal length is a fundamental optical property of a lens and is a key specification in photography and optics. It is defined as the distance between the lens's optical center (or nodal point) and the image sensor or film when the lens is focused at infinity. Focal length plays a role in depth of field. Longer focal lengths tend to have a shallower depth of field, making them suitable for isolating a subject from the background, while shorter focal lengths provide a deeper depth of field.
Focal length: 30mm | Focal length: 60mm |
Target distance:
In VRayPhysicalCamera and 3ds Max Physical Camera, the distance between the camera and its focal point is determined by the distance to the camera and its target by default. In a real camera, this is the distance to the object or point that you want to be in sharp focus. Adjusting the target distance allows you to control which part of your 3D scene is in focus and sharp in the final rendered image.
VRayPhysicalCamera | 3ds Max Physical Camera |
Target in front of the headphones | Target over the headphones |
Bokeh
Bokeh occurs when the lens renders out-of-focus points of light. It is a bright spot in the places of an image where we have heavily blurred highlights. It’s shape depends on the number of blades in a lens aperture.
5 blades aperture
5 blades aperture example
8 blades aperture
8 blades aperture example
Bitmap aperture
Bitmap aperture exaple