ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Anchor a shape to another line shape end point

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Davide MitidieriAnchor a shape to another line shape end point
by on Jun 10, 2016 at 7:39:03 pm

Hi,
I'm trying to animate a sort of "sign". It is made of a line which can move, and two rectangles (that are in another shape layer). I managed to fix the rectangles to the line by putting them in the same layer. However, now I want the line to rotate around the starting point of the line. I tryed creating two different layers, one for the line and another for the rectangles, but I can't manage to make the rectangles fixed to the end of the line, when the inclination changes..

Here some images to explain it better:

Before the line rotation
http://i67.tinypic.com/21o2ceh.png
After the line rotation
http://i67.tinypic.com/f1hcte.jpg

Thanks in advice.


Return to posts index

Dave LaRondeRe: Anchor a shape to another line shape end point
by on Jun 10, 2016 at 9:44:56 pm

You can do this with the Beam effect in AE.

First, move the rectangle's anchor point to the corner where you want the line to end. Next, create a solid and apply the Beam effect; tweak the look as necessary. Select the starting point for it. Then create an expression for the end point and use the expression pick-whip to link it to the rectangle's position property.

Now when you move the rectangle, the line will follow.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index

Davide MitidieriRe: Anchor a shape to another line shape end point
by on Jun 11, 2016 at 7:46:17 am

I tryed in a new comp and it worked. However, my rectangle is following a mask path... and I don'w know why, but when I link the expression of the end point to the rectangle position (which has the anchor point to the lower right corner), the beam end point doesn't attach to it, but goes away to a strange position out of the screen... what's going wrong?

http://i68.tinypic.com/qoymwo.png


Return to posts index


Davide MitidieriRe: Anchor a shape to another line shape end point
by on Jun 11, 2016 at 8:12:53 am

P.S.: my rectangle is following a mask path through another layer ("track layer") in which I pasted the mask path properties. The expression of the start point of the beam is linked to the track layer, and it works fine. Instead, I have problems with the rectangle. The end point of the beam seems to be fixed during the animation (see the red circle marked in the preovius screenshot), while the rectangle moves following the track layer.


Return to posts index

Davide MitidieriRe: Anchor a shape to another line shape end point
by on Jun 11, 2016 at 8:45:10 am

Ok, I fixed the problem with this expression:
m = thisComp.layer("Label");
m.toComp(m.anchorPoint);

Where "Label" is the shape containing the rectangle.

However, now I have one last problem. I set the beam as a 2D layer, otherwise it was overlapping the map, as you see in this picture: (the white line should track the red path)

http://oi65.tinypic.com/23tphys.jpg

However, it seems that if there is a 2D object, all the other 3D objects are not casting shadows anymore... how can I fix this?
1) Keeping the beam layer in 2D, how can I manage to keep the other layers casting shadows?
2) Converting the beam layer to a 3D object, how can I avoid overlapping with the map?

Thanks in advice.


Return to posts index

Dave LaRondeRe: Anchor a shape to another line shape end point
by on Jun 11, 2016 at 1:36:31 pm

You can precompose the rectangle and beam, then make it a 3D layer.. But if you animate the comp's camera it may not look right.

If you're using 3D just to make shadows you can go 2D and use the Drop Shadow effect, perhaps.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index


Davide MitidieriRe: Anchor a shape to another line shape end point
by on Jun 11, 2016 at 2:44:14 pm

1) The map can rotate, so the view constantly changese, but the camera stays in a fixed position.

2) The problem is that as soon as the beam is set as a 2D object, also all the other 3D objects (such as other labels, etc.) stop casting shadows... not only the label attached to the beam. I can't get why it happens...


Return to posts index

Walter SoykaRe: Anchor a shape to another line shape end point
by on Jun 13, 2016 at 2:35:11 pm

A 2D layer in between 3D layers affects their intersections and lighting. If you have separated the light from the other 3D objects, the shadows won't render. Put the 2D layer at the top or at the bottom of the 3D layer stack to get your intersections back.

See here for more:
https://helpx.adobe.com/after-effects/using/3d-layers.html#3d_layer_interac...

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

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