1. Design & Illustration
  2. Graphic Design
  3. 3D Design

Using Depth of Field with VRay in Cinema 4D

Scroll to top

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 1

Create a rectangle (Objects > Spline Primitive > Rectangle).

Step 2

Under the settings of this spline, select the "Object" tab, turn on the "Rounding" option, and set the "Radius" value to "100 cm".

Step 3

Add an "Extrude NURBS" to the scene (Objects > NURBS > Extrude Nurbs).

Step 4

Drag the Rectangle object over the Extrude NURBS to make it child.

Step 5

Change the "Movement" section, under the "Object" tab of the Extrude NURBS settings.

Step 6

Select the Extrude NURBS object and make it editable (C key).

Step 7

Click the little plus symbol near the Extrude NURBS object and delete the "Cap 1" and "Cap 2" objects.

Step 8

Switch the viewport to Top view (F2 Key).

Step 9

Select the "Use polygon tool" and then select the "Live selection" Tool.

Step 10

Un-check the "Only select visible elements" section under the live selection tool settings.

Step 11

Now select and delete only the faces which create the right side of geometry.

Step 12

Switch to Perspective view (F1 key), and select the "use edge tool".

Step 13

Select the long edge at the bottom and pull it to create a long face.

Step 14

Now create a "Sphere" (Objects > Primitive > Sphere) with 40 segments and a 30 cm Radius.

Step 15

Copy it two times, and place randomly from near to far (in the viewport).

Step 16

Create a "Cube" (Objects > Primitive > Cube) with the dimensions 380 x 200 x 15 cm.

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.


Did you find this post useful?
Want a weekly email summary?
Subscribe below and we’ll send you a weekly email summary of all new Design & Illustration tutorials. Never miss out on learning about the next big thing.
One subscription. Unlimited Downloads.
Get unlimited downloads