ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

How do I avoid a small jump in the first line when using a text animator?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
David Cabestany
How do I avoid a small jump in the first line when using a text animator?
on Feb 11, 2020 at 11:00:47 pm
Last Edited By David Cabestany on Feb 11, 2020 at 11:01:31 pm

I have a text layer in which the text on the 1st line writes on automatically each time a marker is passed via an expression, the text on the 2nd appears as a single line by moving from below into its final position. That is also controlled by an expression and the animation repeats itself each time a marker is passed.

My problem is that depending on the length of the first line a small jump is noticeable in some of the lines, you can watch an example of this here:

https://www.dropbox.com/s/nhfp7xgfp1y52o4/bumpSample.mp4?dl=0

The 3rd text, at :04 seconds moves slightly upwards.

The problem there is a bunch of small texts in this layer and the issue happens on some of them not all.

So my question is is there something I can add to the expression that will compensate and prevent that slight jump?

Below are the expressions I'm using, I think the problem lies in the offset, which because I only have two lines it stands around 50%

Thanks in advance for your help,
D.

For the text source:
txt = value;
n = 0;
if (thisComp.marker.numKeys > 0){n = thisComp.marker.nearestKey(time).index;
if (thisComp.marker.key(n).time > time) n--;
if (n > 0) txt = thisComp.marker.key(n).comment;
}
txt;

1st animator, write on the 1st line of text: spd = 65; // characters per second
n = 0;
if (thisComp.marker.numKeys > 0){
n = thisComp.marker.nearestKey(time).index;
if (thisComp.marker.key(n).time > time) n--;
}
if (n > 0){
t = time - thisComp.marker.key(n).time;
dur = text.sourceText.length/spd;
linear(t,0,dur,0,100);
}else
0

2nd animator, 2nd line moving up:

spd = 65; // characters per second
n = 0;
if (thisComp.marker.numKeys > 0){
n = thisComp.marker.nearestKey(time).index;
if (thisComp.marker.key(n).time > time) n--;
}
if (n > 0){
t = time - thisComp.marker.key(n).time;
dur = text.sourceText.length/spd;
linear(t,0,dur,100,0);
}else
0


Return to posts index

David Cabestany
Re: How do I avoid a small jump in the first line when using a text animator?
on Feb 12, 2020 at 2:54:03 pm

No one?


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]