Activity › Forums › Adobe After Effects Expressions › cascading color change
-
cascading color change
Posted by Jonas Espinoza on August 10, 2010 at 5:02 pmI have a 10×10 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?
Abbi Eiler replied 6 years, 7 months ago 3 Members · 7 Replies -
7 Replies
-
Dan Ebberts
August 10, 2010 at 5:37 pmIf 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
valueDan
-
Jonas Espinoza
August 10, 2010 at 6:04 pmdo you have a tip bucket at your site? thank you so much for lending your brain
-
Jonas Espinoza
August 10, 2010 at 10:33 pmquestion, 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
-
Dan Ebberts
August 10, 2010 at 10:54 pmThat 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
-
Abbi Eiler
September 20, 2019 at 9:54 amI 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.
-
Dan Ebberts
September 20, 2019 at 4:03 pmIn 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
-
Abbi Eiler
October 4, 2019 at 11:48 amIt did help, that’s exactly what I was trying to figure out. Thanks.
AE777
Reply to this Discussion! Login or Sign Up