Skip to main content
S_ A
Inspiring
Jul 15, 2024 4:37 PM UTC
Question

How to link opacity with trim path speed

Hi,

 

I am experimenting expressions. so I have done bar animation  with digits.  Suddenly I feel like why not making the digits start animating from invisible to visible.  I mean when the bar animation will start the digits will come into existance. then I link the opacity of the digits with trim path 'end'. But the opacity is not producing what I imagined. Then I realized opacity is taking trim path's movement exactly on same increment. I mean when trim path end value is 10 the digit's last opacity percentage will mimic that. because both range from 0-100.

then I multiply the opacity expression  *10.  beacuse I knwo I can apply basic math on expression.

 

Am I  thinking right? or totally miscalculate it?    or there is some other way I can pull what i imagined. Please guide me. I want the opacity of digits to start from 0 - 100 as the trim bar progresses, both (opacity speed and trim path's speed need to be same).

 

This topic is closed to new replies. Start a new post to keep the conversation going.

4 replies

Dan Ebberts
Community Expert
Community Expert
Jul 15, 2024 7:05 PM UTC

I think I'd try something like this for Source Text:

thisComp.layer("42").content("Trim Paths 1").end.key(2).value

and this for Opacity:

val = thisComp.layer("42").content("Trim Paths 1").end;
linear(val,0,val.key(2).value,0,100)

 

Translate
S_ A
S_ AAuthor
Inspiring
Jul 16, 2024 1:21 PM UTC

Thank you so much. I really appreciate this guidance.

Translate
Mylenium
Legend
Jul 15, 2024 5:01 PM UTC

As usual, filter it through a linear() expression. E.g. for your last 10% bar this might be:

 

linear(TrimPathHere,0,10,0,100);

 

Just adjust the first reference to the correct slider/ trim path function.

 

Mylenium

Translate
S_ A
S_ AAuthor
Inspiring
Jul 16, 2024 1:23 PM UTC

Thank you for this guidance. I was lost.

Translate