---
title: "Physical Camera - Depth of Field and Motion Blur"
canonical: "https://documentation.chaos.com/space/APPSDK/132743793/Physical%20Camera%20-%20Depth%20of%20Field%20and%20Motion%20Blur"
format: markdown
---
In this chapter we'll cover two effects possible because of the physical camera - Depth of Field (DoF) and Motion Blur (MB).


You can download the scene files and test out Depth of Field and Motion Blur on your own.

> Macro (refined-button)




## **Depth of field**

---


## **Motion blur**

---


## **Parameters**

---


> ℹ️ If better quality (less noise) is wanted, then those effects can be achieved by raising the **max subdivs** parameter of the image sampler.

### Depth of field

These settings are located in the *SettingsCameraDof* plugin.

- **on** - Turns the Depth-of-Field effect on.
- **aperture** - The size of the virtual camera aperture in world units. Small aperture sizes reduce the DOF effect, while larger sizes produce more blur.
- **center_bias** - Determines the uniformity of the DOF effect. A value of 0.0 means that light passes uniformly through the aperture. Positive values mean that light is concentrated towards the rim of the aperture, while negative values concentrate light at the center.
- **sides_on** - Allows you to simulate the polygonal shape of the aperture of real-world cameras. When this option is off, the shape is assumed to be perfectly circular.
- **sides_num** - Sides of the polygon, if *sides_on* is true.
- **focal_dist** - Determines the distance from the camera at which objects will be in perfect focus. Objects closer or further than that distance will be blurred.
- **anisotropy** - Allows the stretching of the bokeh effect horizontally or vertically. Positive values stretch the effect in the vertical direction. Negative values stretch it in the horizontal direction.
- **rotation** - Specifies the orientation of the aperture shape.
- **subdivs** - Determines the number of samples for the DOF effect (has no effect in recent versions of V-Ray).

> ✅ Depth of field is supported only for the Standard camera type. Other camera types do not produce depth of field effect at this time.

### Motion blur

These settings are located in the *SettingsMotionBlur* plugin.

- **on** - Turns Motion Blur on. For more information, see The Motion Blur example below.
- **geom_samples** - Determines the number of geometry segments used to approximate motion blur. Objects are assumed to move linearly between geometry samples. For fast rotating objects, you need to increase this value to get correct motion blur. Note that more geometry samples increase memory consumption, since more geometry copies are kept in memory. You can also control the number of geometry samples on a per-object basis from the Object settings dialog. For more information, see the Geometry Samples example below.
- **low_samples** - Controls how many samples in time will be computed during irradiance map calculations.
- **duration** - Specifies the duration, in frames, during which the camera shutter is open. For more information, see The Duration example below.
- **subdivs** - Determines the number of samples for the MB effect (has no effect in recent versions of V-Ray).
- **bias** - Controls the bias of the motion blur effect. A value of 0.0 means that the light passes uniformly during the whole motion blur interval. Positive values mean that light is concentrated towards the end of the interval, while negative values concentrate light towards the beginning.
- **shutter_efficiency** - In real world cameras, the shutter requires some time to open and close which in turn affects the way motion blur looks. This is especially true for lenses with large apertures. To simulate this effect, the shutter efficiency parameter controls how the motion blur samples are distributed over the time interval of the shot. A value of 1 means that the samples are evenly distributed, as if the change from open to shut (or shut to open) is instant. Lower values place more samples towards the middle of the time interval to correspond to the open or close operation taking a small time interval, as occurs in real life.
- **interval_center** - Specifies the middle of the motion blur interval with respect to the 3ds Max frame. A value of 0.5 means that the middle of the motion blur interval is halfway between the frames. A value of 0.0 means that the middle of the interval is at the exact frame position. For more information, see The Interval Center example below.
- **camera_motion_blur** - Enables the calculation of motion blur due to camera movement (as opposed to object movement).
- **sampling_type** - Type of sampling: 0 - normal, 1 - sample only shutter open, 2 - sample only shutter middle

## **Examples**

---

### **Example: Depth Of Field (DOF)** 

 ** **  
 

To enable the DoF effect you need to turn on the **Depth of field** option **DoF & Motion** blur rollout of the physical camera. The effect is most strongly seen when the camera is close to an object, for example when doing a macro photo. For a strong DoF effect, the camera aperture must be open wide (i.e. small **F-Number** value). That may lead to a very burnt and bright image, so to preserve the same illuminosity over the whole image, the shutter speed must be shortened. And at last but not least the **Focus distance** determines which part of the scene will be actually on focus. To get the focus near, you would need a small value and reverse - higher value for far focus.

For the images in this example, the following constant settings were used for some parameters: **Exposure** is on, **F-Number** is 1.0, **Shutter speed **is 4000.0, **Film speed (ISO)** is 100.0, **Vignetting** is off.


### Example: Motion blur


To enable the motion blur effect, you need to enable the **Motion blur** option in the **DoF & Motion blur** rollout of the physical camera. The amount of motion blur is determined by the speed of the moving object itself as well as the **Shutter speed** setting of the camera. Long shutter speeds will produce more motion blur, as the movement of the object is tracked over a longer time. In reverse, short shutter speeds will produce less motion blur. Keep in mind that to preserve the same brightness over the whole image, the **F-Number **value has to be corrected as well.


> ✅ In this example, the falling roof tiles are moving faster than the flower pot, which causes the difference in the motion blur effect.

For the images in this example, the following constant settings were used for some parameters: **Exposure **is on, **Film speed (ISO)** is 200.0, and **Vignetting **is on.

#### **Motion Blur with objects moving on a curved trajectory**

Objects moving on a curved path, rotating or deforming objects usually require more geometry samples for correct motion blur. This is controlled with *SettingsMotionBlur::geom_samples*. For example, with the default value of 2, a sphere moving along a curved path will appear to be moving in a straight line when motion-blurred. (In general, more geometry samples lead to a slight performance hit which is why the default value is 2.)


Increasing the geometry samples even slightly will produce correct motion blur. The perfect value is scene-dependent and may require some experimentation.

---

#### **Motion Blur with small and/or fast moving objects**

Small, fast moving or small and fast moving objects may additionally require the min subdivs of the Image Sampler to be increased slightly above the default 1. This is the case with small particles or thin hair, which can require adjusting some additional settings even if motion blur is not used. V-Ray’s adaptive sampler may miss such objects with the first sample in a pixel, which will prevent it from continuing sampling the pixel. Usually, this requires raising the Image Sampler’s min subdivs to 2 or 3. (The choice of the default value is motivated by this relation: the more initial samples, the slower the rendering. In most cases the value 1 gives good results, but sometimes manual adjustments may be needed.)

Here’s an example to consider. A simple particle emitter that shoots particles in one direction. Compare the images without motion blur and with motion blur to see the effect of raising the Image Sampler’s min subdivs from 1 to 2.


It’s clear that some particles are not rendered at all when motion blur is enabled. Raising the Image Sampler’s min subdivs to 2 allows V-Ray to shoot more initial samples in each pixel before any adaptivity is applied. This helps intersecting all particles.

> ⚠️ **Motion Blur Notes**
> ⚠️ 
> ⚠️ These examples omit *SettingsMotionBlur::low_samples* on purpose. This is a parameter that controls the motion blur samples when using the Irradiance Map engine for GI and the Irradiance Map is not a recommended GI solution anymore, as it’s not compatible with features like the Adaptive Lights.