FORUMS: list search recent posts

keeping cursor of type-on text in constant position on screen

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Tom Kemp
keeping cursor of type-on text in constant position on screen
on May 21, 2016 at 1:33:49 pm

Hi there - a client has asked me to produce a simple animation of a long piece of code typing itself on screen character by character - with the cursor of the typing maintaining roughly the same position throughout (like typing on a piece of software where the text shifts up as you type each line)

I had figured I would do this by animating the type-on and keying the position of the text box so the text is constantly scrolling upwards as the characters appear - however unfortunately due to the formatting of the code, with large gaps and indents, the characters are not typing at a constant rate - so it doesn't sync up with the animated position of the text box.

This method syncs up perfectly if I set the animation to type on line by line rather than character by character - but that's not my brief. Is there possibly a way of the characters outputting at a uniform rate - or some how connecting the text box position or a camera to the write-on animation data? I have to create over a minute of this animation and so a clean, automated way of doing it is the only option I think.

Many thanks!


Return to posts index

Graham Quince
Re: keeping cursor of type-on text in constant position on screen
on May 23, 2016 at 10:00:07 am

I've spent 30 minutes playing around with AE trying to get this effect for you and you're right: there's no easy way to do this.

One possible option - and it seems a bit of a long way round but...

You could pre-comp your text animation so that it animates down, then track the cursor so you can use it's Y value to animate the position of your pre-comp. That way the cursor can move left-to-right, but as it moves down, your pre-comp will move up. Your cursor will stay in the same position vertically.

http://www.YouTube.com/ShiveringCactus - Free FX for amateur films
http://shiveringcactus.wordpress.com/ - FX blog


Return to posts index

Kevin Camp
Re: keeping cursor of type-on text in constant position on screen
on May 23, 2016 at 10:09:44 pm

if you use use an expression to do the type-on effect, you can use sourceRecAtTime() function to animate the position or anchor point to make the layer move up the page as each new line starts to type on.

try this expression for the layer's source text property:

rate = 40; // in characters per second
value.substr(0,time*rate)


and then this for the anchor point:

rect = sourceRectAtTime();
y = rect.height;
value + [0,y]


the text should type on and move upwards with each new line.

if you need to add a cursor (like maybe a | ) to the end of the text as it types on, that can be done too.

Kevin Camp
Art Director
KCPQ, KZJO & KRCW


Return to posts index


Tom Kemp
Re: keeping cursor of type-on text in constant position on screen
on May 24, 2016 at 11:54:50 am

hey Kevin! thanks for your reply - I tried your method, the character writing expression works great, but when I try to add the anchor point expression I'm getting this error:

Error at line 1 in property 'Anchor Point' of layer 2 ('text') in comp 'Comp 2'.
Function sourceRecAtTime is undefined.

Any clues?

Tom


Return to posts index

Kalle Kannisto
Re: keeping cursor of type-on text in constant position on screen
on May 26, 2016 at 9:17:38 am

SourceRectAtTime() functionality was introduced in After Effects CC 2014.2.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]