Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions constant distance between camera and a layer

  • constant distance between camera and a layer

    Posted by Mike Johnson on October 31, 2008 at 2:46 pm

    I’ve found a few answers that come close to my problem, but I’m not good enough with expressions to adapt them to my needs…

    I have about 20 layers randomly distributed in 3d space. I used a variation of Dan’s “how to build a better camera man” code from the pan, tilt, focus, zoom composition. In addition, I put a one liner on the camera’s Position that links it to the Point of Interest, adding 200 to the z. My intent was to always have the camera a set distance from the layer on interest.

    This works fine when all the photos are on the orientation (namely “0” rotation). However, it falls apart when I want to introduce some random orientation to the photos. When the camera points to a photo, I want it to be facing straight on to it, not at an angle.

    I think I need to do something with the target.toWorld opeation, but I’m not sure. Everything I’ve found seems to deal with a camera that is sitting still and the layers are moving in front of it.

    Any thoughts or comments of ridicule?

    Mike

    Trent Armstrong replied 17 years, 5 months ago 2 Members · 1 Reply
  • 1 Reply
  • Trent Armstrong

    November 11, 2008 at 3:43 pm

    I think this would involve the camera being parented to a Null object that used something like ease() to get itself positioned at the appropriate layer. Then you might be able to use the ease() function to have the Null take on the rotation of the layer. This would position the camera using the Null rotation which is taken from the layer’s rotation thereby making it directly in front of the layer.

    Trent Armstrong – Creative Cow Leader
    https://www.dallasaeug.com

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