- July 31, 2015 at 4:32 pm
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?
- July 31, 2015 at 4:51 pm
Try change the line:
- July 31, 2015 at 5:38 pm
This might be what you’re looking for:
C = thisComp.layer(“Camera 1”);
v = mPos-mCam;
zDist = dot(v,C.toWorldVec([0,0,1]));
- August 2, 2015 at 10:16 am
Dan, That is perfect thank you!
- January 5, 2018 at 5:03 pm
I thought I would respond to this thread than begin another as I think my question relates. I am a relative newcomer to AE and am fumbling my way through. Expressions and scripts are quite new to me. I have a scene of a lot of cutouts of people (numerous 3d layers at different ‘z’ distances to the camera). This is how it looks at the moment:-
At the moment, all my people are tinted the same, but I would like to be able to desaturate and lighten the people out the further they are from my camera. This is basically what I am trying to achieve:-
Could anyone explain exactly how I should do this please?
Log in to reply.