Activity › Forums › Adobe After Effects Expressions › set expression on one layer and have subsequent layers follow same behavior
-
set expression on one layer and have subsequent layers follow same behavior
Posted by Zach Meissner on August 5, 2010 at 5:30 pmTake a look at 1:52-1:58 of this video at the bottom of the page: https://about.dtnpf.com/ag/products/producer/grains/
Can i use the loopout expression to set the first panel to pop out, then the rest to follow?
What expression can i use to start the first panel pop out then the rest follow? It’s just using the Z axis to come forward.
Zach Meissner replied 16 years ago 2 Members · 10 Replies -
10 Replies
-
Dan Ebberts
August 5, 2010 at 7:22 pmPlay around with this:
strtTime = 1;
zDist = 500;
moveDur = .75;
delay = 1;t1 = strtTime + (index-1)*delay;
t2 = t1 + moveDur;
if (time < t2) value - ease(time,t1,t2,[0,0,0],[0,0,zDist]) else value - ease(time,t2,t2+moveDur,[0,0,zDist],[0,0,0]); Dan -
Zach Meissner
August 5, 2010 at 8:03 pmThanks Dan, i applied it to the Position attribute, but just kept getting an error. I have keyframed the z postion, 0 at both ends and -145 in the middle for the scale effect of coming forward and back.
-
Dan Ebberts
August 5, 2010 at 8:19 pmAh. It looks like the “if” statement got messed up in the translation. It’s supposed to be:
if (time < t2)
Also, it’s set up to generate the z animation without any keyframes. It will just sequence one layer after another, starting at whatever you have strtTime set to.
If you want to keyframe the first layer (let’s say it’s named “leader”) then you could use an expression like this on the others (which need to be below “leader” in the layer stack):
delay = 1;
L = thisComp.layer(“leader”);
z = L.transform.position.valueAtTime(time – (index – L.index))[2];
[value[0],value[1],z]Dan
-
Zach Meissner
August 5, 2010 at 8:27 pmGreat!
No i’m trying to take it one step further and make the individual attributes on their own sliders so that I only need to adjust one setting for the 25 or so panels that I will have.
I created a null object with a expression slider, then selected zDist in the expression of the first panel. When I did this I got an error. Is this the best way to set up the attributes so they can be changes instead of having to go into each individual expression and having to change it?
After Effects warning: Class â -
Dan Ebberts
August 5, 2010 at 8:27 pmAlso, make sure you copy the code from the web site, not the email. The email appears to be getting messed up.
Dan
-
Zach Meissner
August 5, 2010 at 8:36 pmYep, i’m copying the code from the forum itself.
Now i’m trying to take it one step further and make the individual attributes on their own sliders so that I only need to adjust one setting for the 25 or so panels that I will have.
I created a null object with a expression slider, then selected zDist in the expression of the first panel. When I did this I got an error. Is this the best way to set up the attributes so they can be changes instead of having to go into each individual expression and having to change it?
-
Dan Ebberts
August 5, 2010 at 8:37 pmYes. The pick whip should take care of the syntax for you. If you can’t get it to work, post a screen shot of the broken expression and the error message.
Dan
-
Zach Meissner
August 5, 2010 at 8:40 pm -
Dan Ebberts
August 5, 2010 at 8:50 pmOK – you still need to define a local variable named “zDist”. Your second line should look like this:
zDist = thisComp.layer(“Null 1”).effect(“zDist”)(“Slider”);
When you used the pick whip it looks like you replaced the whole second line, but really you needed to just replace the value and leave the “zDsit =” part.
Dan
-
Zach Meissner
August 5, 2010 at 8:55 pm
Reply to this Discussion! Login or Sign Up

