-
Tint layer based on distance to camera, How to make it based on Z only?
Hi Guys, I’m using this expression on the tint effect in order to desaturate layers when further away from the camera. However it is also desaturating the layers when they are moved further from the camera in X & Y space. Is there any way for the expression to only desaturate the layers when moved away from the camera in Z space?
Thanks!
mCam=thisComp.layer("Camera 1").transform.position;
mPos=thisLayer.transform.position;
minDist=7150;
maxDist=8200;
fDist=length(mCam,mPos);
fOpa=linear(fDist,minDist,maxDist,0,100);

