Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Select Every Other Character Excluding Spaces Within a Text Animator

  • Dan Ebberts

    June 10, 2014 at 4:46 pm

    Add your two Animators and set the max property values.
    Add an Expression Selector to each Animator and delete the Range Selectors.
    Set each Expession Selector’s “Based On” property to “Characters Excluding Spaces”
    Add this expression to the Amount property of one selector:

    textIndex%2 ? 100 : 0

    Add this to the other:

    textIndex%2 ? 0 : 100

    Dan

  • George Goodman

    June 10, 2014 at 4:53 pm

    Thanks Dan!

    Quick question. What is the syntax saying when you use “? 100 : 0” is it just, “if true yes, if false no?”

    Also, I had a semi solution that I was using in the screenshot below. Could you possibly explain to me why when I keyframed the position value that a value of 8,000 only moved the characters about 200 pixels?

    7599_screenshot20140610at12.45.45pm.png.zip

    “|_ (°_0) _|”

    Sincerely,

    George

    http://www.vimeo.com/georgegoodman
    http://www.linkedin.com/in/georgefranklingoodman

  • Dan Ebberts

    June 10, 2014 at 5:03 pm

    The ? means if the preceding was true, do the first thing, otherwise do the second thing (the part after the :).

    If you want to get the full 8000, your amount expression would need to evaluate to 100. It looks like the most it could be is 1.

    Dan

  • George Goodman

    June 10, 2014 at 5:08 pm

    Thanks! That makes a lot of sense. The logic of the expression selector has always eluded me, but that helps. One last question.

    What if I wanted to then affect it in order from left to right. So essentially combining something like the expression below with the index selector. Make sense?

    swings=3;
    timeOffset=0.25;

    v=valueAtTime(time-timeOffset*textIndex/textTotal)[0];
    anim=2*Math.PI*v/100;
    amp=easeOut(v,0,100,100,0);
    Math.cos(anim*swings)*amp;

    “|_ (°_0) _|”

    Sincerely,

    George

    http://www.vimeo.com/georgegoodman
    http://www.linkedin.com/in/georgefranklingoodman

  • Dan Ebberts

    June 10, 2014 at 6:22 pm

    I can’t tell exactly what you’re trying to do there, but I have a couple of expression selector examples here that might be of some use:

    https://www.motionscript.com/articles/bounce-and-overshoot.html#calc-overshoot

    Dan

  • George Goodman

    June 10, 2014 at 6:47 pm

    Essentially the motion in this video as if these blocks were text. I want to isolate the text first in a group based on the character being odd or even and then bring them in sequentially, but still in order respective to the entirety of the text. Hmm, tough to explain.

    7600_comp1.mov.zip
    (Currently using these blocks as a track matte to reveal text)

    “|_ (°_0) _|”

    Sincerely,

    George

    http://www.vimeo.com/georgegoodman
    http://www.linkedin.com/in/georgefranklingoodman

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