Controlling Depth of Field (DoF) in Maya - The 'lookAt' Node |
If you are going to use DoF I recommend right up front using either a 'Camera and Aim' (2 node camera) or 'Camera, Aim and Up' (3 node camera) preset rig from the Create > Cameras menu. The reason for this is that when the camera and locator(s) are created they are grouped under a node usually named something like 'camera#_group'.
![]()
This node is NOT the same type of node used when grouping. This node is actually a 'lookAt' node where as nodes created from actual groupings are just 'transform' nodes. This node already contains a distance attribute which we can use in the same method from part 2 and just connect the two attributes.

Connections are similar to the distance tool except that the attribute name on the 'lookAt' node is called 'distanceBetween'. You will notice that this attribute is already controlling the 'centerOfInterest' attribute on the camera shape, leave this connection unchanged.

Next we will write a MEL script that automates this process.