Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Uneven spaces between text

  • Uneven spaces between text

    Posted by David Cabestany on January 10, 2014 at 5:09 pm

    After applying the expression below to several text layers, the space between them does not match.
    Some of the layers have the proper space,

    The value i’m assigning to dist is 60, some of the layers (for example jan-feb and feb-mar are evenly spaced, but then the remaining layers are all messed up, I can’t figure out why.

    I aligned them all to the right and set the anchor point at 0,0, all layers are three letters, same size, tracking and leading (even though they don’t have a second line) and I adjusted the kerning to have them more or less occupy the same space.

    I have no idea why they aren’t spacing as intended, can anyone help?

    Thanks,
    David.

    dist=thisComp.layer("months expressions").effect("space between months")("Slider");
    timeDelay=thisComp.layer("months expressions").effect("time delay")("Slider");

    x=thisComp.layer(index+1).transform.position.valueAtTime(time-timeDelay)[0]+dist;
    y=thisComp.layer(index+1).transform.position[1];
    [x,y];

    David Cabestany replied 12 years, 4 months ago 3 Members · 6 Replies
  • 6 Replies
  • Dan Ebberts

    January 10, 2014 at 6:15 pm

    What’s the time delay supposed to do?

    Dan

  • David Cabestany

    January 10, 2014 at 6:46 pm

    It makes each month slide in from the right a few frames after the previous one. I removed it from the expression to see if that was causing it but that wasn’t the case.

  • Dan Ebberts

    January 10, 2014 at 7:35 pm

    Does this give you the final spacing you’re after?

    thisComp.layer(index+1).transform.position + [60,0];

    If not, I guess it’s a problem with the way the layers are set up. If yes, then I’d guess it’s in the valueAtTime/delay part of the expression. Hard to say without seeing it though.

    Dan

  • David Cabestany

    January 10, 2014 at 9:10 pm

    Nope, after MAR (march) it goes crazy again, I tried both the expression you so kindly provided as well as this variation, which brings back the delay I need:

    dist=thisComp.layer(“months expressions”).effect(“space between months”)(“Slider”);
    timeDelay=thisComp.layer(“months expressions”).effect(“time delay”)(“Slider”);

    thisComp.layer(index+1).transform.position.valueAtTime(time-timeDelay)[0] + [dist,transform.position[1]];

    In both cases the uneven space after MAR is present.

    Best,
    David.

  • Kevin Camp

    January 10, 2014 at 9:47 pm

    i think the problem is that ‘mar’ is wider than the other months and you aren’t really creating equal spacing between the end of one month and the start of the next month, your creating equal spacing between the start of one month and the start of the next month.

    if you were to use your expression on a chain of solids that were all say 50px wide, then it would work as expected.

    you might try using a fixed width font, with all text layers using the same kern/tracking values.

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • David Cabestany

    January 14, 2014 at 9:12 pm

    Yeah, I guess it has to be that. I’ll try changing the width and tracking values, if that doesn’t work I’ll have to animate it manually.

    Thanks for your help.

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