N***@adobeforums.com
2008-09-29 18:47:29 UTC
I'm having some trouble getting a light to fall off in the distance. Layers behind a light seem to receive the same amount of illumination no matter how far away the layer is in Z space. Is there something I'm missing?
If that's a limitation of AE lighting, could I fake falloff with an expression to decrease brightness based on the distance from the layer to the camera?
Here's the old Opacity to Camera Distance chesnut:
startFade = 500; // Start fade 500 pixels from camera.
endFade = 1500; // End fade 1500 pixels from camera.
try{ // Check whether there's a camera.
C = thisComp.activeCamera.toWorld([0,0,0]);
}catch(err){ // No camera, so assume 50mm.
w = thisComp.width * thisComp.pixelAspect;
z = (w/2)/Math.tan(degreesToRadians(19.799));
C = [0,0,-z];
}
P = toWorld(anchorPoint);
d = length(C,P);
linear(d,startFade,endFade,100,0)
How would I modify that to work on the Brightness/Contrast plug-in? Is there a better looking way? Exposure plug-in maybe?
If that's a limitation of AE lighting, could I fake falloff with an expression to decrease brightness based on the distance from the layer to the camera?
Here's the old Opacity to Camera Distance chesnut:
startFade = 500; // Start fade 500 pixels from camera.
endFade = 1500; // End fade 1500 pixels from camera.
try{ // Check whether there's a camera.
C = thisComp.activeCamera.toWorld([0,0,0]);
}catch(err){ // No camera, so assume 50mm.
w = thisComp.width * thisComp.pixelAspect;
z = (w/2)/Math.tan(degreesToRadians(19.799));
C = [0,0,-z];
}
P = toWorld(anchorPoint);
d = length(C,P);
linear(d,startFade,endFade,100,0)
How would I modify that to work on the Brightness/Contrast plug-in? Is there a better looking way? Exposure plug-in maybe?