Adverti horiz upsell
Building a DOF Camera
Building a DOF Camera
warrick, added 2007-06-20 09:28:41 UTC 43,155 views  Rating:
(2 ratings)
Page 1 of 2

Depth of Field is one of those things that is more often than not, over used. However it does form an important role in generating realistic imagery in 3 dimensional environments. This tutorial does not discuss the correct use of DOF, but instead will show a simple but effective way to set-up a camera that can control DOF without needing work out distances.

Essentially what we want is a camera that will adjust its own DOF value according to the distance from the camera to a point we specify. We could create a camera and a locator and create a connection, but Maya already provides a camera that we can use.

Select Create>Cameras>Camera and Aim to create a camera that already has an aim constraint.

This is ideal for what we need. However we still need to work out the distance from the camera to the aim locator. We could write expressions or even create a node network to do this, but again Maya provides a simple tool that will measure the distance for us.

Select Create>Measure Tools>Distance Tool. You will need to click twice in the viewport to create two locators. A line will be drawn between the two locators with the distance between them included just above that line. You can place the locators anywhere. We're going to contrain them now anyway.

Open your outliner. You should have something like this:

Make sure you turn on "Shapes" from the display menu. You can open the camera1_group to see the camera node and the locator node. You will also see a "Locator1" and "Locator2". These are the locators from the distance tool. Now we need to create the constraints.

Make sure the "Animation" menu set is open and select the "camera1" node from the outliner. Now CTRL-Click (or Cmd-Click for Apple) the "locator1" node. Select Constrain>Point Constrain and open the options. Make sure that "Maintain Offset" is turned off in the options and click "Add". The locator will now move with the Camera.

Create another point constrain, but this time, first select the "camera1_aim" node and then the "locator2" node.

Okay. We're about half way now.