ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Maximum number of points in a path

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Nicolas Guionnet
Maximum number of points in a path
on May 12, 2020 at 9:07:04 am

Hi,
To create and animate a mathematical curve, I use an expression. It works well, but I need a fairly high number of points to make the path look smooth.
The curve is interrupted when I add more than 1200 points approximately. It is not so much if you need to build something complicated.

Here is the code I use to test this :


myPoints = [] ;
lambda = 1 + time/5;
pi = Math.PI;
pas = 1;
init = -720;
fin = 720;
for (x = init; x <= fin; x = x + pas) {
xPoint = 200*pi*(x)/360 ;
yPoint = 200*Math.cos(pi*x/180*lambda);
nouveauPoint = [xPoint,yPoint];
myPoints.push( nouveauPoint ) ;
}
createPath(points = myPoints, inTangents = [], outTangents = [], is_closed = false);


I know I can smooth it and use less point using tangents but even so, I am surprised the limit is so low ( when I am used to build meshes in Blender with millions of vertices ... ).

I am wrong ( as often ... :o) ) ?
Thanks !


Return to posts index

Andrei Popa
Re: Maximum number of points in a path
on May 12, 2020 at 10:35:56 am

I tried your expression and didn't notice any interruption. What do you mean? The line is missing at some point?

If you are talking about the broken lines that appear at the edge of the curves, that is not interruption, it's just Line Join property of the stroke. Go to the stroke under your path, collapse options and change "Line Join" to "Round Join"

Andrei
My Envato portfolio.


Return to posts index

Nicolas Guionnet
Re: Maximum number of points in a path
on May 12, 2020 at 1:03:24 pm

Hi Andrei,
Thank you for your answer !

Well, I know it is interrupted for a part of the curve is missing. To see why, you can modify the "pas" variable :
Try pas = 0.1 ; instead of pas = 1 ;

The points will be closer from each other ... so to achieve the same journey, more will be needed. But the curve gets shorter ... 10 times sorter, which means that the number of points reached a maximum limitation.


Return to posts index


Andrei Popa
Re: Maximum number of points in a path
on May 12, 2020 at 7:23:39 pm

Hey. I replaced pas with 0.1. Same result, but a lot heavier on rendering.
I use after effects 2020, 64 gigs of ram and Ryzen 7 3700x.
The layer is selected so you can see that it goes out of screen.



Andrei
My Envato portfolio.


Return to posts index

Nicolas Guionnet
Re: Maximum number of points in a path
on May 12, 2020 at 10:39:27 pm

... oh ! ... so it may be a question of raw power ( I have 32 Go and a 1060 ... ).

But the total absence of error message worries me ...
Settings could play a role ... I will check tomorrow.
Thank you Andrei


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]