Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Folding layers like an accordian.

  • Folding layers like an accordian.

    Posted by Richie Tovell on December 28, 2008 at 5:58 pm

    I’ve seen simular posts but none of them have covered this specific expression.

    I have 10 layers pearanted together with their anchor points ajoined side by side, all of the layers y rotations are also linkied to the pearant layer, each layer rotates in an oposite direction to the last, I did this by simply adding a – sign to every other link expression by each layer, so as one layer turns right the next layer turns left.

    However the layeyrs turning in the oposit direction need to turn by twice as much, as they are already linked to a layer that is turning in the oposite diretion.

    Perhaps it might help if I explain how I would write the expression.

    Negative rotating layer, (Rotates by the same amount as the control it is linked to but in the oposite direction)

    – thisComp.layer(“Ski girl 4 long.avi 2”).transform.yRotation

    (This works) but I need it to turn by twice the amount, I gues it would be something like this

    – thisComp.layer(“Ski girl 4 long.avi 2”).transform. = 2/ yRotation

    But I don’t know what the propper expression should be.

    Can anyone help me figure this out?

    Richie Tovell replied 17 years, 4 months ago 2 Members · 4 Replies
  • 4 Replies
  • Richie Tovell

    December 28, 2008 at 6:18 pm

    Oh I found the answer to my own question.

    2* – thisComp.layer(“Ski girl 4 long.avi 2”).transform. = 2/ yRotation

    Sorry 😀

  • Avrohom Kohn

    January 1, 2009 at 3:51 pm

    I’m glad you posted. Don’t be sorry. I just tried it myself, as I’m working on a similar project, but I don’t understand how that worked for you. How can you split this: “transform.yRotation”, when I do, I get an error message. Doesn’t that whole line have to be together, as you’re actually pointing to that layer’s rotation property!?

    Could you copy and paste the exact expression you’re using?

    I still can’t figure out how to make it rotate in the opposite direction, let alone to duplicate that value!

    Thanks.

    Avrohom

  • Avrohom Kohn

    January 1, 2009 at 4:42 pm

    Got it! After playing around with it a little longer I figured it out. Thanks.

    Avrohom

  • Richie Tovell

    January 2, 2009 at 11:36 am

    Hi Avrohom.

    Sorry about the duff expression, I’ll correct that now. Unfortunately all my recent projects got messed up after a system restore, I would have posted a whole project up, but I’ll just have to settle with posting one of the early test renders instead (it’s extremely rough) and was literally made just to test the linking and expressions.

    https://killalltraitors.co.uk/Ski_Girl_Test_Render.avi

    The steps were (as best as I can remember).

    1 mask six different areas of the same image, 1 layer per mask

    2 move anchor points of each layer to one or other side of the masked area (note one of the centre anchor points must stay in the centre of the composition) this center layer will be the Parent layer and will anchor the whole sequence to the centre of the compositions.

    3 Parent all of your layers to one of your centre layers.

    4 link the Y Rotations of all of these layers to the same centre layer.

    Then in your expressions add a – sign to the beginning of every other expression. in front of your minus sign now add 2* this should look like this.

    Normal y rotation layer

    thisComp.layer(“Ski girl 4 long.avi 2”).transform.yRotation

    Invers y rotataion layer (Every other layer)

    2* – thisComp.layer(“Ski girl 4 long.avi 2”).transform.yRotation

    In my (Very Very Rough project) I have the Parent layers y rotation and layer width also, both being automated by trapcode soundkeys (it’s out of time though as this was still an early test). To control only the width of the layers using soundkeys the end of the expression was changed:

    in transform change expression linked to size from. .

    [temp, temp, temp]

    To

    [temp, value[1], temp]

    Basically whatever temp, you change to (value ([0] [1] or [2]) will remain stationary.

    I hope your project works out, mine did with a few more tweaks here and there. Also with more and more layers you can start to build up more complex warping and shapes.

    Regards Richie.

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