Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions number of layers distribute up opacities

  • number of layers distribute up opacities

    Posted by Bert Brown on May 27, 2008 at 7:57 pm

    i’m trying to make a trail of squares rain down.

    i want it to be expandable later, so i want to utilize “thisComp.numLayers” to distribute opacity.

    so if there are 5 layers, i want index 1 to be 100%, index to be 80%, index 3 to be 60%, etc.

    but if i want to do 6 layers, it would automatically switch them to 100, 84, 68, and so on.

    i’m stuck trying to be get this backwards. i’m using (index-1)…valueAtTime(time-X) so the order is important.

    if anyone has any other advice on how to make a Matrix-y, squares raining down with trails grid, that’d be great too. i just think i need a “math person” for this specific hurtle

    ———————————-

    peep my over-the-interweb band, red abbott.
    “we electro-rock over long distances…”

    Bert Brown replied 18 years, 2 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    May 27, 2008 at 8:29 pm

    Try this:

    n = thisComp.numLayers;
    (n – index+ 1)*100/n

    Dan

  • Bert Brown

    May 27, 2008 at 8:33 pm

    ah yes. works perfectly. i knew it would involve the variable twice, but i just couldnt get there. i think what i was really missing was the idea of adding 1 to the index

    thanks, dan!

    ———————————-

    peep my over-the-interweb band, red abbott.
    “we electro-rock over long distances…”

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