Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Spreading a stack of layers (y position + offsettable center) with slider

  • Spreading a stack of layers (y position + offsettable center) with slider

    Posted by Mikko Miettinen on January 3, 2018 at 5:09 pm

    Hi,
    Terrible title/subject I know, but bit hard to explain. What I have here on sample After Effect file is a small stack of layers which I want to spread over y coordinates using a slider controller. I know how to do this (probably not the best solution as you can see), but what I would like to add to the stack layers (on Y position expression) is a another null that controls where from stacks spreading starts. So the spreading effect could start from bottom, so all layers move up, except the bottom one. Or it could start from top, so all layers would move down, except the top one. Or anything between that so what I´m after is kind of a center point for the spreading movement.

    LINK TO SAMPLE PROJECT:
    https://we.tl/AHPwktSFMy

    Thanks!
    Mikko

    Mikko Miettinen replied 8 years, 4 months ago 3 Members · 3 Replies
  • 3 Replies
  • Scott Mcgee

    January 4, 2018 at 9:06 am

    Main one I’d use is a “if” expression tied in with either a checkbox or text layer. If you select top, middle or bottom it uses the relevant expression instead based on that.

    Might not be the best way of doing it possibly, but that’s the way I would do off the top of my head.

    This is how I would write it for text reference.

    if (thisComp.layer(“TMB”).toLowerCase == “top”){
    use top expression
    }
    else if (thisComp.layer(“TMB”).toLowerCase == “middle”){
    use middle expression
    }
    else if (thisComp.layer(“TMB”).toLowerCase == “bottom”){
    use bottom expression
    }

    obviously if you want to use checkboxes, just rewrite for that.

  • Kalleheikki Kannisto

    January 4, 2018 at 11:57 am

    I agree. Setting up a moving center point will result in an exponential scale for the offset value, which you would then have to normalize. Selecting the centerpoint with as switch makes this much more straightforward.

    Kalleheikki Kannisto
    Senior Graphic Designer

  • Mikko Miettinen

    January 5, 2018 at 10:54 am

    Thanks guys,
    I ended up animating the spread from the bottom to top as customer wanted it like so. But anyway thanks for your input, I will look into that solution for the future projects. ☺

    Thanks ☺
    Mikko

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