Working the Depth of Field in Maya Viewport 2.0

Autodesk’s Daryl Obert shows how you can visualize depth a field right in a Maya view using Viewport 2.0. Maya’s Viewport 2.0 has the ability to show you depth of field effects in real time.

In this edition of Maya Mondays, Daryl takes a look at Maya’s Depth of Field featuresAutodesk.com

This can be useful for viewing and gauging what the DOF settings may look like in the final render. Its not an exact true to render DOF, but it can be used to set up your focal plane and focus distance to block out what will be in focus in the shot without rendering.

attributes of the depth of field settings for the standard Maya camera, and how those settings will reflect in in the viewport using Viewport 2.0

 

DOF in Viewport 2.0

Daryl covers the attributes of the depth of field settings for the standard Maya camera, and how those settings will reflect in the viewport using Viewport 2.0. The DOF features of Viewport use the standard Maya camera. That is to say if you will be using a specific setup such a lens shader in Mental Ray, or Physical Camera Attributes from V-Ray, changing the F-Stop number there will not reflect anything in Viewport 2.0. Only the Maya camera attributes for F-Stop, Focus Distance and Distance Scale will have an effect on the view.

I suppose you could link the F-Stop numbers from the mental ray lens shader and V-Ray physical camera attributes to the maya camera if you wanted to make those edits there, or select “derive from Maya camera” to have it use the settings from the Maya camera.

Setting a DOF Camera Rig

Daryl offers a great tip for creating a camera rig right around the middle of his presentation that will give you an easy way to set up what can be in focus in the scene. Daryl uses the Maya Distance Tool’s locators to control the focal length of the camera which in turn sets the DOF.

Using Set Driven Keys to Clamp Values

You probably have seen creating a simple DOF camera rig a few times, making a relationship between the locator attributes and items in the scene to drive the DOF settings in the Maya camera. Daryl takes it a step further by incorporating Maya Set Driven Keys that will clamp the locator positions to specific distances in the scene.