Activity › Forums › Adobe After Effects Expressions › inPoint/outPoint Per Character Opacity
-
inPoint/outPoint Per Character Opacity
Posted by Peter Zeet on September 12, 2015 at 1:17 pmHi!
I want to make about 300 text layers do the next.. I’m sure it’s possible, but don’t know how to achieve this simple things, with no keyframe, maybe you have the clue…
1. is it possible to fade in/out the characters based on their inPoint/outPoint, but per character on a random order and not the whole word?
2. is it possible to give as an option (maybe with a checkbox) to flicker the opacity while fading in and out? (so like a neon sign)Thanks!!
Santi Agustí replied 10 years, 3 months ago 4 Members · 11 Replies -
11 Replies
-
Dan Ebberts
September 12, 2015 at 4:02 pmAdd an opacity animator, set the value to zero, add an expression selector, and one of these expressions to the selector’s Amount property:
// per-character random fademaxDelay = .75;
fadeTime = .5seedRandom(textIndex,true);
delay = random(maxDelay);
t = time-inPoint;
if (t < delay)
100
else
linear(t,delay,delay+fadeTime,100,0)// random fade with flicker
maxDelay = .75;
fadeTime = .5seedRandom(textIndex,true);
delay = random(maxDelay);
t = time-inPoint;
seedRandom(textIndex,false);
if (t < delay)
100
else
random(linear(t,delay,delay+fadeTime,100,0))
Dan
-
Peter Zeet
September 12, 2015 at 5:03 pmawesome!!
uhm… do you think is it possible to fade it out before reaching the outPoint?
thanks!!!
-
Dan Ebberts
September 13, 2015 at 5:58 pmYou could do something like this:
maxDelay = .75;
fadeTime = .5if (time < outPoint - fadeTime){
seedRandom(textIndex,true);
delay = random(maxDelay);
t = time-inPoint;
if (t < delay)
100
else
linear(t,delay,delay+fadeTime,100,0);
}else{
linear(time,outPoint-fadeTime,outPoint,0,100);
}
Dan
-
Peter Zeet
September 18, 2015 at 2:58 pmawesome! thanks!
I was thinking in a random fade out per character, but it works too! -
Peter Zeet
September 18, 2015 at 6:38 pmactually.. do you think it’s possible to tweak the function to make the letters fade out randomly and not all the word together?
-
Dan Ebberts
September 18, 2015 at 11:13 pmSomething like this, I guess:
maxDelay = .75;
fadeTime = .5if (time < (inPoint + outPoint)/2){
seedRandom(textIndex,true);
delay = random(maxDelay);
t = time-inPoint;
if (t < delay)
100
else
linear(t,delay,delay+fadeTime,100,0);
}else{
seedRandom(textIndex+1103,true);
delay = random(maxDelay);
t = time - (outPoint-delay-fadeTime);
if (t < 0)
0
else
linear(t,0,fadeTime,0,100);
}
Dan
-
Jeremy Noell
January 15, 2016 at 6:43 pmHi Dan,
I’ve only been using expressions a short time, so I’ve been trying to solve this on my own and I just can’t quite get it.
I’m trying to do something very similar to the per-character random fade, but I would like to have each character to fade in during a longer timeline. The look I’m going for is sort of like the Wheel of Fortune puzzles that determine which player spins first. A random letter is revealed every second or so until someone buzzes in to solve it.
I have added a minDelay to the expression to have the total text fade over a timeline from 1 second to 10 seconds, but I haven’t figured out how to make the letters come up at an even pace. Any help you can give would be greatly appreciated.
Thanks
JeremyminDelay = 1;
maxDelay = 10;
fadeTime = .5seedRandom(textIndex,true);
delay = random(minDelay, maxDelay);
t = time-inPoint;
if (t < delay)
100
else
linear(t,delay,delay+fadeTime,100,0) -
Dan Ebberts
January 15, 2016 at 7:47 pmSomething like this might work:
delay = .5;
fadeTime = .1;a = [];for(i = 0; i < textTotal; i++) a.push(i);
seedRandom(index,true);
for (i = 0; i < a.length; i++){
idx = i + Math.floor(random(a.length - i));
temp = a[i];
a[i] = a[idx];
a[idx] = temp;
}
myDelay = a[textIndex-1]*delay;
t1 = inPoint + myDelay;
t2 = t1 + fadeTime;
linear(time,t1,t2,100,0)
Dan
-
Jeremy Noell
January 15, 2016 at 8:20 pmYes, that does it! It’s also way different than I thought. I’m going to have to dig deeper into expressions.
Thanks so much!
Reply to this Discussion! Login or Sign Up