Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions dynamic eye dropper

  • dynamic eye dropper

    Posted by Brennanc on November 22, 2007 at 5:46 pm

    Hey yall,

    When I use the eye dropper to choose the color of an image it returns a per pixel r,g,b value. Is there any way to link a solids color to that value. The solid would always be only one color, but it would reflect to r,g,b value of the pixel from another layer? Not sure if I’m explaining it perfectly, but I hope the idea comes across.

    Thanks!

    Jerzy Drozda jr replied 18 years, 5 months ago 3 Members · 5 Replies
  • 5 Replies
  • Mike Clasby

    November 22, 2007 at 8:11 pm

    If you have CS3 you should be able to do it with this:

    https://www.motionscript.com/design-guide/sample-image.html

    Dan is sampling the color of the area under to Solid, then using fill to color the solid.

    If no CS3, then…

    There is a “Yikes, I can’t believe I’m doing this” work around, like this:

    Layer 1- New solid 100×100 named “dropper”, I choose red for this, so it’s easy to find. Mask off with Pen Tool so the point of the dropper (I just did a simple triangle) is touching the Anchor Point, or in the middle of the layer. Wherever we move this it will sample the color of the video layer below.

    Layer 2- Video Layer. This will become the “Solid” as we’ll fill it with the sampled color, with the Effect>Render>Eye Dropper Fill. It maybe somewhere else in a newer version of AE, I’m on AE6.5.

    I resized this layer, Scale to 20%, so you can see around it to sample, otherwise it blocks the view when sampling.

    After you apply Eye Dropper Fill, add an expression to Sample Point, Alt-Click the Sample Point Stopwatch, then pickwhip to the “dropper” Position, to get:

    thisComp.layer(“dropper”).position

    Or you can just Copy the expression, Alt-Click the Sample Point Stopwatch and Paste in that expression.

    Layer 3- Duplicate of Video Layer, so you can see what to sample.

    This is just so you can see what’s being sampled. We’re really sampling layer 2, but it’s also changing it’s color, so we need this third layer to really see what we have. I realize this sounds incredibly unclear, but it works. Anyway, if you’re still with me, wherever you move that wedge layer named “dropper” the second layer down will change to that color. Incredibly this seems to work even when the layers are 3D.

    Hopefully you have CS3 and don’t need this work around.

  • Brennanc

    November 22, 2007 at 10:25 pm

    Wow, thanks! Fortunately, I do have CS3 😉

  • Brennanc

    November 23, 2007 at 4:24 pm

    One more quick issue related to this.
    I’m actually trying to get Dan’s expression (https://www.motionscript.com/design-guide/sample-image.html) to work in Particular. There is a particle option called “color fill” that allows you to specify what color to fill custom particles with. The only problem is that for some reason Dan’s expression, which works beautifully on any other layer, doesn’t do the trick in this circumstance. It may be that Particular doesn’t support this new variable, but I thought it was worth it to ask.

    Thanks!

  • Brennanc

    November 23, 2007 at 4:39 pm

    Oh, I figured it out. I just link the color to the fill effect of a different layer running Dan’s expression.

    Thanks anyway:)

  • Jerzy Drozda jr

    November 27, 2007 at 8:10 pm

    You might want to check out my CE PixelSampler tutorial.
    https://maltaannon.com/after-effects/ce-pixelsampler/

    After getting a color you can just add a Fill effect to
    a solid and link the Fill Color to the value of
    my CE PixelSampler just by using a pickwip.

    Cheers


    maltaannon.com – Free After Effects Video Tutorials and more

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