FORUMS: list search recent posts

sourceRectAtTime : how to make a transition between different text sizes ?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Sebastien Bruzzo
sourceRectAtTime : how to make a transition between different text sizes ?
on Aug 18, 2017 at 10:20:54 am

Hello again, second question in a row :

I'm using the very useful sourceRectAtTime to link a rectangle shape layer to the size of a text layer, BUT... I need to change the same rectangle box according to different text layers that will slide inside this rectangle box, and this has to be an animated transition (let's say 10 frames).

Thank you for your help !


Return to posts index

Sebastien Bruzzo
Re: sourceRectAtTime : how to make a transition between different text sizes ?
on Aug 20, 2017 at 6:59:55 pm

Anyone could give me a clue about this problem please ?

I can answer any question if my explanation was not clear ☺

Thanks !


Return to posts index

Andrei Popa
Re: sourceRectAtTime : how to make a transition between different text sizes ?
on Aug 21, 2017 at 8:04:55 am

Well. Baby steps. So you have a rectangle on a text layer. Then another text layer comes in and you want it to take the size of the new text? If so, you should use an ease function. Something like this

dur = 0.33; //about ten frames, assuming that you are working on a 30 fps project
easeStart = thisComp.layer("secondTextLayer").inPoint;
easeEnd = easeStart + dur;
startValue = [thisComp.layer("firstTextLayer").sourceRectAtTime(time,false).width,thisComp.layer("firstTextLayer").sourceRectAtTime(time,false).height]
endValue = [thisComp.layer("secondTextLayer").sourceRectAtTime(time,false).width,thisComp.layer("secondTextLayer").sourceRectAtTime(time,false).height]
if (time< easeStart) startValue else ease(time,easeStart,easeEnd,startValue,endValue);

this is for 2 layers. If you have many, i would suggest arranging them one after another and using the index in a for loop. If you do have many layers and can't figure this out, tell me and i will try to find a solution.

Andrei


Return to posts index

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