This content has been marked as final. Show 6 replies
See this thread for how to create grid of rectangular layers:
Apply the expression to one instance of the text layer, then simply duplicate it to fil lthe comp.
Varying the timing of an animation can be done with the .valueAtTime() and random() functions, but without more detailed knowledge on the exact project setup, it's a bit like the blind leading the blind. You could apply such code to the text animators directly, but if you use multiple of them, pre-composing and using time-remapping might be easier.
thats really great code. is there a way to detect the edge of a text element? the text has a couple of animations on it and one is tracking. it would be nice if i could tell it to compensate for the tracking as well as scale on each element.
I was thinking that the first bit where you state the column space would be an ideal place to link it to the elements tracking and scale.
Is there a way to measure the object in an expression?
I am starting to toy with the code you gave me, but i have little experience with expressions. thanks for the help. :)
No, text layers cannot be "measured" exactly. There is an undocumented function called sourceRectAtTime(), however, that might do some good. You'd sample the dimensions for each maximum expansion in either direction and then interpolate the values across time. Example:
t1=0.5; //time in seconds
t2=3; //time in seconds
You can then enter the result of mBlend in place of the fixed dimensions. Be aware, though, that this may produce odd results and break up the grid, especailly with random timing. You'd als have to find a more elegant way of feeding times to the interpolation, preferably based on the keyframing of a master layer or markers, e.g.
and so on. If you have a lot of keys/ markers, you will have to further automate by doing all this in loops. I recomment Dan's site motionscript.com for reference. He has multiple examples that explain the use of markers for semi-automated animation, which should give you some ideas.
unfortunately i am working in Production Studio CS2. the sourceRectAtTime() give me an error.
from what i have read around the net about it, it is a CS3 function, brand new in fact.
> There is an undocumented function called sourceRectAtTime()...
The word 'undocumented' is one of my triggers. ;-)
The sourceRectAtTime method doesn't work for expressions, which is why it's not documented in the expressions material. It does work for scripts.
If you don't mind an expression being slow, here's a link to a hack that uses the sampleImage expression method to measure a text layer:
Yes Todd, you are of course right. It's CS3 and scripts-specific. Sorry for the confusion. Maybe it's already some sort of delirium of joy from finally getting my Mac tomorrow... But then again, I've been known to write nonsense even without that. *giggle*
Alan, if you you're on AE7, I still recommend scouring AEnhancers.com, even though the link Todd provided won't do you any good, either (sampleImage is CS3-only as well). AE's inability to deal with text layers more elegantly has been an ongoing source of "inspiration" and one way is to auto-create a mask for the text bounding box via scripts and use these values to generate keyframes. This will work in older versions like your AE7. Just do a search along the lines of "create border around text", if I recall correctly.