Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Problem with long createPath in AE 15

  • Problem with long createPath in AE 15

    Posted by Juan Irache on September 26, 2019 at 12:14 am

    Hi guys,

    I’m usually working on AE 16, but my current project should be usable for people running 15. After some tweaking of the syntax I got all my expressions working, but some of my paths look incomplete. I found out createPath seems to be limited to 1000 points in AE 15 (in 16 it draws at least 9000 without a problem). An easy way to replicate the problem is to create a shape and set this as its path:

    path = [];
    for (i=0; i<2000; i++) {
    path.push([random()*100,random()*200]);
    }
    createPath(path,[],[],false);

    And then visualise the poth length in the Source Text of a text layer:

    thisComp.layer("Path").content("Shape 1").content("Path 1").path.points(0).length

    AE 15 outputs 1000 as the array length, instead of 2000. Is this a known issue? I could create multiple paths, but this responds to user input, so I never know how long the input will be.

    Mark Carlson replied 1 year, 9 months ago 3 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    September 26, 2019 at 1:25 am

    I wasn’t aware of the limitation, but it appears that you are correct.

    Dan

  • Juan Irache

    September 26, 2019 at 3:34 am

    This is the solution I came up with, in case anyone else bumps into this.

    I added a “Max Path Complexity” slider to my control layer. It’s set to 1000 by default. AE 15 users are asked not to increase the value. Lowering it also allows for much faster renders.

    The code goes something like this:

    mPoints = [];
    complexity = +thisComp.layer("Control").effect("Max Path Complexity")(1);
    //dataSource is a data array taken from somewhere else
    increments = Math.ceil(dataSource.length / complexity);

    for (i=0; i

  • Mark Carlson

    July 31, 2024 at 3:41 pm

    Yeah it can be a real headache, I tried LongPath Tool Program which helped a lot.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy