Skip to main content
S_ A
Inspiring
July 15, 2024
Question

How to link opacity with trim path speed

  • July 15, 2024
  • 2 replies
  • 542 views

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 has been closed for replies.

2 replies

Dan Ebberts
Community Expert
Community Expert
July 15, 2024

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)

 

S_ A
S_ AAuthor
Inspiring
July 16, 2024

Thank you so much. I really appreciate this guidance.

Mylenium
Legend
July 15, 2024

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

S_ A
S_ AAuthor
Inspiring
July 16, 2024

Thank you for this guidance. I was lost.