Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression to mimic aerial perspective?

  • Expression to mimic aerial perspective?

    Posted by Shawn Marshall on January 15, 2006 at 10:22 pm

    Howdy:

    I’m creating a scene in which the camera is flying forward on the z-axis in an abstract enivronment through over 100 images arrayed in x, y and z space (with help from Digital Anarchy’s 3D assistants). It looks cool, but it’s sort of cluttered in the middle. I’ve enabled depth of field on the camera to push the images that are farther back out of focus, but I’d like to try to add a sense of aerial perspective by having them fade up from zero to full opacity as the camera gets closer to them.

    It seems like an expression of some sort would be an ideal solution to create this effect, but I’ve not gone much beyond the pick-whip level. I’ve done some cursory reading into creating expressions and I went out and purchased the Meyer’s 2nd volume of Creating Motion Graphics with After Effects, which delves into the subject, but, to be honest, I’m on a deadline and I don’t have a ton of time to try to work this out by myself, so I’m calling on the generosity of this forum.

    Specifically, my camera is at 432, 243, -8700 at the start of the comp and at 432, 243, 10300 towards the end (10 seconds later). The image layer closest to the front is at -5400 on the z axis and the image layer farthest back is at 12700.

    So it seems to me that I need an expression which subtracts the z position of the image layer from the z position of camera, then performs some magical math to convert that to something the opacity channel can use, so that when the camera is 6000 pixels away (or farther) the layer is at zero opacity, and it fades up to full opacity when the camera is 4000 pixels away.

    Figuring out this magical math is my biggest obstacle at this point. I was good at algebra 25 years ago, but that’s pretty much evaporated. Working out the correct syntax to make it all work is beyond me at this point, too.

    So, any hints or suggestions or solutions would be appreciated. If someone has an alternate approach or solution to create this effect I’d love to hear that, too.

    Thank you.

    Shawn Marshall
    Marshall Arts Motion Graphics

    Dan Ebberts replied 20 years, 7 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    January 16, 2006 at 2:02 am

    Something like this:

    dist = position[2] – thisComp.activeCamera.position[2];
    linear(dist,4000,6000,100,0)

    Dan

  • Shawn Marshall

    January 16, 2006 at 9:28 am

    Dan:

    Cool. Thank you for your help; I appreciate your taking the time to reply. I actually think I understand the concept now that I’ve compared what you’ve written to the second interpolation method described on page 381 of the manual. I doubt that I would have even looked at that section because, frankly, it looks really complicated. But after studying it it seems to make sense to me.

    Shawn Marshall
    Marshall Arts Motion Graphics

  • Dan Ebberts

    January 16, 2006 at 5:17 pm

    That’s the idea. 🙂

    Glad to help.

    Dan

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