Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Scale moving layers based on a luma of fixed gradient map

  • Scale moving layers based on a luma of fixed gradient map

    Posted by Lance Clayton on February 25, 2016 at 1:25 am

    Hi guys,

    Im sure this has been asked before but I couldn’t quite find an answer.

    I’m looking to pull a string of layers across screen with them scaling to a peak say (100%) as they hit the centre and then back down to a lower value (say 20%) near the edges.

    See the image for reference.

    I’m assuming one approach is a fixed gradient map and an expression applied to the layers in the string that references the luma of the gradient map? However I’ve no idea how to expression this into anything that works.

    Another approach could be some expression that increases scale in relation to distance from edges of comp (ideally with flexibility to make this a linear or ramped effect).

    It would seem that this script (https://aescripts.com/ae-shader-effector/) might get a long way towards a solution, but I’d like to explore simpler methods before buying a script.

    Thanks in advance for any ideas.

    Lance Clayton replied 10 years, 6 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    February 25, 2016 at 1:42 am

    Something like this maybe:

    minScale = 60;
    maxScale = 100;
    d = Math.abs(toComp(anchorPoint)[0] – thisComp.width/2);
    s = easeOut(d,0,thisComp.width/2,maxScale,minScale);
    [s,s]

    Dan

  • Lance Clayton

    February 25, 2016 at 2:15 am

    Dan,

    Thank you!

    Wow, that it exactly what I need, I can’t believe it was so difficult to track down.

    Much appreciated.

    Lance

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