• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Text tracking with a sine shape

Community Beginner ,
Sep 21, 2024 Sep 21, 2024

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

TOPICS
Expressions , How to

Views

173

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Sep 22, 2024 Sep 22, 2024

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);

 

Votes

Translate

Translate
Community Expert ,
Sep 21, 2024 Sep 21, 2024

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.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 22, 2024 Sep 22, 2024

Copy link to clipboard

Copied

Thank you Dan, but it doesn’t seem to work:

 

Error: ReferenceError: textTotal is not defined

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 22, 2024 Sep 22, 2024

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 22, 2024 Sep 22, 2024

Copy link to clipboard

Copied

That’s perfects, thanks again!

Is there a way to animate the strenght of the curve (which corresponds to the difference of spacing between the letters at the ends and the central ones) while mantaining the same width of the paragraph? Like on the image attached to the first post.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 22, 2024 Sep 22, 2024

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);

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 22, 2024 Sep 22, 2024

Copy link to clipboard

Copied

LATEST

Great! That’s exactly what I was looking for.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines