ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Colour change from control layer

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Michael Frogley
Colour change from control layer
on Jul 18, 2018 at 9:32:29 pm
Last Edited By Michael Frogley on Jul 18, 2018 at 10:24:54 pm

I have a whole screen of dots (155 layers) comp name Dot Matrix. I want each dot to change colour randomly from a set range of colours. So I have one control layer in a seperate comp: Colour Control with the colours changing over time.
Going back to the comp Dot Matrix and add a Fill effect to each dot and add this expression

The colour of each dot will change colour every 10 frames from a random point in time from the Colour Control layer in Colour Control composition.

Note: The Colour Control composition has to be in this case the same length as the Dot Matrix composition.

Thanks to Dan Ebberts for writing the expression.

period = 10; //frames
L = comp("Colour Control").layer("Colour Control");
t = random(L.inPoint,L.outPoint);

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 All Rights Reserved