Using Depth of Field with VRay in Cinema 4D

Using the DOF effect in Cinema 4D can be a little tricky for beginners, and it was no different for me when I had just started using VRay. So I've prepared this tutorial to show you how easy it can be once you understand the fundamentals. Creating a scene lighting setup from scratch, and using object based lighting techniques will also be covered.

Step 15

Step 16

Step 17

Place this cube object above the spheres (as it will be a light source to illuminate them)

Step 18

Copy this cube object and place it on the opposite side.

Step 19

Add a Camera object (Objects > Scene > Camera).

Step 20

Select "Cameras > Scene Cameras > Camera" to make it the default camera.

Step 21

Position the camera so you can see all of the spheres.

Step 22

Switch to the Top view (F2 key), and select the camera object. Under the "Depth" tab, adjust the "Target Distance" value. As you change the value, the front part of the camera will move. Align it with the object you want to focus on (in other words, the object that you want to be clear).

Step 23

Select all of the sphere objects, and under the "Object" tab, un-check the "Render Perfect" option.

Step 24

To add a VrayPhysical camera tag to the camera object, select the camera, right click, and go to "VrayBridge Tags > VrayPhysical camera".

Step 25

Select this tag, and under the "Sampling" tab, turn on the "DOF on" option and change the "Subdivision" to 12 (Higher values make the DOF effect clearer).

Step 26

To create a new Vray material, go to "File > VrayBridge > VrayMaterial".

Step 27

In the Material Editor, turn on the "Luminosity Layer", and choose a color (I used bright yellow).

Step 28

Copy this material and change the color (i used light blue this time).

Step 29

Now drag and drop one of these materials onto one cube object, and the other one onto the other cube.

Step 30

Enter the "Render Settings" (Cmd+B).

Step 31

Select "VrayBridge" under the "General" Tab.

Step 32

Under the "Indirect Illumination (GI)" tab, choose a final render quality from the "Presets" (I used medium quality).

Step 33

Select the "VrayPhysical camera" tag (added to camera object earlier), and under the "Lens Parameters" tab, change the "F-stop" value to "1", and the "Shutter Speed" to "100". To reduce the strength of the DOF, use higher "F-stop" values. Note: If you use a higher "F-stop" value, you will have to reduce the "Aperture" value, which will lead to a darker render because you will be blocking the light from entering the camera. To balance that problem, you can then use a lower "Shutter Speed" value to allow more time for light to enter the camera.