ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

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

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mikko Miettinen
Spreading a stack of layers (y position + offsettable center) with slider
on Jan 3, 2018 at 5:09:28 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


Return to posts index

Scott McGee
Re: Spreading a stack of layers (y position + offsettable center) with slider
on Jan 4, 2018 at 9:06:30 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.


Return to posts index

Kalleheikki Kannisto
Re: Spreading a stack of layers (y position + offsettable center) with slider
on Jan 4, 2018 at 11:57:46 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


Return to posts index


Mikko Miettinen
Re: Spreading a stack of layers (y position + offsettable center) with slider
on Jan 5, 2018 at 10:54:41 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


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]