Creative COW SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US
Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
ADOBE AFTER EFFECTS:HomeForumBasicsExpressionsTutorialsPodcastsAE TechniquesCreative Cloud DebateFAQ

set expression on one layer and have subsequent layers follow same behavior

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Share on Facebook
Zach Meissnerset expression on one layer and have subsequent layers follow same behavior
by on Aug 5, 2010 at 5:30:24 pm

Take a look at 1:52-1:58 of this video at the bottom of the page: http://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.

http://www.lab316.com


Return to posts index
Reply   Like  

Dan EbbertsRe: set expression on one layer and have subsequent layers follow same behavior
by on Aug 5, 2010 at 7:22:34 pm

Play 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



Return to posts index
Reply   Like  

Zach MeissnerRe: set expression on one layer and have subsequent layers follow same behavior
by on Aug 5, 2010 at 8:03:53 pm

Thanks 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.

here is a screenshot:

http://www.lab316.com


Return to posts index
Reply   Like  


Dan EbbertsRe: set expression on one layer and have subsequent layers follow same behavior
by on Aug 5, 2010 at 8:19:26 pm

Ah. 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



Return to posts index
Reply   Like  

Zach MeissnerRe: set expression on one layer and have subsequent layers follow same behavior
by on Aug 5, 2010 at 8:27:01 pm

Great!

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 â


Return to posts index
Reply   Like  

Dan EbbertsRe: set expression on one layer and have subsequent layers follow same behavior
by on Aug 5, 2010 at 8:37:28 pm

Yes. 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



Return to posts index
Reply   Like  


Zach MeissnerRe: set expression on one layer and have subsequent layers follow same behavior
by on Aug 5, 2010 at 8:40:36 pm

Sorry, looks like that last message got sent twice. Here is the screenshot:

http://www.lab316.com


Return to posts index
Reply   Like  


Dan EbbertsRe: set expression on one layer and have subsequent layers follow same behavior
by on Aug 5, 2010 at 8:50:04 pm

OK - 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



Return to posts index
Reply   Like  
+1

Zach MeissnerRe: set expression on one layer and have subsequent layers follow same behavior
by on Aug 5, 2010 at 8:55:23 pm

ahhh alas! Thanks again for lending your geniusness Dan!

http://www.lab316.com


Return to posts index
Reply   Like  


Dan EbbertsRe: set expression on one layer and have subsequent layers follow same behavior
by on Aug 5, 2010 at 8:27:23 pm

Also, make sure you copy the code from the web site, not the email. The email appears to be getting messed up.


Dan



Return to posts index
Reply   Like  

Zach MeissnerRe: set expression on one layer and have subsequent layers follow same behavior
by on Aug 5, 2010 at 8:36:21 pm

Yep, 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?

http://www.lab316.com


Return to posts index
Reply   Like  

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Share on Facebook


FORUMSTUTORIALSFEATURESVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

Creative COW LinkedIn Group Creative COW Facebook Page Creative COW on Twitter
© 2013 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]