Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Automate 4-color gradient?

  • Automate 4-color gradient?

    Posted by Peter Janoschka on April 28, 2016 at 9:47 am

    Hi,

    Is there a way to pick the color of the 4-color gradient automatically over time?

    Do you know any script or expressions would do it?

    I have a “4-color gradient” to fill masked out parts. On the layer with 4-color gradient I pick the colors of the Footage next to the mask. That works fine with plain color or blurred areas. But as soon as the light in the shot changes , the colors get darker or brighter. So it would be nice to have a way to change the colors of the 4 corner points automatically in every frame.

    Or maybe there is a much better way?

    Thanks for your help!

    Peter Janoschka replied 10 years ago 2 Members · 2 Replies
  • 2 Replies
  • Ross Klettke

    April 28, 2016 at 3:37 pm

    On the footage layer make 4 Color Control effects (in Effects > Expression Controls > Color Control)

    Then for each Color Control, add the sampleImage expression:
    sampleImage(point, radius = [.5, .5], postEffect = true, t = time)
    — swapping in the correct value for point

    And finally, in the 4-Color Gradient effect add expressions to each color linking them to the Color Control effects

    Hope that helps!

    sampleImage(point, radius = [.5, .5], postEffect = true, t = time)

  • Peter Janoschka

    April 28, 2016 at 6:04 pm

    Hi Ross!

    This works just perfect! Thank you so much!

    Best,
    Peter

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy