Highlighted

How do I maintain the offset in trim paths when the size changes

New Here ,
Aug 17, 2020

Copy link to clipboard

Copied

I have created a trim paths animation & I have a specific offset. This offset changes when I change the size of rectangle / any shape. Is there any expression to maintain the offset?

Thanks!

Most Valuable Participant
Correct answer by Mylenium | Most Valuable Participant

Not really. You would have to re-create the entire Bezièr formula as expression code more or less. AE doesn't provide access to parameters liek relative and absolute path lengths and one would have to do the calculations. For a simple rectangle it would be easy - 2*a + 2*b with a and b being the side lengths. Similarly you could accomodate rounded corners by including the 2*r*Pi, but that#s pretty much where it ends. Any more complex shape will require additional calculations with growing complexity. Some of the burden could likely be taken off your shoulders by buying scripts like Trails from AEScripts, though, that set up expressions for these calculations.

 

Mylenium

TOPICS
Expressions, How to

Views

25

Likes

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

How do I maintain the offset in trim paths when the size changes

New Here ,
Aug 17, 2020

Copy link to clipboard

Copied

I have created a trim paths animation & I have a specific offset. This offset changes when I change the size of rectangle / any shape. Is there any expression to maintain the offset?

Thanks!

Most Valuable Participant
Correct answer by Mylenium | Most Valuable Participant

Not really. You would have to re-create the entire Bezièr formula as expression code more or less. AE doesn't provide access to parameters liek relative and absolute path lengths and one would have to do the calculations. For a simple rectangle it would be easy - 2*a + 2*b with a and b being the side lengths. Similarly you could accomodate rounded corners by including the 2*r*Pi, but that#s pretty much where it ends. Any more complex shape will require additional calculations with growing complexity. Some of the burden could likely be taken off your shoulders by buying scripts like Trails from AEScripts, though, that set up expressions for these calculations.

 

Mylenium

TOPICS
Expressions, How to

Views

26

Likes

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
Aug 17, 2020 0
Most Valuable Participant ,
Aug 17, 2020

Copy link to clipboard

Copied

Not really. You would have to re-create the entire Bezièr formula as expression code more or less. AE doesn't provide access to parameters liek relative and absolute path lengths and one would have to do the calculations. For a simple rectangle it would be easy - 2*a + 2*b with a and b being the side lengths. Similarly you could accomodate rounded corners by including the 2*r*Pi, but that#s pretty much where it ends. Any more complex shape will require additional calculations with growing complexity. Some of the burden could likely be taken off your shoulders by buying scripts like Trails from AEScripts, though, that set up expressions for these calculations.

 

Mylenium

Likes

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
Reply
Loading...
Aug 17, 2020 0