How to enable and control DOF in Corona for C4D?



To enable depth of field:


Go to Render Setup > Scene > Camera/Exposure/Tone Mapping > Depth of field and check "Enable"





Focal point distance


To determine focal point distance, Corona will either use a camera's Focus Distance or Focus Object, the "Focus distance" value from the Corona Camera Tag, or the "Perspective view focus distance" value from the render settings if you are rendering from a perspective view.



Photographic Exposure Controls

Depth of field is affected by photographic exposure controls.



Depth of Field Quality

The quality of depth of field is mainly dependent on anti-aliasing (AA samples). To focus computing power more on anti-aliasing than on GI-sampling, you can decrease "GI vs. AA balance" value to about 4-8.



The Corona Camera Tag is recommended

For the easiest control of Depth of Field, it is recommended to use a Corona Camera Tag on your camera. For example, F-stop settings from the native Cinema 4D camera will not affect DOF.



Troubleshooting


DoF effect is too weak, everything is sharp even if I set very low f/stop values such as 0,1


This may be caused by using wrong scene scale. Incorrect units may be used. The dimensions of objects in the scene should correspond to the size of camera's sensor width. If you are, for example, using millimeters instead of meters (or vice versa), you need to either rescale the scene or set camera's sensor size to corresponding units (for example meters instead of millimeters).




Examples


1. F-stop

As in photography, increasing the F-stop value will make DoF effect more subtle. Decreasing F-stop value will make it more pronounced.

1.1 F-stop = 2 - pronounced DoF effect



1.2. F-stop = 4



1.3. F-stop = 16 - subtle DoF effect




2. Target distance

2.1. Camera target placed in the far end to focus on the blue ball:



2.2. Camera target placed in the center:



2.3. Camera target placed close to camera to focus on the purple ball:





3. Sensor size

Sensor size also affects the appearance of DoF effect. Increasing it makes DoF effect more pronounced. Note: in Cinema 4D, changing the Sensor Size keeps the Focal Length static and automatically changes the Field of View; be sure to reset your Field of View after changing Sensor Size if you want to retain the same composition in your image.

3.1. F-stop=4, Sensor width=35mm


3.2. F-stop=4, Sensor width=100mm




4. Bokeh type

4.1. Circular:



4.2. Bladed:



4.3. Custom:




4.4. Custom, "fake chromatic aberrations":