Creative Communities of the World Forums

The peer to peer support community for media production professionals.

  • Posted by Jack Parks on January 6, 2010 at 10:31 am

    Hello

    I have a stack of layers with brightness/contrast applied.
    I have applied this expression to brightness so each layer is darker than the one above.
    -index*5
    How can I modify this so the expression would spread 0 to -100 brightness over the number of layers,
    the top layer would be value 0 and the last layer would be -100 [or another value]

    Thanks

    Jack Parks replied 16 years, 4 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    January 6, 2010 at 12:53 pm

    Something like this:

    maxVal = -100;
    n = thisComp.numLayers;
    if (n < 2) 0 else (index-1)*maxVal/(n-1) Dan

  • Jack Parks

    January 7, 2010 at 6:32 pm

    That’s great.
    Thank you.

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