Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions interpolate between 2 keyframes

  • interpolate between 2 keyframes

    Posted by Jonas Espinoza on August 13, 2010 at 12:28 am

    i am trying to make a hundred or so assets push back in Z space, and each land on their own custom x,y ultimately at z= 0.

    i want to be able to globally change how long it takes all of them to make the move from custom keyframe 1 to custom keyframe 2, with a comp wide global variable for the langth of this move.

    is there a key.1 type of data for the position of the first keyframe? and is there a way to ramp from key.1 to key.2 over slider.duration length of time?

    im just trying to avoid moving all the keyframes to retime everything

    Jonas Espinoza replied 15 years, 9 months ago 2 Members · 3 Replies
  • 3 Replies
  • Jonas Espinoza

    August 13, 2010 at 12:31 am

    hold on, i will post with better questions. finding some good stuff in the manual

  • Dan Ebberts

    August 13, 2010 at 1:54 am

    I think you might be looking for something like this:


    value1 = [100,100,500];
    value2 = [100,100,0];

    if (numKeys > 1){
    linear(time,key(1).time,key(2).time,value1,value2)
    }else{
    value
    }

    Dan

  • Jonas Espinoza

    August 13, 2010 at 6:23 pm

    hey thanks

    yeah thats kinda what i have

    i am wondering how now i can add a random to an array value. in this case “p1” – i know how to generate a random value, but whats the procedure to add randomization to x and y of the 0,1,2 array and how would i add that to p1, which seems like it contains those 3 values inside of it

    i am trying to paste the code into the code box, let me know if you cant see it

    seedRandom(index+1, true);
    r = random()*4;

    p1=position.key(1).value;
    p2= position.key(2).value;
    duration= thisComp.layer("EXPRESSION CONTROLLER").effect("duration")("Slider")+r;
    ease(time, inPoint, duration, p1, p2);

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