Linking depth of field focus to Null? - Adobe After Effects

This is a discussion on Linking depth of field focus to Null? - Adobe After Effects ; What's the best way to link the focus of my camera to a null? I want the DoF seperated from the point of interest. I just want to move a null around to change what the camera is focused on ...

+ Reply to Thread
Results 1 to 5 of 5

Linking depth of field focus to Null?

  1. Default Linking depth of field focus to Null?

    What's the best way to link the focus of my camera to a null? I want the DoF seperated from the point of interest. I just want to move a null around to change what the camera is focused on (which may or may not be where the camera is aimed at the moment).

  2. Default Re: Linking depth of field focus to Null?

    Focus distance is measured in pixels. All you have to do is add an expression to the Focus distance of the camera that measures the length from the null to the camera. The Expression Language Menu has a category called Vector Math . In that category you'll find the following: length(point1, point2) All you have to do is replace point1 with position and point2 with thisComp.layer("Null 1").position

    The final expression looks like this:

    length(position, thisComp.layer("Null 1").position)

    Now, no matter where you put your null, the camera will be focused on that point. It couldn't be much simpler.

    Rick

  3. Default Re: Linking depth of field focus to Null?

    Thanks for the explanation Rick.

    So if you had Null 1 and Null 2, it'd be
    length(thisComp.layer(Null 1").position, thisComp.layer("Null2").position) ?

    So that calculates how far apart 2 nulls are?

  4. Default Re: Linking depth of field focus to Null?

    If the null isn't on the camera's z axis, you need to do a little vector math to align the camera's focal plane with the null. An expression like this for the camera's Focus Distance should do it:

    v1 = thisComp.layer("Null 1"). position - position;
    v2 = toWorldVec([0,0,1]);
    dot(v1,v2)

    Dan

  5. Default Re: Linking depth of field focus to Null?

    Hey David! What are your plans for using the distance between two nulls?

+ Reply to Thread

Similar Threads

  1. Helping depth of field
    By Application Development in forum Adobe After Effects
    Replies: 2
    Last Post: 01-19-2007, 04:40 PM
  2. Pluging for extended depth of field, and panoramas ?
    By Application Development in forum Graphics
    Replies: 3
    Last Post: 01-01-2007, 01:42 AM
  3. Getting a better depth of field blur?
    By Application Development in forum Adobe After Effects
    Replies: 10
    Last Post: 11-06-2006, 07:14 PM
  4. Depth of field..
    By Application Development in forum Graphics
    Replies: 0
    Last Post: 07-13-2005, 11:05 AM
  5. field depth blur (was Re: CryEngine tech demo)
    By Application Development in forum Java-Games
    Replies: 17
    Last Post: 12-10-2004, 03:48 AM