Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Animating/moving the anchor point

  • Animating/moving the anchor point

    Posted by Ian Collister on February 17, 2009 at 7:50 pm

    Hi all
    I want to animate a solid, a little like how the cards move in Alice in Wonderland.

    https://www.youtube.com/watch?v=CyGZFYhNzj4

    Im not looking for the solid to twist in any way, just imagine a square, walking, one corner forward, then the next. Effectively taking steps.

    I thought the easiest way to do this would be to use the anchor point. After the square has rotated around one corner, i would move the anchor point to the other corner and have it rotate around that, and so on. Making sense so far????

    My problem being that, i can move the anchor point with keyframes ok, but the solid moves about the anchor point rather than the anchor point moving about the square. The anchor point effectively stays put, and the square moves instead.

    Anyone know a way around this? Or a better way to achieve what im aiming for?

    Thanks again.
    i

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

    Marco Londero replied 7 years, 3 months ago 5 Members · 6 Replies
  • 6 Replies
  • Paul Hennell

    February 18, 2009 at 12:47 am

    Well with a little fiddling I’ve worked out a part method based on Daves suggestion above – Add a null with an Anchor point directly on the solids left corner – put the solids own anchor on it’s own right corner. Parent the solid to the null and add an angle control – then the following expressions to rotation –

    Null:
    if (effect(“Angle Control”)(“Angle”)> 0){
    0
    }else{
    effect(“Angle Control”)(“Angle”)
    }

    Solid:
    if (thisComp.layer(“Null 1”).effect(“Angle Control”)(“Angle”)< 0){ 0 }else{ thisComp.layer("Null 1").effect("Angle Control")("Angle") }

    You can now rotate the angle control and the solid will tip on either corner, however you can’t move it properly through 3d space because it always follows the null anchors position… anyone see how to solve?


    Only in after effects do children get to pick and whip their parents.
    https://hennell-online.co.uk

  • Filip Vandueren

    February 18, 2009 at 3:43 am

    I took a different approach,
    I’m nearly there though it still takes some fiddling, but only about as much as one would expect from animating a walkcycle:

    Make a 3D Solid (I made mine 250*400).

    Expression for anchorPoint:


    z_rot=degreesToRadians(transform.zRotation);
    if (z_rot>0) {
    x= width - Math.cos(z_rot) * (width/2);
    y = height + Math.sin(z_rot) * (width/2);
    } else {
    x= Math.cos(z_rot) * (width/2);
    y = height - Math.sin(z_rot) * (width/2);
    }
    [x,y,0]

    okay that takes care of keeping the two corners down, when you animate Z Rotation.
    Set some keyframes to let the solid go left to right a few times, while remaining stationary.
    Be sure to set keyframes for the extremes (about +/-2°) in my case, and for 0°

    Now, for Position.
    In order to actually advance, the solid will have to swivel also about it’s Y axis.
    But as soon as we change the Y-rotation, the ‘feet’ won’t remain in their place.

    I can’t quite figure out a way to fix this with an expression yet.
    But what you should do is look at it from the top view, and with layer handles enabled in the view, you’ll see 6 Dots at the Layer’send. Two of those are it’s “feet”, and you should keep them locked in place with a few keyframes while they swivel, takes a few minutes, but doable, by enabling Guides and scrubbing values in the timeline you’ll get something very acceptable.

    Here’s a screencast of me keyframing for 3 minutes, to give you an idea: https://www.vandueren.be/forumstuff/alice_cards/alice_cards_keyframing.mov

    Here’s the finished result:

    (Sorry for all the animated Gifs, some may not play, just open them in a new window, didn’t feel like making Flash embeds)

  • Ian Collister

    February 18, 2009 at 9:01 am

    Wow!
    Thought this was going to be a real easy one guys. Im surprised this hasnt come up before and that it isnt easier to shift the anchor point.

    Thanks all for your help, much appreciated. Im not super hot on my expressions but i will give it a go.

    Thanks again!
    i.

  • James Henley

    February 18, 2009 at 8:30 pm

    Hi Ian,

    It’s probably not ideal for this project, as it would be v time consuming to set the keyframes for every step, but if you use the ‘Pan Behind’ tool to move the anchor point the position values are automatically adjusted so that the object stays in the same place.

    cheers – James

  • Filip Vandueren

    February 19, 2009 at 12:56 am

    The Pan Behind Tool does some pretty strange stuff in 3D for me. Can’t really rely on it for some reason.

    You could use hold keyframes on the Anchorpoint to flip it, and adjust the position by hand by just dragging the Red axis (also using hold keyframes), this actually gives much better results than my first attempt with the anchorpoint alwyas in the center.

    Check this Screencap:

    https://www.vandueren.be/forumstuff/alice_cards/alice_cards_keyframing_2.mov

  • Marco Londero

    February 5, 2019 at 10:20 am

    Maybe it’s late but another way is to use the Transform effect multiple times.
    Let’s say you want to move and rotate a square on a floor. For the first corner use the layer transform tab and rotate the shape by 90°, then apply the first Transfom effect and use its anchor point to move again 90° from the second corner, repeat this procedure for every rotation on every corner.
    This will be the result: https://s000.tinyupload.com/?file_id=07065444385863895858

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