Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Camera and 3d layer positioning

  • Camera and 3d layer positioning

    Posted by Eduardo Cruz on May 4, 2012 at 4:09 am

    Hi, i’m a total newb with expressions. I’m doing a sky replacement but i want the sky to stay the same distance away from the camera through out the timeline. the reason i made the sky a 3d layer is because there is some camera swivel and panning that doesn’t look natural unless the sky is a 3d layer. I was thinking an expression that takes the z position of the camera and the z position of the layer, figures out the difference and maintains it regardless of where i move the camera. Parenting isn’t giving me the effect i want. thanks

    Jeff Bobbington replied 14 years ago 2 Members · 2 Replies
  • 2 Replies
  • Eduardo Cruz

    May 4, 2012 at 6:16 am

    well, i found a solution that works pretty well, any other ways to do this?

    NewZ=this_comp.layer("Camera 1");
    [position[0],position[1],NewZ.position[2]+"the initial difference"];

  • Jeff Bobbington

    May 4, 2012 at 10:39 am

    I would have thought separating the dimensions of positions of each, then parenting the Z axis of the sky to the Z axis of the camera would have worked.

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