Using Depth of Field with VRay in Cinema 4D

Using Depth of Field with VRay in Cinema 4D

Tutorial Details

Final Product What You'll Be Creating

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.

Don’t miss more CG tutorials and guides, published daily – subscribe to Cgtuts+ by RSS.

  • gfdfd

    what is the point?

    • http://kaleb-3d.com Kaleb Aylsworth

      The point is to have realistic depth of field in your renders as you would in real life with your photos taken from an actual camera. This is something that does not come automatically built in to all CG renders, and can go a long way towards adding realism to what would otherwise be very harsh and unnatural looking images.

  • Bruck

    Great Tut. I will definitely use this in the future.

  • c-r-u-x

    How does the VRAY camera’s DOF compare against Frischluft’s lenscare?

  • wtf_cakes

    Very useful, thank you.

  • http://www.sparks-media.com Sparks

    Cool…thank you for the article. VRay is such a good rendering tool.

  • Tong

    Using Depth of Field with VRay in Cinema 4D = Step 33

    all other steps seems no use to it ;-)

    anyway thank for sharing.

    Cheers, Tong.

    ps: http://think.maxwellrender.com/dof_cue_tool-111.html

  • nana

    sorry, but how do i get Vray for C4D?
    Is there any place I can download it from for free?
    Thank u for the tutorial, very interesting!

  • http://www.eiwedding.com wedding

    all other steps seems no use to it ;-)

    anyway thank for sharing.

  • bekfor

    how can l find vray pls help

  • Airam

    hello

    I have a problem when I give him to render me the screen goes black and crashes

  • Jesse

    This is my render of the project file.
    4K Resolution
    16x Anti-Aliasing

    https://dl.dropbox.com/u/39662249/DOF.png