Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Accessing textIndex from the Position property

  • Accessing textIndex from the Position property

    Posted by Lloyd Alvarez on September 25, 2007 at 8:51 pm

    I am trying to write an expression that has a word form with each character coming from a random position. The expression selector seems to only allow me to randomize the amount of the position offset but all the characters get pushed in the same direction. What i want to do is randomize the position per character.

    Hope that makes sense and any help is appreciated since i very rarely work with text animators.

    -Lloyd

    Lloyd Alvarez replied 18 years, 7 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    September 25, 2007 at 11:25 pm

    Lloyd,

    Expression selectors are tricky little guys. Play around with this – add a position animator, set the position offset to [100,100], add an expression selector, delete the range selector, and add this expression to the expression selector’s amount property:

    seedRandom(textIndex,true);
    random([100,100]);

    Each character should end up an a random location within the 100×100 square defined by the character’s original position being the upper left corner. That should give you some ideas.

    Dan

  • Lloyd Alvarez

    September 26, 2007 at 12:26 pm

    Thanks for the reply Dan, but what that does (if i understand it correctly) is it offsets the characters [100,100] and the expression selector then randomizes how much each character gets offset but always in the direction of [100,100] so essentially all the characters drift in from the lower left in this case..

    What I wish (and I am off to file a feature request since it’s apparently not possible now) is to be able to access textIndex from Position so that I could write an expression that would be able to truly randomize the position of each character individually.

    -Lloyd

  • Dan Ebberts

    September 26, 2007 at 1:19 pm

    Lloyd,

    It looks like you understand the limitations. My example wasn’t the best though. If you change it to this:

    seedRandom(textIndex,true);
    random([-100,-100],[100,100]);

    you’ll see that you have access to a rectangle with the character’s original position in the center. I’ve actually constructed some pretty cool particle generators by adding another animator for tracking and using it to pile all the characters on top of each other which gives them all access to the same rectangular area.

    I’m not sure that any of this helps you (although I suspect you can accomplish what you’re trying to do). I just wanted to point out that there’s more to work with than what you see at first glance.

    Dan

  • Lloyd Alvarez

    September 26, 2007 at 2:26 pm

    Aha! Didn’t realize you could go into the negative… now that makes sense and yes, now i can do what i want.

    Thanks as usual!

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