Copy link to clipboard
Copied
Hi,
I’m looking for an expression that, applied to a text layer with a high tracking value (250 for example), will adjust che space between each couple of letters with a sinusoidal shape, with a zero value on left and right and the maximun value at the center. The width of the text box should be retained. It also would be nice to have a parameter to animate the “strength” like in the attached image, that is a simulation of the result I’m looking for.
Thanks in advance
You could try adding a slider, and adjust it between 0 and 100, and change the expression to this:
s = effect("Slider Control")("Slider");
tt = Math.max(textTotal-1,1);
a = (textIndex-1)/tt;
v2 = 100*Math.sin(Math.PI*a);
v1 = 63.7;
linear(s,0,100,v1,v2);
Copy link to clipboard
Copied
I'd start by adding a Tracking Animator, adding an Expression Selector, deleting the Range Selector and using an expression like this for the Expression Selector's Amount property:
tt = Math.max(textTotal-1,1);
a = (textIndex-1)/tt;
100*Math.sin(Math.PI*a)
Then adjust the Animator's Tracking Amount.
Copy link to clipboard
Copied
Thank you Dan, but it doesn’t seem to work:
Error: ReferenceError: textTotal is not defined
Copy link to clipboard
Copied
The expression has to go in the Amount property of the Expression Selector. Anywhere else and you will get that error message.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
You could try adding a slider, and adjust it between 0 and 100, and change the expression to this:
s = effect("Slider Control")("Slider");
tt = Math.max(textTotal-1,1);
a = (textIndex-1)/tt;
v2 = 100*Math.sin(Math.PI*a);
v1 = 63.7;
linear(s,0,100,v1,v2);
Copy link to clipboard
Copied