Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions sampleImage: using alpha to affect simple choker

  • sampleImage: using alpha to affect simple choker

    Posted by William Anugerah on August 21, 2015 at 8:29 am

    Hi everyone,

    I have an effect in mind and after some research I found out that sampleImage would be the best way to do it, but I don’t really do expressions much at all so I need help to write down the expression.

    Basically I’ll have a source layer with varying alpha value, and I want to use this alpha value to affect the effect of Simple Choker on my target layer. So basically where in the source layer is transparent, the target layer won’t be choked, and then the “Choke Matte” value will go up where the source layer is more opaque.

    I hope I’ve explained it well. So can anyone help write the code for that?

    William Anugerah replied 10 years, 8 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    August 21, 2015 at 3:56 pm

    I don’t think you can do that with an expression. You could set the Choke Matte value to be based on the alpha of a particular pixel or region, but you couldn’t generate different values for different regions in a single expression.

    Dan

  • William Anugerah

    August 22, 2015 at 12:05 am

    That is unfortunate, so is there no way to connect sampleImage to the parameter of an effect in any way?

  • Dan Ebberts

    August 22, 2015 at 12:15 am

    No, you can, it’s just that whatever you sample sets the effect parameter for the entire layer. sampleImage() gives you pixel-level access, but it’s read-only, so expressions don’t have any way to control anything at the pixel level.

    Dan

  • William Anugerah

    August 22, 2015 at 12:25 am

    I see, I’ll figure out other ways to do the effect then. Thanks for the information.

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