Connect Layers

This script connects the selected layers with segments or triangles created with shape layers.

It was originally created to visualize Newton2 joints but as you will see, it can do much more.

Rope

Creates a single shape layer with a path connecting the selected layers (2D only). Use AutoBezier or Tension options to get rounded joint style.

cl_rope

Spanning Tree

Computes minimum spanning tree and draws each edge with a shape layer (2D and 3D support).
cl_spanning tree

Triangulation

Triangulates the selected layers and draws each edge with a shape layer (2D and 3D support). If you want filled triangles (not just the edges), activate the Fill Triangles switch in the Options dialog. By default they will be filled with the same color, but you can also choose a source layer to colorize them.
cl_delaunay tricl_filled tri
 Note that for functions that create shape keyframes (Triangulation with Filled Triangles turned on, and Rope), keyframing is done within the comp work area.

Quick start guide

USAGE

Compatibility: For AE CS6 or later

Current version:
1.08 – Initial release – May 2013

DOWNLOAD

You can grab a copy of CONNECT LAYERS on aescripts

Note: Everything in the promo video has been done in After Effects CS6.

MORE TOOL

117 thoughts on “Connect Layers”

  1. hello …. How r u? Pardon me plz…I don’t understand english very well… (but or) and I used your Plugin … It’s so beautyfull …my question is : newton 2 at yet can do this test that you put in here?

    1. The rope example (ball against the wall) was done with Newton 2 (distance joints) and the Connect Layers script if I understood the question

      1. I know:) I have been playing with it since yesterday:)
        Is great!
        One quick question, is there a way for closing rope?
        To make a bouncy ball:) I have a project file, I can send it for better understanding.

  2. Hi I’m getting this when attempting to fill triangles when using Triangulation:

    Error: After Effects error: Can not add a property with name “ADBE Point3D Control” to this PropertyGroup.

    I’m on AE CS5 without Newton. Cheers.

      1. Ah okay cheers. To anyone reading this, the Rope, Tree and Triangulation modes work for the most part in CS5. Rope can be used without Newton, which can give you a closed loop version of Tree. The only issue being that it needs to generate keyframes, and they aren’t live connections like the Tree mode. Could be useful though…

  3. Thks soooooo much! Just in time for my new project!
    This script + newton is an amazing powerful tool, many, many possibilities.

  4. Great script! Just curious about the 3D scenes in the video example. Where are they done? Cinema 4D? Or is everything done in AE? Thanks

      1. I don’t know if we are talking about the same video!! I’am refering to the initial teaser, not the video tutorial! The teaser seems something done in 3D space. The text and the ropes seem to have depth. If that’s all done in AE it looks amazing!

  5. seems like a great script although the quick start guide includes a prebuilt scene built, any recommendations for a scene to use the script on?…. just curiose on the right way to use the script…

  6. WOW this looks so amazing!!! Is there a (from scratch) tutorial how to make that awesome rope effect with the letters? Can I do it even if I never worked with Newton before? greetings!! 🙂

      1. Hi, thanks for the answer…unfortunately the quick start guide has already the finished newton animation and also does not show how the “ball” in newton can be replaced with the letter.

        1. The video explain how to this with a ball. You just have to use a letter instead of the circle! The video show how to set up the scene, for the letters it’s pretty much the same, you just have to do this with more objects.

  7. hello, get this message error,unable to execute script at line 115. uncaught exception image?? any guess?

  8. Pingback: com | Pearltrees
  9. Hello, when I run the script file I can´t select ConnectLayers_1.08.jsxbin. i´m working with After Effects CS6, any guess??

  10. Just a question..I have to build a network of circles and lines, the plugin is perfect, but is it possible after having connected the layer to select again a couple of shape layers and call the script again to create a missing connection? When I try to do this I have an error (layers aligned?)
    thanks

  11. I installed version 1.08, got it to work with CS6 a few weeks ago. When I tried to access the script today, it is grayed out (unavailable). Any idea what’s wrong?

  12. Is there a way to send the lines (triangle) behind the layers they connect so that I don’t see them over my layers but just behind? thx

  13. I want to ask a question about 3D dots composition. I downloaded the project, I see that there are an amount layer and rotation layer. It didn’t work when I tried to do. Sorry but can you please tell me how to do that amount thing? My layers are 3d swell but the shapes and lines are not syncronized. Thanks!

  14. Trying to create a rope entirely in AE without the full Newton suite (unfortunately!) I see how you can create it in your tutorial using newton, but can you get a similar functionality within AE? If so, I’m awful at finding it/ working it out!

  15. Unable to download any of your free scripts currently, getting 404 errors on them using two different browsers.

  16. Hey, i’m running the script with cc. my problem is, its creating the joint layers – but just not showing any connecting lines. i don’t get it.. 🙁 moreover – when i click triangulation i get following message: “Error occured when triangulating selected layers (aligned layers?).”

    looking forward to your solutions! thanks guys!

  17. hey..

    i don’t get it working in cc and cs6. :-/ running the
    script – showing joint layers – but no lines. when i click Triangulation
    i get following message:

    “error occured when triangulating selected layers (aligned layers?)”.

    looking forward for your help.
    thank you guys!

      1. I have the same issue – connecting a dot in centre with 3 orbiting dots. When i apply the 3rd connect layers to the third dot it has no line thickness. I have manually adjusted the orbiting dots to have different anchor points by .5 pixels and there are 3 instances of the central dot now all with different anchor points. Still not working – am i misunderstanding sorry??

  18. Rope seems to be working for me, but clicking tree and triangulation while a couple layers are selected does nothing. It used to work, but now it does not. Any tips?

  19. How can i influence which line is drawn to which object in the triangulation calculation? Seems quite random? Does it have something to do with layer order? Layer number / name?

    1. Found a solution in selecting smaller numbers of layers and making multiple triangulations and then deleting the unwanted shape layers. Thanks!

  20. UPDATE 2: I offset the positions of my layers from each other and I’m still getting inconsistent results. What am I doing wrong?

    UPDATE 1: Nevermind (I think). The answer is in the error; I used Gridder from aescripts to arrange my layers so they are all aligned so I’m guessing triangulate doesn’t work with aligned or evenly distributed layers.

    Hello, I’m trying to triangulate 30 or more 3D layers (they are solids right now as a placeholders, but will eventually be jpgs) but only a about a third of the layers are actually being triangulated. When I try to triangulate the layers that weren’t done the first time I get the error “Error occurred when triangulating selected layers (aligned layers?).” I saw an older comment where you responded that “you must be using shape layers with the exact same anchor point position or something similar…” I’m not using shape layers but instead solids and I want to use image layers. The layers that did get triangulated have differing anchor points so I’m confused by your answer.

    Is there a limit to the number of layers or types of layers you can triangulate? Thank you.

  21. Great script, however I’m experiencing a problem. It worked the first time i used it, but now in when i try to connect for instance 3 shape layers with “tree”, the joint shape layers appear, but no lines (also when i increase stroke width). Also the “rope” button creates a layer but makes nothing visible. All shape layers have the same anchor point. What could be a solution? I already deleted script, rebooted, re installed script: no luck. Tried in both CC and CC 2014. Help would be greatly appreciated!

  22. Great script, however I’m experiencing a problem. It worked the first time i used it, but now in when i try to connect for instance 3 shape layers with “tree”, the joint shape layers appear, but no lines (also when i increase stroke width). Also the “rope” button creates a layer but makes nothing visible. All shape layers have the same anchor point. What could be a solution? I already deleted script, rebooted, re installed script: no luck. Tried in both CC and CC 2014. Help would be greatly appreciated!

  23. I cant get to send the lines behind both shapes, it´s not a matter of the order which I organize them in my timeline. I am trying with 3d of course and If I send the shapes to the front in the z axis then it works.

  24. I’ve been using connect layers for a lot of network diagrams. Usually, the client wants to see the diagram ‘draw on’. Is there a way to quickly draw on all the joints seperately or simulateously without going in and adding and editing a Trim Paths to each separate Joint??
    I’ve tried copying all the joints to one shape layer and using one trim Paths to edit, but that doesn’t work.

  25. Hi there, Just wandering if thre’s a way to keep the triangulation live. I need to animate myself the triangles, using the original nulls

  26. Hello MB,
    is there any way to trim the paths simultaneuosly for all my joints for the spanning tree option and how to control the opacity for all the triangulation paths? I have many paths and I don’t want to do it manually for each path. Let’s say for example i want to sweep the layers from left to right.
    Thanks in advance.

      1. Thanks for your reply.
        Unfortunately also this script (transhape) doesn’t have the trim path option.

        That’s a really pain.
        Well, thank you anyway MB

  27. I have the same issue with connecting a dot in centre with 3 orbiting dots. When i apply the 3rd connect layers to the third dot and the centre dot it has no line thickness (when its set to 10 as are the others). I have manually adjusted the orbiting dots to have different anchor points by .5 pixels and there are 3 instances of the central dot now all with different anchor points. Still not working – am i misunderstanding sorry??

  28. Can anyone help me with this please? The 3 circles are the same precomp the first works showing 10pt stroke the second (bottom one) has no thickness then when i apply the 3rd it works fine? Ive seen the comments on anchor point position not being the same but I can’t decipher how to fix this issue. Thanks, John

  29. I have problem connecting 3d shape layers with 3d null objects? I can’t pinpoint what is causing this. Any clue?

  30. Hey guys,
    Im getting this error UNTERMINATED STRING CONSTANT:
    ERROR OCURRED AT LINE 2
    COMP: ///
    LAYER: ///
    PROPERTY: SIZE.
    Any idea what may be happening? im trying to join some shape layers that are circles, reprensenting stars. The comp is big like 3318 x 2280 and the layers are pretty small but not too small. Is there any way to fix this ?

    Thanks in advance,

Comments are closed.