Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Set an exact length for an animated line/path.

Community Beginner ,
May 18, 2021 May 18, 2021

Copy link to clipboard

Copied

Does anyone know of a way to limit the length of an animated line to a specific value (eg. 300px)?

 

The line/path has three points/handles (start, middle and end).

 

I'm wondering if there is an expression that could do this while allowing me to still animate with the handles.

 

Thanks. 

TOPICS
Expressions, How to

Views

185

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
community guidelines

correct answers 1 Correct answer

Community Beginner , May 18, 2021 May 18, 2021
A solution from our friends over on Reddit;Convert the line to a dashed line. Increase the dash/gap size until it looks line a single line again. Adjust the offset (if necessary). Aimate the path and the line wont resize. 

Likes

Translate

Translate
Adobe Community Professional ,
May 18, 2021 May 18, 2021

Copy link to clipboard

Copied

Is it possible? Yes. Is it easy? Not by any stretch of the imagination. You would have to essentially re-create the entire Bèzier formula in expression code and calculate its inverse to constrain the length and have loops running upon loops to continually check and recalculate the values. Performance would be far from great. It's basically that old gag why spline deformers in 3D programs also drastically slow down when set to retain fixed lengths vs. their normal modes. Performance can really go down the drain so whatever you have in mind will liekly require a different approach.

 

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
community guidelines
Community Beginner ,
May 18, 2021 May 18, 2021

Copy link to clipboard

Copied

Ah, ok thanks. That sounds far to complex for this situation.

I was expecting there to be something simple like 'length = x'. 

I'll find another approach. Thanks for the reply. 

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
community guidelines
Adobe Community Professional ,
May 18, 2021 May 18, 2021

Copy link to clipboard

Copied

There's a very handy script called "Create Nulls from Paths"  You can find it at the bottom of the Window menu.

 

Draw a mask on a solid to have 3 points.  Then in the timeline, select the path.  Go to Window > Create Paths from Nulls and choose the Points follow Nulls option in the pop-up.  This will create 3 null objects, which you can control the position of in the usual way.

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
community guidelines
Community Beginner ,
May 18, 2021 May 18, 2021

Copy link to clipboard

Copied

I was actually planning to use the 'Nulls follow points' to attach things to my line once I had finished animating it.

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
community guidelines
Community Beginner ,
May 18, 2021 May 18, 2021

Copy link to clipboard

Copied

A solution from our friends over on Reddit;

Convert the line to a dashed line. Increase the dash/gap size until it looks line a single line again. Adjust the offset (if necessary). Aimate the path and the line wont resize. 

 

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
community guidelines
Adobe Community Professional ,
May 18, 2021 May 18, 2021

Copy link to clipboard

Copied

LATEST

Interesting trick! Thanks for sharing!

 

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
community guidelines