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

Set an exact length for an animated line/path.

Explorer ,
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

879

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

Explorer , 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. 

 

Votes

Translate

Translate
LEGEND ,
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

Votes

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
Explorer ,
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. 

Votes

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 Expert ,
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.

Votes

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
Explorer ,
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.

Votes

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
Explorer ,
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. 

 

Votes

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
LEGEND ,
May 18, 2021 May 18, 2021

Copy link to clipboard

Copied

LATEST

Interesting trick! Thanks for sharing!

 

Mylenium

Votes

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