Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Light Intensity based on composition’s width & height

  • Light Intensity based on composition’s width & height

    Posted by Seth Minnich on June 8, 2023 at 2:20 pm

    Hi all,

    I’m hoping someone could help me out. I’ve been trying to figure out how to write an expression for a Point Light to have “dynamic edge triggering” – similar to Optical Flares’ edge of frame light brightening but inverted. This is close to what I want to do but I’m not using a camera and I’m using a light instead of a layers (https://www.youtube.com/watch?v=I-Acdl_l9G0&t=15s).

     

    What I’m trying to do is have a Point Light’s Intensity go from 0% once it hits the edge of the comp/stage edge to 100% Intensity at the center of the comp/stage. Ideally if the comp size changed, everything would still work the same without having to update the comp dimensions in the expression.

    Thanks!

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

    Brie Clayton replied 3 years, 1 month ago 3 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    June 8, 2023 at 3:43 pm

    Something close to this maybe:

    p = toComp([0,0,0]);
    w = thisComp.width/2;
    h = thisComp.height/2;
    center = [w,h];
    maxD = Math.sqrt(w*w + h*h);
    d = length([p[0],p[1]],center);
    easeIn(d,0,maxD,100,0)
  • Seth Minnich

    June 8, 2023 at 5:59 pm

    Awesome, thanks Dan this works exactly how I hoped. I appreciate the fast help!

  • Brie Clayton

    June 11, 2023 at 3:15 am

    Thanks for your solve, Dan!

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