Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Animating position for a text cursor

  • Animating position for a text cursor

    Posted by Perry Kroll on March 25, 2013 at 5:41 pm

    Hi guys – somewhat cross-posting here from my thread in the main AE section: link

    But I have a specific question for you expression geniuses.

    Is there a way to get the coordinates of the last visible text character in a text layer? I guess the ideal solution would be the coordinates of the right-side boundary of the last character written.

    I am trying to build a toolkit to animate graphical cursors of various types as text is written out on screen, and I can easily make the cursors blink exactly the way I want with fades, etc using expressions.

    Where I am stuck is in moving a cursor layer to the spot it should be at relative to a text layer that is being animated on one character at a time.

    Dan Ebberts replied 13 years, 1 month ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    March 25, 2013 at 6:54 pm

    With expressions, you’re pretty much limited to the sampleImage() hack (there have been numerous posts about that method in this forum). It can really impact performance.

    It would also be possible to write a script that would process the text animation after you were done animating, and position the curson appropriately, but it wouldn’t be live (that is, if you needed to adjust the animation, you’d have to delete the cursor keyframes and re-run the script).

    Dan

  • Perry Kroll

    March 25, 2013 at 7:21 pm

    Thanks!

    I wonder if I could use Text Anarchy to put a distinctly colored (but not otherwise correct) cursor on the screen in the right place, and then use the sampleImage() technique to find that cursor based on color and position my own cursor there… That might be a faster process.

    I also wonder how easy it would be to write a plugin that could be applied to a null layer, and would let the user define the text layer to watch, and then the plugin would just move the null layer (through an expression on said layer?) to the right place, as a live process. Do plugin effects have access to that kind of info? If so, I could try appealing to the folks who code for aescripts and the like and see if anyone wants to throw this together. I feel like there’d be a lot of demand of a simple cursor animation plugin.

  • Dan Ebberts

    March 25, 2013 at 7:34 pm

    Making sampleImage() as efficient as possible means optimizing the search area. In general, to find the right edge of the text, you would start looking at the right edge of the comp and move left until you find non-zero alpha. I can’t see that a colored cursor would help speed things up.

    The learning curve for AE plugins is quite steep, but someone familiar with the SDK might be able to knock one out fairly quickly.

    Dan

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