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

How to write expression in such case-3

Enthusiast ,
Dec 05, 2023 Dec 05, 2023

Hello,

I was animating a bar using mask and suddenly I think if I can link a digit's  increasement  with the mask's  path.

like I did with trim path 'end', I linked source text with trim path 'end' and then the  animate the digit .

but now,  I want the digit to be '0' when the mask's upper point two vertex points is same as the bottom vertex points, and then as the mask grows the digit will increase along with it.

 

is it possible in after effects. or am imagining too much?  😰

 

nnnnn.gif

TOPICS
Expressions
235
Translate
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 , Dec 05, 2023 Dec 05, 2023

That is much easier to do with a shape layer using a single Stroke and Trim Paths than it is to do with a mask. 

 

If you must use a mask, select the Mask Path, then open and use Window/Create Nulls From Paths. Points follow nulls. This will give you four nulls that will control the path. Then, you need to parent the top right null to the top left one and animate the top left null position to adjust the mask's size. Animate the top left null's position to expand the mask, then set up a linear fu

...
Translate
Community Expert ,
Dec 05, 2023 Dec 05, 2023

That is much easier to do with a shape layer using a single Stroke and Trim Paths than it is to do with a mask. 

 

If you must use a mask, select the Mask Path, then open and use Window/Create Nulls From Paths. Points follow nulls. This will give you four nulls that will control the path. Then, you need to parent the top right null to the top left one and animate the top left null position to adjust the mask's size. Animate the top left null's position to expand the mask, then set up a linear function that takes the top left null's starting and ending positions and converts them into percentages.

 

Something like this:

 

t = thisComp.layer("Bar: Mask 1 [1.0]").transform.position[1];
tMin = 900;//Starting Y position 
tMax = 100;//Ending Y position
v = linear(t, tMin, tMax, 100, 0);
v.toFixed() + "%";

 

RickGerard_1-1701807301860.gif

It is a lot easier to do with a shape layer.

Translate
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
Enthusiast ,
Dec 05, 2023 Dec 05, 2023
LATEST
Unbelievable!!  😮 this  is soo cool!
 
Thank you soooooooooooooooo much.
Translate
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