-
Layer transparency based on distance to camera…
Hi all,
I’m trying to do the following.
I have a bunch of layers, and I need their transparency to be linked to the camera position. Thus far no problem. But what I want is to have them be fully opague at the focus point of the camera. And have their transparency fall off when they get closer or further away.
Ideally I’d use an expression control slider to control the focus distance, and the fallof amount…
I think I need to bits:
The exact position in 3D space of the focus point (not the same as the point of interest).
Based on camera position and orientation, I could probably add the focus distance value with some vector math to figure out the camera focus point position.
Then second I need to get the layers’ distance to this focus point using length.
Finally using a linear mapping expression I’d map the distance values to a usable 0 to 100 scale…
But after spending three hours on this, I’d love to see what you guys can come up with.
Thanks in advance…