continuously change color of solid by averaging color of other section
Hi there,
I'm looking for a way to continuously change the color of a solid using the average color of another section.
So let's say I have a composition with an animation of a TV that plays something. The average color of what is shown on that TV should be used as color of a solid that is somewhere else in my composition. And because the average color of the TV continuously changes due to that it is playing someting, the color of the solid should change continuously as well.
I tried using Point Control effect on the TV layer and the following expression:
samplePoint = targetLayer.effect("Point Control")("Point");
sampleRadius = [100,100];
averageColor = 255 * targetLayer.sampleImage(samplePoint, sampleRadius);
but that only works once and not continuously. Also I can't get the solid color to be set to averageColor.
Any help is kindly appreciated!
cheers.
Leo

