Creative Communities of the World Forums

The peer to peer support community for media production professionals.

  • Posted by Sebastian Martinez on September 5, 2007 at 1:18 pm

    Hi guys,

    I’m very fresh on expressions and had a look all over the place for a simple thing: I am linking the opacity of one layer to another via the pick wipp so that they start fading in on the same frame. So far so good. But what I want now is that the linked layer should fade in slower than the other. How is that possible in the expression?

    Probably a very short phrase but my java skills are too poor yet – a little tip would help!

    Ta!

    Sebastian

    Sebastian Martinez replied 18 years, 11 months ago 2 Members · 3 Replies
  • 3 Replies
  • Mike Clasby

    September 5, 2007 at 4:48 pm

    delay = 5; //number of frames to delay
    op = thisComp.layer(“Leader”).opacity;
    d = delay*thisComp.frameDuration;
    op.valueAtTime(time – d)

  • Mike Clasby

    September 5, 2007 at 4:49 pm

    I just had a Copy/Paste malfunction, here is all of it.

    This expression on Opacity should do what you want (Copy the expression, Alt-click the opacity Stopwatch, Paste, then click outside the expression box):

    delay = 5; //number of frames to delay
    op = thisComp.layer(“Leader”).opacity;
    d = delay*thisComp.frameDuration;
    op.valueAtTime(time – d)

    It assumes the first layer you made is named “Leader”, change the “Leader” in line 2 to whatever you leader layer is named. Actually line 2 should be what you had after the pickwhip you did, except with your layer name, and we made it a variable.

    This expression was reassembled (hacked) form a Dan Ebberts expression from here:

    https://www.motionscript.com/mastering-expressions/follow-the-leader.html

    Those expression are fro trails so they use index-1 which goes off their stacking order, but the expression above will work in any layer arrangement or order.

    Dan’s site is fantastico:

    https://www.motionscript.com/

  • Sebastian Martinez

    September 6, 2007 at 2:08 pm

    Wow, that works! Like a swissmade watch – nice. That worked IN KIND of they way…

    More persize now: The “leader’s” opacity from 0 to 100 within a frame. The follower should start it’s 0 % opacity from the same spot but reaches the 100% continuously after the delay of 5 frames or whatsoever.

    Jese, that was a big lesson anyway! Thank you yikesmikes for your instant help. Ikind of understand and “read” that syntax – I just tried with more of big dan’s stuff but with not much of usefull results. I guess it’s just a language thing.

    Dan’s webpage is a great indeed! I have visited it a few times before. Before I posted that message I tried a few expressions from the very same link where you “cracked” your sugestion from.

    But thanks so far big time!

    Seb

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