//Atomic - Aenhancers.com
camSource=thisComp.layer("Camera 1").position;
footSource=thisComp.layer(index).position;
minDist=1000;
maxDist=2500;
minBright=0;
maxBright=100;
distance=length(footSource,camSource);
darken=ease(distance,minDist,maxDist,maxBright,minBright);