Activity › Forums › Adobe After Effects › How to create: Light decay or drop-off according to distance.
-
How to create: Light decay or drop-off according to distance.
Mike Clasby replied 19 years, 9 months ago 4 Members · 13 Replies
-
Dan Ebberts
August 24, 2006 at 9:36 pmA little late to the party, but here’s a fun thing to try. Add this expression to the diffuse and specular material options of your 3D layer:
decay = .001; // speed of falloff
d100pct = 200; // distance from light where falloff beginsL = thisComp.layer(“Light 1”);
d = length(L.position,position);
if (d < d100pct){ value; }else{ value/Math.exp((d-d100pct)*decay); } The first parameter has the most effect on how fast layers get dark as they move away from the light. The advantages of this approach are that the layers don't become transparent and the effect is independent for each layer since the intensity of the light itself is not affected. Dan -
Mike Clasby
August 24, 2006 at 11:45 pmFirst, it’s never too late for the King to come to the party.
Second, Oooo I like that expression. I tinkered with the Specular and Diffuse, but didn’t try them in combo, but it makes perfect sense, no reflection or highlight (terminology may be shaky) and no visibility. The opacity thing was all I could think of, this is great, thanks.
Reply to this Discussion! Login or Sign Up