Building a DOF Camera

Report this File

Dof_cam_02

Views:

31,767

Updated:

Jun 20, 2007

Readership Level:

Intermediate

Tags:

Maya Versions:

7.x, 8.x

Platforms:

irix, linux, mac, windows

Owner:

Language:

English

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.

Tutorial_next_page

Comments

Dashboard_avatar
Jun 01, 2010
Post id: 11363
Report this comment to moderators [SPAM]

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.

Dashboard_avatar
Aug 11, 2010
Post id: 12120
Report this comment to moderators [SPAM]

hello
when i scroll down on editor ; i can,t find distance or focus distance attribute; what should i do ?
thanks in advance

View yuval gofer's profile
Nov 16, 2011
Post id: 15498
Report this comment to moderators [SPAM]

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

You must be logged in and have verified your email address to leave a comment. Login or create an account