Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions flipping videos or photos

  • flipping videos or photos

    Posted by Californiabao on May 13, 2007 at 6:22 pm

    Hi guys, I was wondering on how to create a flipping down or side way video or still photos like you see in some commercials or music video in AE. It looks like a photo albums being flip to another page but not the bending look just straight. I am looking to do a flip on slideshow where different photos come at you like its flipping constantly. Would this be a simple thing to do in AE and how would go about creating this type of style? Thanks and I appreciate your comments and techniques.

    Rob Erobs replied 15 years, 11 months ago 3 Members · 4 Replies
  • 4 Replies
  • Mike Clasby

    May 14, 2007 at 5:21 am

    Here are three expression; one for Orientation, one for anchor point, and one for position that should do what you want. They work on AE 3D layers.

    All of this is controlled by keyframes set on the Orientation of the top layer in the stack.

    Make the layers 3D. Put this delay expression on Orientation (Alt click the Orientation Stopwatch then paste in the expression below):

    delay = 5; //number of frames to delay

    d = delay*thisComp.frameDuration*(index – 1);
    thisComp.layer(1).orientation.valueAtTime(time – d)

    Change the delay to what you want. The expression is on Orientation and not Y rotation or x rotation because this expression will adjust to any orientation keyframes you set on the top layer. This expression stays the same whether you flip from the side or down. This is a small hack from a Dan Ebbert’s expression.
    ————————————————-

    Side Flip

    If you want the cards to flip side ways, put this expression on Position:

    [position[0] – width*0.5, position[1], position[2]]

    And put this on Anchor Point:

    [anchorPoint[0] – width*0.5, anchorPoint[1], anchorPoint[2]]

    These two expression just move the anchor point to the left side of the layer and compensate for that with the position so it stays where you first placed it.

    ————————————————-

    Flip Down

    If you want the cards to flip down, put this expression on the Position:

    [position[0], position[1] + width*0.5, position[2]]

    And this expression on Anchor Point:

    [anchorPoint[0], anchorPoint[1] + width*0.5, anchorPoint[2]]

    These two expression just move the anchor point to the bottom of the layer and compensate for that with the position so it stays where you first placed it.

    ———————————————————

    “EE” reveals the expressions, select them all and Edit>Copy Expression Only, then select all the other layers you want to flip and Paste.

    On the Top layer, Set some Orientation keyframes to rotate/swivel that top layer, how fast you want it to swivel. Two keyframes, the first on at time 0 when it’s flat and facing the viewer, then down the timeline set a keyframe for the end of the swivel. If you chose to Side Flip, keyframe the Y Orientation (second orientation number) and if you Flip Down, animate the X Orientation (the first Orientation number). The top layer controls all below.

    All the layers below the top layer should follow the top layer’s rotation (Orientation really).

  • Californiabao

    May 15, 2007 at 6:30 am

    Thank you so much, Mike. I am not that advance in AE yet, would it be too much to ask to get a small sample file where I can work and start from? if it’s not too much to ask, again thank you for your help.

    -Joe

  • Mike Clasby

    May 15, 2007 at 6:44 pm

    OK, I gave you the wrong expression for FlipDown, they should be:

    for anchor point:

    [anchorPoint[0], anchorPoint[1] + height*0.5, anchorPoint[2]]

    for position:

    [position[0], position[1] + height*0.5, position[2]]

    They said width instead of height, I was using square layers for the test so it worked, but not on non-square layers, like most photos.

    Here is a link to a zip, with a project file and two presets, FlipSide and FlipDown.

    https://putstuff.putfile.com/79460/3536597

    Drop these in your preset folder under AE. Select all the layers and Animation>Apply Animation Preset, then animate the Orientation for the top layer, to get the first flip, Y Orientation for FlipSide and X Orientation for FlipDown. Done.

    If you want to change the delay (in the Orientation expression, select the 5 and change it to say 10, then to apply it to all, select that expression “Orientation” next to the = sign, the Edit>Copy Expression Only, then select all the layers you want to change (below) and … Paste. Or you could control it with a slider, see Aharon’s tut’s on Expression Controls 1,2,3. Click on his head on the main AE page and scroll down.

    All the layers need to be the same size for this to be right. Well actually Flip Down all need to be the same height, FlipSide all need to be the same width.

  • Rob Erobs

    June 11, 2010 at 7:53 pm

    Do you add this expression to all the layers? or everything but the top layer? Because when I try the expression just gets disabled and nothing happens. Thanks in advance.

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