Skip to main content
Participant
November 27, 2013
Question

Animate a Blur Letter-by-Letter

  • November 27, 2013
  • 2 replies
  • 1396 views

So I've just learned about creating an expression selector, but I know absolutely nothing about writing code for expressions. What I want to achieve is this: I have a paragraph of text filling the screen; it begins all blurred and then unblurs one letter at a time until it reaches the end of the text.

I have the text layer, then I have the blur animation keyframed from (50, 50) to (0, 0) 5 seconds later. By just putting on an expression selector, I seem darned near what I need but the animation doesn't start with letter 1 blurred, it has already set the blur on character 1 to 0, progressing to blur of 50 on the last character. I need all of the characters to start at blur 50 and then start the animation from character 1.

The default expression for expression selector is "selectorValue * textIndex/textTotal." I believe I need some kind of offset so that it doesn't start the animation at the beginning of my composition. I'm not sure how to code that or even how to look up the code, though I'm pretty sure it's something ridiculously simple.

The next issue is I'd like the letters to go from 50 blur to 0 blur one at a time in the span of a fraction of a second. Is this asking for a lot of code? I looked at a tutorial covering this and it seems like a lot of code may be involved in that and maybe I'm out of my depth. I don't even know how to go about learning what code is needed for this.

Thanks for any help. I hope this is clear.

This topic has been closed for replies.

2 replies

Participant
November 28, 2013

Didn't get a chance to try the above, but ended up just taking some expression code from a tutorial for a different animation that ended up giving me what I needed. It was indeed quite complicated, and I'm pretty sure some of it is irrelevant to what I'm doing but when I try to trim what seems to be unrelated it stops working, so...shrug.

freq = effect("Frequency")("ADBE Slider Control-0001");

decay = effect("Decay")("ADBE Slider Control-0001");

if(effect("Random Time")("ADBE Checkbox Control-0001")==0){

retard = textIndex*thisComp.frameDuration*effect("Offset")("ADBE Slider Control-0001");

}else{

seedRandom(index*textIndex,timeless=true);

retard = random(0,1);}

t = time - (inPoint + retard);

startVal = [100,100,100];

endVal = [0,0,0];

duration = effect("Duration")("ADBE Slider Control-0001");

if (t < duration){

linear(t,0,duration,startVal,endVal);

}else{

amp = (endVal - startVal)/duration;

w = freq*Math.PI*2;

endVal + amp*(Math.sin((t-duration)*w)/Math.exp(decay*(t-duration))/w);

}

Dan Ebberts
Community Expert
Community Expert
November 27, 2013

Something like this should get you started:

tAnim = .075; // time for each character to unblur

tStart = (textIndex-1)*tAnim;

linear(time,tStart,tStart+tAnim,value,[0,0])

Dan