ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Animate text on per letter using a custom flicker expression

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Tom Holmes
Animate text on per letter using a custom flicker expression
on Jul 10, 2017 at 6:34:49 am

I have the following expression which animates a layers opacity on in a flickering fashion:

if (time < inPoint || time > outPoint){
f = 0;
}else if (time < (inPoint+outPoint)/2){
f = timeToFrames(time - inPoint);
}else{
f = timeToFrames(outPoint - time);
}
switch(f){
case 0:
case 2:
case 4:
case 6:
0;
break;
case 1:
25;
break;
case 3:
50;
break;
case 5:
75;
break;
case 7:
100;
break;
default:
100;
break;
}

Is there a way I can adapt and use this with a text layer's animate and expression selector so the letters animate on separately (either randomly or in sequence) with this same animation.

Thank you! ☺

Tom


Return to posts index

Dan Ebberts
Re: Animate text on per letter using a custom flicker expression
on Jul 10, 2017 at 3:51:24 pm

Add an Opacity Animator, set its value to 0, and an Expression Selector and use this for Amount:


totalDur = 1.0;
myStart = inPoint + (textIndex-1)*totalDur/textTotal
myEnd = outPoint - (textIndex-1)*totalDur/textTotal;
if (time < myStart || time > myEnd){
f = 0;
}else if (time < (myStart+myEnd)/2){
f = timeToFrames(time - myStart);
}else{
f = timeToFrames(myEnd - time);
}
switch(f){
case 0:
case 2:
case 4:
case 6:
100;
break;
case 1:
75;
break;
case 3:
50;
break;
case 5:
25;
break;
case 7:
0;
break;
default:
0;
break;
}



Dan



Return to posts index

Tom Holmes
Re: Animate text on per letter using a custom flicker expression
on Jul 10, 2017 at 5:14:01 pm

Thank you so much Dan! You're such a huge help.

How could make the letters appear in a random order instead of in sequence?

Thanks

Tom


Return to posts index


Dan Ebberts
Re: Animate text on per letter using a custom flicker expression
on Jul 10, 2017 at 8:09:17 pm

Like this maybe:




totalDur = 1.0;
seedRandom(textIndex,true);
myStart = inPoint + random(totalDur - framesToTime(8));
myEnd = outPoint - random(framesToTime(8),totalDur);
if (time < myStart || time > myEnd){
f = 0;
}else if (time < (myStart+myEnd)/2){
f = timeToFrames(time - myStart);
}else{
f = timeToFrames(myEnd - time);
}
switch(f){
case 0:
case 2:
case 4:
case 6:
100;
break;
case 1:
75;
break;
case 3:
50;
break;
case 5:
25;
break;
case 7:
0;
break;
default:
0;
break;
}



Dan



Return to posts index

Tom Holmes
Re: Animate text on per letter using a custom flicker expression
on Jul 10, 2017 at 8:24:45 pm

Perfect, you've done it again.

Thank you so much!

Tom


Return to posts index

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