-
round 2 with a distance fade
sorry, reposting this because it got buried in a preivous thread…
i’ve revamped the script to make it more malleable. strange things happen though when i scale an object. it inversely effects the end result of the script, ie. scale up, the effect lessens, scale down the effect increases. here’s the current script.
Q=thisComp.layer(“atmopheric master control”); // Effect control null
startFade = Q.effect(“Start Close Up”)(“Slider”); // Effect begins at this distance from cam
endFade = Q.effect(“End Close Up”)(“Slider”); //Effect ends at this distance from camC = thisComp.activeCamera.toWorld([0,0,0]); // Cam position
x = thisComp.activeCamera.position[0]; // Cam x position
y = thisComp.activeCamera.position[1]; // Cam y position
z = anchorPoint[2]; // Object z position
P = toWorld([x,y,z]); // Object relative position on the z-axis from Cam
d = length(C,P); // Distance Calculation
easeOut(d,startFade,endFade,Q.effect(“Color Balance (HLS) Zoom”)(“Saturation”),0) // Actual effect based on startFade & endFade parametersi base the distance from the object to the cam only on the z axis because i have a bunch of off centered anchor points for animation and it reads the distances further away compared to two objects on the same plane.
…er, yeah.
so why is scale coming into effect here? is it because i’m using toWorld?
thanks
chris d-_-b