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 ...
-
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).
-
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
-
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?
-
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
-
Re: Linking depth of field focus to Null?
Hey David! What are your plans for using the distance between two nulls?
Similar Threads
-
By Application Development in forum Adobe After Effects
Replies: 2
Last Post: 01-19-2007, 04:40 PM
-
By Application Development in forum Graphics
Replies: 3
Last Post: 01-01-2007, 01:42 AM
-
By Application Development in forum Adobe After Effects
Replies: 10
Last Post: 11-06-2006, 07:14 PM
-
By Application Development in forum Graphics
Replies: 0
Last Post: 07-13-2005, 11:05 AM
-
By Application Development in forum Java-Games
Replies: 17
Last Post: 12-10-2004, 03:48 AM