Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Auto-align and center anchor points for each layer?

  • Auto-align and center anchor points for each layer?

    Posted by Greg Sage on March 18, 2014 at 6:39 pm

    Basically, I have dozens of layers of all different dimensions. I want to set an anchor point for each in various differing spots, then line them all up on top of eachother where the anchors are all exactly alligned, and all exactly centered.

    I’m doing it manually right now, but it’s a huge pain, and never quite exact when I zoom in further. This may end up being over a hundred layers, so is there any way to do this automatically?

    Perhaps some version of dropping each into a uniformly sized precomp and collapsing transforms?

    Maybe custom position expression that relates to the anchor position to auto-center? If each were perfectly centered, I guess the lining them up part would take care of itself.

    Thiago Pauli replied 6 years, 6 months ago 5 Members · 7 Replies
  • 7 Replies
  • Roland R. kahlenberg

    March 18, 2014 at 8:01 pm

    Use the Snap feature (select Anchor Point with the Anchor Point/Pan Behind Tool and hold down CTRL/Command) to place your Anchor Points (AP). TIP – Snapping targets include layer boundaries as well as Guides.

    Once you have all the APs set up, use the Align Panel to center the layers. Do this easily by selecting all layers. Then set the Align to work with Composition instead of Selection. Then click on the Horizontal Align, followed by the Vertical Align buttons.

    HTH
    RoRK
    Latest AE Workshop – MoGraph Intensity – Shapes & Text

    Intensive mocha & AE Training in Singapore and Other Dangerous Locations

    Imagineer Systems (mocha) Certified Instructor
    & Adobe After Effects CS6 ACE/ACI

  • Greg Sage

    March 19, 2014 at 2:26 am

    The align only seems to go by the center of each layer… not where I place the anchor point. I need to have it treat the anchor as the new center even though it may not be near the center of the layer.

    Even with comp selected in align panel, it alligns each layer with center of comp… but does so for each layer according to it’s center, not anchor point.

    I’ve found a few round-about approaches to this, but nothing that works so far. Should be simple enough.

  • Roland R. kahlenberg

    March 19, 2014 at 4:19 am

    Actually, from your initial post, I couldn’t get a grip on what you wanted. However, I feel that my post should sort your needs out.

    I suggest that you first center all your layers (if this is indeed what you want). Then, use AE’s Snapping Feature to set each layer’s Anchor Point to suit your exacting needs.

    HTH
    RoRK
    Latest AE Workshop – MoGraph Intensity – Shapes & Text

    Intensive mocha & AE Training in Singapore and Other Dangerous Locations

    Imagineer Systems (mocha) Certified Instructor
    & Adobe After Effects CS6 ACE/ACI

  • Walter Soyka

    March 19, 2014 at 5:39 am

    [Greg Sage] “Basically, I have dozens of layers of all different dimensions. I want to set an anchor point for each in various differing spots, then line them all up on top of eachother where the anchors are all exactly alligned, and all exactly centered.”

    Anchor points indicate a point within a layer; that is, they are expressed in the layer’s coordinate space.

    Position points indicate a point not in the layer, but in the layer’s container; that is, they are expressed in the layer’s parent’s or comp’s coordinate space.

    That means that you don’t need to do anything fancy to line up all the anchor points once you set them, because the position is not dependent on the source layer like the anchor point is. You can just copy the position property from one layer and paste it on all the others. (You could also hold Shift while parenting the other layers to the first to move the layers, then un-parent them.)

    If you want to reposition a layer so that its anchor point is at the center of the comp, just select the layer (or all of them at once) and press Ctrl+Home (PC) or Cmd+Home (Mac).

    If you want to center a set of layers within the camera’s view and orient them to the camera, you can use a script I wrote:
    keen_centerLayersToActiveCamera [link]

    Walter Soyka
    Principal & Designer at Keen Live
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    RenderBreak Blog – What I’m thinking when my workstation’s thinking
    Creative Cow Forum Host: Live & Stage Events

  • Greg Sage

    March 19, 2014 at 4:46 pm

    Yeah, thx.

    I can see from some old threads I dug up that it’s a difficult question to clarify.

    I’d love to learn that I am wrong, but from what I can tell, all the AE functions center things by the center of the image, not the anchor point.

    I’ve tried half a dozen experiments, and regardless of where I set the anchor point, if I align layers either to each other, or to comp, the thing that is being aligned is the overall dimensions of the layer, and centering always refers to the center of the layer, and not the anchor point. I can move the anchor point clear to the other end of the pic, and it will have no impact on the alignment. Maybe I’m missing or misunderstanding something, but that’s what happened when I tried.

    I do think I’ve got it sorted, though. The key is to always use the center position for the comp as the position for all layers. I then zoom in until the opposite sides of whatever I want to center just hit the edges of the comp, and adjust the anchor point only until it’s an exact match. This sets the anchor point, and perfectly centers the image on that anchor point since the position is already set to the center position for the comp.

    Anyway, it’s not exactly automated, but it does work. Unfortunately, if I try parenting one to another, it causes some issues as the different sizes of the various pics cause the position to change from the default center. That’s a whole other issue, though, and I’ve found a workaround by creating an expression that parents the scale only while leaving the position unchanged at the exact comp center for every layer.

  • Derek Carlson

    September 8, 2014 at 10:51 pm

    I believe hitting Opt/Alt+Double Click “Pan Behind” tool should work.

  • Thiago Pauli

    November 15, 2019 at 3:03 pm

    thank you. that worked like a charm!

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