Activity › Forums › Adobe After Effects Expressions › Random character opacity on and off
-
Random character opacity on and off
Dan Ebbertsreplied 1 year, 3 months ago 11 Members · 25 Replies
-
Jessica Lawheed
September 17, 2021 at 7:18 pmIn V 18.4.1 I am getting an error saying there is a “SyntaxError unexpected token ‘else'”. Any fixes for this?
-
Dan Ebberts
September 17, 2021 at 7:25 pmIf it’s the most recent expression, you probably just need to replace this:
if ((time-inPoint) < myReveal) 100 else 0
with this:
(time-inPoint) < myReveal ? 100 : 0
-
Adam Goddard
May 27, 2022 at 7:37 amHi there I know this is from a long time ago, I was wondering if you could tell me a way of altering this expression to make the opacity fade or ramp as the characters randomly fade on and off. Thank you very much
-
Adam Goddard
May 27, 2022 at 7:46 amHi there I know this is been a long long time since the post. But I would like to use this expression however is it possible to ramp the opacity of the characters? If you could please let me know thank you.
-
Dan Ebberts
May 27, 2022 at 3:27 pmIt depends on which expression you mean, but with the latest one, you could do something like this:
revealTime = 3; // reveal over 3 seconds
fadeTime = .5;
seedRandom(textIndex,true);
myReveal = random(revealTime);
linear((time-inPoint), myReveal, myReveal+fadeTime, 100, 0)
or maybe switch the last line to this:
linear((time-inPoint), myReveal, myReveal+fadeTime, 0, 100)
depending on whether you want the letters to fade in or out.
Reply to this Discussion! Login or Sign Up