Creative Communities of the World Forums

The peer to peer support community for media production professionals.

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 pm

    Hi!
    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 pm

    Add 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 fade

    maxDelay = .75;
    fadeTime = .5

    seedRandom(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 = .5

    seedRandom(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 pm

    awesome!!

    uhm… do you think is it possible to fade it out before reaching the outPoint?

    thanks!!!

  • Dan Ebberts

    September 13, 2015 at 5:58 pm

    You could do something like this:


    maxDelay = .75;
    fadeTime = .5

    if (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 pm

    awesome! thanks!
    I was thinking in a random fade out per character, but it works too!

  • Peter Zeet

    September 18, 2015 at 6:38 pm

    actually.. 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 pm

    Something like this, I guess:


    maxDelay = .75;
    fadeTime = .5

    if (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

  • Peter Zeet

    September 19, 2015 at 8:04 pm

    amaaazing! thanks!!!

  • Jeremy Noell

    January 15, 2016 at 6:43 pm

    Hi 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
    Jeremy

    minDelay = 1;
    maxDelay = 10;
    fadeTime = .5

    seedRandom(textIndex,true);
    delay = random(minDelay, maxDelay);
    t = time-inPoint;
    if (t &lt; delay)
    100
    else
    linear(t,delay,delay+fadeTime,100,0)

  • Dan Ebberts

    January 15, 2016 at 7:47 pm

    Something 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 pm

    Yes, that does it! It’s also way different than I thought. I’m going to have to dig deeper into expressions.

    Thanks so much!

Page 1 of 2

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy