Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Markers triggers layers

  • Markers triggers layers

  • Jean Livenais

    February 27, 2023 at 7:37 am

    Hello,

    Can you help me to build an expression where one layer shows up each time the playhead reaches its marker’s name and fades out when the playhead reaches the next marker with an 1s ease transition between each layer? The fade in and the fade out of 2 consecutive layers would occur simultaneously. You can see in the example, the layers can appear randomly one after another.

    Thank you

  • Filip Vandueren

    February 27, 2023 at 12:25 pm

    Although it may need some extra logic if two consecutive markers have the same name, which they don’t in your example… Something like this:

    m = thisComp.marker;
    nk = m.nearestKey(time);
    pki = nk.index - (nk.time > time && nk.index>1 ? 1: 0);
    k = m.key(pki);
    if (k.comment==thisLayer.name) {
    linear(time,k.time,k.time+1,0,100);
    } else if (pki>1 && m.key(pki-1).comment==thisLayer.name) {
    linear(time,k.time,k.time+1,100,0);
    } else {
    0;
    }
  • Jean Livenais

    March 1, 2023 at 4:18 pm

    Thank you Filip, it works great.

    Is there a way to start the transition before and end the transition after each marker, so that the marker is half way of each transition?

    I tried to modify the code but it didn’t turn as wished.

  • Filip Vandueren

    March 1, 2023 at 9:08 pm

    I think you only need to change line 2 into nk = m.nearestKey(time+0.5) ; but I haven’t tested.

  • Jean Livenais

    March 3, 2023 at 8:14 pm

    I tried and the transition stay the same.

    Maybe with some negative value with the posterize function.

    Thanks

Viewing 1 - 5 of 5 posts

Log in to reply.

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