ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

cascading color change

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
jonas espinoza
cascading color change
on Aug 10, 2010 at 5:02:50 pm

I have a 10x10 grid of little people silhouettes, and need them to change to a color in order.

was thinking there might be some way to use index to have each silhouette turn red after the last one. what plugin might be good for scripting this simple color change.

i looked around this site, but didnt find anything, can anyone think of a case like this?


Return to posts index

Dan Ebberts
Re: cascading color change
on Aug 10, 2010 at 5:37:37 pm

If you apply this expression to the Color parameter of the Fill effect, the layers will change to red in sequence, one second apart.

delay = 1;
if (Math.floor((time - inPoint)/delay) >= index)
[1,0,0,1]
else
value



Dan



Return to posts index

jonas espinoza
Re: cascading color change
on Aug 10, 2010 at 6:04:21 pm

do you have a tip bucket at your site? thank you so much for lending your brain



Return to posts index


jonas espinoza
Re: cascading color change
on Aug 10, 2010 at 10:33:44 pm

question, i am already using the inpoint to control the items dropping

is there a way to have a marker on the control null be what the delay is comparing itself to? does that make sense?

so i can have a marker on the null at say 15:00 and starting then a bunch of the items turn red in a cascading way and i can slide the marker as needed?

thanks so much dan



Return to posts index

Dan Ebberts
Re: cascading color change
on Aug 10, 2010 at 10:54:41 pm

That should work. This assumes the control null is below the other layers in the layer stack:


L = thisComp.layer("dropper");
delay = 1;
result = value;
if (L.marker.numKeys > 0){
t = L.marker.key(1).time;
if (time >= t){
if (Math.floor((time-t)/delay) + 1 >= index){
result = [1,0,0,1];
}
}
}
result


Dan



Return to posts index

Abbi Eiler
Re: cascading color change
on Sep 20, 2019 at 9:54:36 am

I am trying to use the expression that was provided in this post in order to make a row of shapes change color in a cascading order. I was originally looking for a way to copy one layers color change key frames with an expression that adds a delay for each shape so there is a cascading appearance. Where does the color red come from in this expression? I am trying to change the expression so that it will have the colors I need but I don't know what part of the expression is controlling the color itself. Thanks for your help.


Return to posts index


Dan Ebberts
Re: cascading color change
on Sep 20, 2019 at 4:03:56 pm

In expressions, colors are normalized to values between 0 and 1 and expressed as an array [r,b,g,a].
So red is [1,0,0,1].

Hope that helps.

DAn



Return to posts index

Abbi Eiler
Re: cascading color change
on Oct 4, 2019 at 11:48:34 am

It did help, that's exactly what I was trying to figure out. Thanks.

AE777


Return to posts index

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