Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Jerky movement aminating text layer

  • Jerky movement aminating text layer

    Posted by Kane Daniel on April 26, 2022 at 2:47 am

    Forgive me because I’m not great with expressions.

    I’m animating some paragraph text on using the position and opacity values with an expression on the offset value.

    I want to be able to:

    – Set the in and out points of the animation using markers

    – Set the length of the on and off animations using sliders

    – Have the expression retime the animation according to how many lines are in the paragraph text so (for example) if there’s one line the animation is seven frames, if it’s two lines the animation is 14 frames, etc.

    Right now I’ve frankensteined this together from a couple of sources:

    m = 0;
    t = time;
    h = thisLayer.sourceRectAtTime(0).height;
    l = thisLayer.text.sourceText.getStyleAt(0).leading;
    rowNo = Math.ceil(h / l);
    inDur = thisComp.layer(“Controllers”).effect(“In duration”)(“Slider”);
    outDur = thisComp.layer(“Controllers”).effect(“Out duration”)(“Slider”);
    m = marker.nearestKey(time).index;
    tag = marker.key(m).comment;
    if(tag == “In”){
    t = time – marker.key(m).time;
    fadeTime = framesToTime(inDur * rowNo);
    }
    else if(tag == “Out”){
    t = marker.key(m).time – time;
    fadeTime = framesToTime(outDur * rowNo);
    }
    linear(t,0, fadeTime, -100, 100)

    It’s roughly works but I get little hitches and judders in the movement of the text or the text unexpectedly visible before the in point or after the out point.

    The problems seem to get worse if rowNo > 8 but I can’t seem to pin down exactly what’s causing the problem. I thought it may be that the values for h and l were varying over time, which is why I tried to lock them at t = 0 but that didn’t solve it.

    I’m a bit lost, any help appreciated!

    Kane Daniel replied 4 years, 3 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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