Keep up-to-date with Free tutorials!!

 

Sign up to our twice-monthly newsletter today for the latest tutorials, interviews and product information.

Sign me up to receive third-party emails from 3dtotal's partners, too!

- Latest news
- Exclusive Shop Offers
- Preview early content
- Plus much more

 

Not Ready to take that step? OK, Why not just Subscribe to the RSS Feed

 
submit tutorial
1 | 2
V-Ray Depth of Field with shade map

By Paul Hatton
Web: Open Site
| Your Rating:
rating star fullrating star fullrating star fullrating star fullrating star full
(2 Votes)
| 43299 Views
| 3 Comments
| Comments 3
Date Added: 24th January 2014
Software used:
V-Ray

Setting up DOF in V-Ray: Part 1

Firstly go into your V-Ray Physical Camera and to the Sampling rollout. Tick the ‘depth-of-field' tick box and increase the number of subdivisions for a cleaner, less noisy result. I usually use 8 subdivisions for test renders and then I might raise it to 32 subdivisions for production quality renders. This is a time versus quality thing.

1832_tid_paul_hatton_-_3d_total_-_vray_dof_-_step_4.jpg
Unless DOF is ticked you won't see any DOF in your image, no matter what your other settings are

Setting up DOF in V-Ray: Part 2

Once DOF is activated in the camera, you then need to adjust your settings to tweak the result. I adjust the focal length, f-number and focus distance to get the result I need. The focal length adjusts how wide the viewing angle is. The f-number adjusts the distance that is in focus. And finally, the focus distance adjusts the centre point that is most in focus. I would recommend playing around with these on a simple scene so that you get used to how they affect each other.

1832_tid_paul_hatton_-_3d_total_-_vray_dof_-_step_5.jpg
Do make sure you play around with the settings to see how fine-tuning has an effect on the image

Use the V-Ray Stereoscopic helper

Start by going to the ‘Create' menu and the ‘Helpers' section. Pick ‘VRay' from the dropdown. Then create a ‘VRay Stereoscopic' object anywhere in the viewport – it doesn't matter where. Set the eye distance to 0 because we're not using this helper to create a 3D stereoscopic image where the eyes are separated. Then set the Shademap mode to ‘Render shade map' and specify a file for the result to be outputted to. This will ensure that when render is next executed, the shade map will be rendered.

1832_tid_paul_hatton_-_3d_total_-_vray_dof_-_step_6.jpg
We will utilise the stereoscopic helper but not for what you might think!

Render the shade map

Now that your stereoscopic helper is set up, double-check your camera DOF settings are as desired and then hit render. Please note that because you are rendering the shade map, there will be no DOF in the resulting image. Don't worry about this. Just think of this step as a pre-calculation step.

1832_tid_paul_hatton_-_3d_total_-_vray_dof_-_step_7.jpg
This pre-calc step enables you to render the DOF much quicker next time round, even if you've made adjustments to your scene


Switch to using the shade map

With the shade map rendered, select the stereoscopic object and set the ‘Shademap mode' to ‘Use shademap'. Make sure that the file is the same as the one you've just pre-calculated. With that completed, go back to your camera and hit render again. This will render your final image with the DOF but it'll do it in a much quicker time than ordinarily.

1832_tid_paul_hatton_-_3d_total_-_vray_dof_-_step_8.jpg
This image took around half the time to render using the shade map option, compared to the standard process

Switch to using the shade map

With the shade map rendered, select the stereoscopic object and set the ‘Shademap mode' to ‘Use shademap'. Make sure that the file is the same as the one you've just pre-calculated. With that completed, go back to your camera and hit render again. This will render your final image with the DOF but it'll do it in a much quicker time than ordinarily.

1832_tid_paul_hatton_-_3d_total_-_vray_dof_-_step_9.jpg
A simple crop of the resulting image in half is all that is required to finish the job

Disadvantages vs advantages

The obvious disadvantage to this technique is the inherent approximation that is included. If you want a perfect, physically accurate result, then you will need to render it straight out of the camera. However, you have the obvious advantage of speed with the shade map technique. You can make adjustments to your lighting for example, and re-render again and again using the shade map. This is a massive time saver, especially during the test render phase.

1832_tid_paul_hatton_-_3d_total_-_vray_dof_-_step_10.jpg
Looking at real in-camera DOF will vastly improve your own work. Here is another example of how it is used well

Top tip 1: Guide the eye with DOF

One of the best uses for DOF other than for artistic flair is that it is a great tool to guide the viewer's eye to the exact part of the image that you want them to focus on first.

1832_tid_paul_hatton_-_3d_total_-_vray_dof_-_top_tip.jpg
The DOF is set up on the mushroom to make the viewer look at it first. This is a beautiful photo which uses DOF very artistically


Related links
Head over to Paul Hatton's website over at CADS
Looking for photo reference? Try sxc
Want the latest V-Ray version? 3.0 is in beta now!




< previous page

 
1 | 2
Related Tutorials

Tutorial

Gallery Image.



Keywords: scene, neon, lights, vray, max,

Go to tutorial
rating star nonerating star nonerating star nonerating star nonerating star none (0)
Comments 0 Views 49635

Tutorial

Gallery Image.



Keywords: Tutorial, Car, KeyShot, Rendering, Lighting

Go to galleries 1
rating star fullrating star fullrating star fullrating star fullrating star half
Comments 1 Views 64540

Tutorial

Gallery Image.



Keywords: blender, rendering, freestyle, fillipo veniero,

Go to galleries 1
rating star fullrating star fullrating star fullrating star fullrating star half
Comments 3 Views 49290

Tutorial

Gallery Image.



Keywords: beginners, fundamentals, 3ds max, lighting, rendering,

Go to galleries 1
rating star fullrating star fullrating star fullrating star fullrating star half
Comments 0 Views 24204
Readers Comments (Newest on Top)
avatar
(ID: 249189, pid: 0) Parthipan on Tue, 04 February 2014 2:56pm
thanks for this tutorial very helpful
avatar
(ID: 247131, pid: 0) Bobby Parker on Fri, 24 January 2014 3:46pm
Great tutorial. I have read about this over on the Chaos Group forum, but I never really knew what they were talking about. Thank you for your time.
avatar
(ID: 246981, pid: 0) Eoin on Thu, 23 January 2014 5:06pm
Hey - thanks for the tutorial. However what are the advantages of this method over applying the depth effect in post-production using a depth map?
Add Your Comment