-
Expression to mimic aerial perspective?
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