Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions connect two 3d layers with another 3d layer

  • connect two 3d layers with another 3d layer

    Posted by Nick Couts on July 11, 2013 at 2:42 am

    So I’m not too savvy with scripts and have tried a few expression methods found in other threads here but they haven’t delivered the specific results i’m looking for… Basically I need to build a molecule type array, using 3d layers allowing for scale or squash with the rope or connecting layer between the end points. I’d like for all layers to be 3d so they can be affected by depth of field and the connecting rope layer will have some perspective to it. It would be ideal for the connecting rope to maintain a perpendicular orientation in the x-axis, so as camera moves up and down the rope appears to retain volume. Hope this makes sense. i’ve attached an example image to better illustrate how one strand could behave. It’s got me stumped so if anyone could help that’d be awesome! Thanks!

    object_connect_example.jpg

    Nick Couts replied 13 years, 1 month ago 4 Members · 7 Replies
  • 7 Replies
  • Todd Kopriva

    July 11, 2013 at 4:35 am

    See this script:
    https://motionboutique.com/connect-layers-1388/

    ———————————————————————————————————
    Todd Kopriva, Adobe Systems Incorporated
    After Effects quality engineering
    After Effects team blog
    ———————————————————————————————————

  • Nick Couts

    July 11, 2013 at 5:30 am

    Thanks Todd! Connect plugin is awesome, might end up resorting to it. Only drawback is it seems to only utilize shape layers to draw the connections. I’d like to be able to use a 3d layer between the endpoints that way i have the flexibility to control exactly what the connector layer is.. for example the connection layer between points could be a pre-comp that i can easily swap out a rope image, chain link image, animated pulsing line, and so on.. I can get close to the effect just using puppet tool pins at both ends of the connection layer that are parented to the end points, it has a nice linear squash and stretch effect, but its not in 3d space thus unaffected by DOF and foreshortened perspective. it’s got me puzzled..

    LOVEcinema.tv

  • Jason Jantzen

    July 11, 2013 at 7:08 pm

    I was thinking if you could maybe somehow link the width of the scale to your image and then parent the whole image to the shape layer that ConnectLayers creates, then the image would move with the shape layer and if the scale matches the positions of Point A and Point B it might just work, but it’s too much math for me. I tried fiddling around with it and was only able to link an image to the shape layer and match the move in 3d space. Need to figure out a way to keep the perceived length as well.

    Jason Jantzen
    vimeo.com/jasonj

  • Nick Couts

    July 11, 2013 at 8:57 pm

    Thanks Jason! Yea i think thats were the trouble lies.. getting the distance between two points to drive the X-scale of the connector layer.. i attached a project file, its close but the x-scaling is just not matching properly. Only other issue that may occur is orienting the x rotation to always aim at the camera so the connected layers don’t reveal that they are just flat planes..

    6256_layerconnecttest.aep.zip

    LOVEcinema.tv

  • Jason Jantzen

    July 11, 2013 at 9:01 pm

    Sounds like a challenge for Mr. Ebberts!

    Jason Jantzen
    vimeo.com/jasonj

  • Dan Ebberts

    July 12, 2013 at 1:50 am

    I think your scale width calculation ends up looking like this:

    L1 = thisComp.layer(“end 1”);
    L2 = thisComp.layer(“end 2”);
    p1 = L1.toWorld(L1.anchorPoint);
    p2 = L2.toWorld(L2.anchorPoint);
    s = (length(p1,p2)/width)*100;
    [s,value[1],value[2]]

    Dan

  • Nick Couts

    July 12, 2013 at 2:28 am

    Plugged it in, Works perfect! Thanks Dan!

    LOVEcinema.tv

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