Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expressions Dummie Needs Help!!

  • Expressions Dummie Needs Help!!

    Posted by Jonathan Lutjens on March 24, 2010 at 5:39 pm

    Hello folks,

    I’ve got an expression problem (shocker). I used Maltaanon’s awesome little tutorial for a 3D camera setup. So far, so good. Now, I’ve gotten into the project and it’s time to deal with adding some depth of field. So, I found an expression (right here) that ties the depth of field to the camera’s point of interest. Awesome. The expression simply uses length(p1,p2) where p1 is camera position and p2 is point of interest. Problem is, with the current camera rig, my camera’s position is always negative because it’s referencing distance to a null object. The pOI however, changes because it’s referencing real world position. Since my camera is animating between negative and positive z space, this little expression isn’t working. If my poI is at 45 in Z, and my camera is flipped around and is actually at 150 Z, but has a z value of -165, the focus distance expression sees that the distance is 210, when it is in fact something else.

    I have a file so that whoever would/could dig into this can have a look-see at the setup. Please let me know if you’re interested.

    Oh yeah, if someone just has a simpler way to do this, that would be even better. All I want to do is to have my focus distance tied to the pieces in the scene that I want to be in focus. I figured the easiest way to do that was to tie focus distance to the point of Interest and then tie the pOI z-value to the z-value of a null object that I could animate around the scene.

    If you haven’t yet figured it out, I am not gifted in the area of math and math language.

    Thanks for reading, I appreciate it.

    Jon

    Dan Ebberts replied 16 years, 1 month ago 2 Members · 1 Reply
  • 1 Reply

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy