Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects drawing a line in 3d space?

  • drawing a line in 3d space?

    Posted by Ben Weller on October 31, 2008 at 11:29 pm

    hi there. ive built a 3d set, and in it ive got telephone pylons.
    what i want to do for the cables between them, is draw a line, basically. is there a way to do this in 3d space?
    maybe in a way similar to photoshop where you can make a path, then just trace the path with a brush.

    cheers,
    Ben.

    Rusty Shackleford replied 15 years, 2 months ago 8 Members · 16 Replies
  • 16 Replies
  • Kevin Camp

    November 1, 2008 at 12:33 am

    kind of… you can’t make a path with points in 3d… the points will have 2d coordinates on the layer, but the layer can be rotated and positioned in 3d space… let me know if you didn’t get that.

    so you can create a path with the pen tool, and use the handle to create a curved line. then you can use the stroke effect to draw a line along the path. again, it will be a flat layer that can be turned in 3d space to stretch from one pylon to the other.

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Ben Weller

    November 1, 2008 at 12:39 am

    cool sounds good to me. i was just hoping to be able to do it 3d space to save me having to fiddle about with lining it all up.
    cheers!

  • Roland R. kahlenberg

    November 1, 2008 at 4:05 am

    If the layers that you want to connect the lines to are 3D Layers, then you can use the following Expressions, courtesy of Dan Ebberts.

    You’ll need to apply the Beam plugin to a 2D layer and ideally use two Nulls that you’ll use to control the Start and End properties for the Beam.

    The script is such –
    ———-
    a=thisComp.layer(“endnull”);
    a.toComp(a.anchorPoint)
    ———-
    a=thisComp.layer(“startnull”);
    a.toComp(a.anchorPoint)
    ———-

    Again, paste the two scripts into a 2D layer, onto the Start and End properties of the Beam effect.

    HTH
    RoRK

    broadcastGEMs.com – the leader in customizable royalty-free animated backdrops

  • Ben Weller

    November 1, 2008 at 11:05 am

    hi roland,
    erm, im not exactly new to AE but ive never come across these expresions before until i found this site. people keep saying paste them into a layer. how do you do this? is there a section on this site that can explain expressions for beginners?
    thanks,
    ben.

  • Rhett Robinson

    November 1, 2008 at 3:14 pm

    Hi Ben,
    There is a place here, and the AE Help file can get you started without putting the hurt on you too… I am no expression expert, but I make a lot of use of the pickwhip and the expression control effects, as well as modifying other’s scripts… I think you’ll enjoy it.

    Anyway, the short of it – alt-click the stopwatch for a property, and you get an odd looking “=” sign there, and an area in the timeline that you can enter the code others have made, use some that are built-in, or a whole host of things…

    Spend a little time at Dan Ebbert’s site motionscript.com; it’s a treasure trove of resources to play with, and he’s a regular.

    Good luck

  • Kevin Camp

    November 1, 2008 at 3:49 pm

    as rhett describes it is pretty easy to add expressions… in addition to the short cut method, you can select a property, be it a layer property like position or rotation, or an effect’s property then choose animation>add expression. either way will open up an expression field where you can enter the expression.

    for roland’s example using the beam effect, you would start with two 3d layers layers, arranged in 3d space (it could be 2 nulls or any layers that were positioned where you needed them on you pylons).

    you would then create a new 2d solid and apply the beam effect. in the beam effect, select the starting point and ending point properties and choose animation>add expression. you can then paste in easily create your expression.

    first type a=, then use the expression pick whip and drag it onto the layer that you want to connect one end of the beam to and then add a semicolon at the end (this is to end that line of the expression). now, your expression should look like a=thisComp.layer(‘layername’);

    the second line converts the anchor data from 3d space (where the 3d layer lives) to the beam layer’s 2d space (where the beam effect lives). so you use the variable that you defined as a and type a.toComp(a.anchorPoint). essentially this says take the 3d layer defined as a and use it’s anchor point for one end of the beam effect.

    you would then do the same for the other end of the beam effect, connecting it to the other 3d layer.

    the only thing about the beam effect is it will create a straight line and, since it is a 2d effect, there won’t be any change is size from one end of the beam to the other as it moves back in space…

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Ben Weller

    November 1, 2008 at 4:40 pm

    ok well for whatever reason that just completely didnt work for me. i think im just gonna have to make it in 2d and then convert it into 3d space and just line it up by hand.
    thanks for all your help anyway guys.

  • Ben Weller

    November 1, 2008 at 4:48 pm

    if i make the cable in 2d then turn it into 3d, to strech from one pylon to another, is there anyway i can put an anchor point on either end of the layer, to make it easier to line them up? cos its gonna be a bitch trying to do just by rotating and stretching.
    cheers, Ben.

  • Kevin Camp

    November 1, 2008 at 6:28 pm

    once you have your 3d layer that will be the ‘wire’, with the path on it and stroke effect applied, you can make adjustments to the end points of the path. the only thing is the layer needs to be large enough to contain the points.

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Mike Clasby

    November 1, 2008 at 6:42 pm

    You can move the anchor point of your 2D layer with the Pan Behind Tool (Ctrl 1 brings up the Tool Palette, or just hit “Y” and the pointer changes to the Pan Behind, then “V” gives you back the pointer when you’re done).

    There is another Dan expression that’s a little easier, and no Nulls needed. It uses the beam effect or the Audio Waveform Effect (like Stroke if no audio used, but will wiggle with the beat if audio referenced), anyway any effect with in and out points. This method connects the in and out points to the anchor points of other layers, like your Pylons. Move the Anchor Point of each Pylon to where you want the wire to connect (Pan Behind Tool if you need to move it).

    So to a new Black Solid Layer that’s between the two pylon layers in the layer stack, (make it Comp size or big enough to stretch between the pylons) add the effect Audio Waveform. Add this expression to the Audio Waveform Start Point (Copy the expression (Ctrl C), Alt Click the Start Point Stopwatch, then Paste (Ctrl V)):

    target = thisComp.layer(“pylon 1”);
    fromComp(target.toComp(target.anchorPoint));

    And this expression to the End Point:

    target = thisComp.layer(“pylon 2”);
    fromComp(target.toComp(target.anchorPoint));

    This assumes your pylon layers were named pylon 1 and pylon 2. So now the Audiowave form will look like a stroke from pylon 1 to pylon 2.

    Note this layer is still 2D, so don’t make it 3D. This is from Dan page for make 2D Corene Pin to 3D, it’s an illusion, Dan says, but it fools the camera, page here:

    https://www.motionscript.com/design-guide/threeD-corner-pin.html

    The bonus of using audio waveform is that if you reference the audio within the plug in you could have the wires react to the audio, if you wanted.

    It’s not as complicated as it sounds, but maybe just using a 2D layer, moving the anchor point and rotating into place is easier.

Page 1 of 2

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