Here we will take a look at rendering in-camera Depth of Field (DOF) using the V-Ray stereoscopic shade map.
I always prefer rendering DOF in the camera. I don't know why. Maybe I'm a purest and just prefer to get things right up front. But maybe not. I love the bokeh that V-Ray gives me and the control I get over setting its parameters. Despite this love for V-Ray's DOF, it has still always been a bit slow and clunky to adjust. You can imagine therefore my delight when I found a time-saving solution to testing and implementing DOF in-camera. Let me introduce you to it...
What even is DOF?
Good question. It is essentially the distance in front of and behind a specific point which is sharp in the output. We'll call that point the focus point. The size of the area that is sharp as well as the amount of blurriness is dependent on a variety of settings in the camera, which we'll look at in more detail in a minute.
Think about it! Don't overuse it or use it incorrectly. This is partly why I find it best to do it in-camera because then the result is correct. Using DOF is a beautiful artistic tool that enables us to bring in an emotive aspect to our visuals. It also helps us to keep the viewer's focus on those areas that we want. There is therefore great power and opportunity with it. Your best bet would be to get out in the real world with a camera and experiment. Get used to how the settings affect the output and grow in confidence that way.
As previously mentioned, you can control the DOF with several settings. The 2 main controls we will focus on here are the focal length and the aperture size. In principle, the longer the focal length, the shallower the DOF will be. Obviously a wide angle lens is going to have a wider DOF. In terms of the aperture (f-number or f-stop); basically the smaller it is, the shallower the DOF will be. If you want to make sure that everything is in focus then go for a higher aperture. Please note that these will only affect the DOF if it is switched on in the V-Ray camera.
Here you can see that the area in focus is greatly adjusted by the f-number
(ID: 249189, pid: 0) Parthipan on Tue, 04 February 2014 2:56pm thanks for this tutorial very helpful
(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.
(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?