Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › Help with transition between expressions

  • Help with transition between expressions

    Posted by Volohmedia on March 9, 2007 at 4:49 pm

    Someone please help me out with this one. I am new to expressions and attempting to create a transition between the pendulum and undulation expressions found on motionscript.com. I have tried splitting the layer and keyframing the position/rotation to match, but it still looks a bit jerky. any help would be greatly appreciated. Thanks.

    Dan Ebberts replied 19 years, 6 months ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    March 9, 2007 at 7:32 pm

    I’m not sure exactly what you’re trying to do, but in general, if you want to transition from one expression to another for the same property, you can use linear() like this:

    transStart = 4; //start transition at 4 seconds
    transDur = 2; // transition duration

    // undulation expression

    xFreq = .3; //undulations per second
    xSpeed = 150; //speed of wave (pixels per second)
    damping = 15; //undulation damping factor

    wl = xSpeed/xFreq; //wavelength (pixels)
    phaseOffset = ((position[0]%wl)/wl)*2*Math.PI;
    theta = Math.atan(Math.cos(2*Math.PI*xFreq*time + phaseOffset));
    result1 = radiansToDegrees(theta)/damping;

    // pendulum expression

    veloc = 7;
    amplitude = 80;
    decay = .7;
    result2 = amplitude*Math.sin(veloc*time)/Math.exp(decay*time);

    // transition

    linear(time,transStart, transStart + transDur,result1,result2)

    Is that what you’re after?

    Dan

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