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.
Comments
Apparently you're using a different version of maya. I'm using 2010 and in outliner I don't seem to have: (distanceDimensionShape1) and (CameraShape1) so I don't know how to [Ctrl] select them together. So I get stock in this tutorials 2nd page.
DOF is a very important aspect of rendering.
Thanks anyway.
hello
when i scroll down on editor ; i can,t find distance or focus distance attribute; what should i do ?
thanks in advance
filux and esi ravi hello
step 1. select "distance dimention" and than in the attribute editor prees "select" button.
go to conection editor and press "reload left".
step 2. select "camerashape1" and than in the attribute editor prees "select" button.
go to conection editor and press "reload right".
now you can find yours menu.
Write a Comment