Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects How to create: Light decay or drop-off according to distance.

  • Frank Weber

    August 24, 2006 at 10:08 am

    I’m not so hot with coding.

  • Dan Ebberts

    August 24, 2006 at 9:36 pm

    A 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 begins

    L = 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 pm

    First, 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.

Page 2 of 2

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy