Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions link to value from layer above but hold it at 100%

  • link to value from layer above but hold it at 100%

    Posted by Saudi on May 9, 2007 at 8:23 am

    Hello everybody,

    I am trying to animate a path on a map using “blinking/pulsing” dots. I animated the opacity of the first layer using keyframes. ( 0% to 100% and back to 0%) Then I duplicated this layer a couple of times and linked the opacity to the first layer using:

    thisComp.layer(thisLayer, -1).opacity.valueAtTime(time – .4);

    so they are fading in and out one by one.

    so far, so good.

    Now I want to hold the last layer at 100%, to show the end of the path.
    Is it possible to grab just the two keyframes from 0% to 100% at the last layer.

    How can I do this?

    thanks for your help.

    greez Martin

    Saudi replied 18 years, 12 months ago 3 Members · 3 Replies
  • 3 Replies
  • Lord Scales

    May 9, 2007 at 3:59 pm

    I don’t know this so much, but try this:

    > find the time in which the Opacity of the last Layer go to 100. Let’s suppose it is in 6:21, so…

    o = thisComp.layer(thisLayer, -1).opacity.valueAtTime (time -.4); //value of opacity
    oMax = 100; //maximum value
    t = 6.7; //time when it gets to 100

    if(time < t) o else oMax I think there is an easier way like "when opacity gets to 100%, keep in until..." but I don't know exactly. Lord Scales

  • Filip Vandueren

    May 9, 2007 at 4:40 pm

    Can’t you just keyframe that one layer ?

    I’m not sure I understand:

    Does every layer have just three keyframes 0-100-0, or are they looping/blinkg all the time ?
    When exactly does the last layer need to stay at 100% ?
    When the first layer has completed its cycle ?

    BTW, here’s a different way to do it:

    Draw a Path, use text on Path and fill it with periods …..
    Now use a text animator to animate opacity. You can even add a little bit of scaling.

    No expressions needed, and I think it’s the effect you need.
    Much simpler to change the road by chaning the mask shape, and the spacing between the dots is figured out automatically.

  • Saudi

    May 10, 2007 at 8:21 am

    Hello again,

    thanks for your replys.

    @Lord Scales: I tried to play around with time calculations but ended up in a bigger mess :-). But I think that it is possible to do it this way.Aas u said, there must be an easier way to do it. Thanks for your reply.

    @Filip: I think its to complicated to describe the whole thing. I am triing to animate a path/way on a map. Its a military map and I have the show the movement of the troops. The map was exported from cinema 4d with NULL objekts including position data for each dot. The dots are a bunch of 2D-Layers and just the first dot is animated(opacity) by keyframes. All the Layers under this mother- or masterlayer are connected with expressions like this:

    thisComp.layer(thisLayer, -1).opacity.valueAtTime(time – .4);

    to behave exactly like the first layer (or the layer above), just half a second later.

    Now I want the last dot-layer to “read” just the first two keyframes from the animated masterlayer. (0% to 100%) like “do exactly what the layer above is doing but if opacity ==100 then stop and keep it”.

    I hope u get what I want.

    thank u so much

    greeez martin

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