New Pixel Bender Effect: Reverse Masking aka “Acid Blend”
I just completed a new Pixel Bender effect that I’m calling “Acid Blend” .. it is not a real “blendShader” because it does not act on the foreground image, it only uses the inverse of the foreground’s alpha channel to adjust the alpha of the background image.
The end result is a quick way to do a reverse mask, or create stencils that “eat away” at the alpha of your image.
The plugin sucks without a good stencil, so the quickest way to make a stencil is create a photoshop image with a transparent background, apply a stencil layer of your choosing, and save it out as a 24-bit PNG. Use the file as the src2 input and tweak the parameters to watch it in action. Note, if both images have full alpha opacity, there is no effect. That’s why the stencil needs to have a transparent bg.
After some experimentation, this plugin is really simple but can yield cool results if you are creative with the stencils and the tweening of the rotation/offset parameters. Here’s a demo I whipped up to show it in action (again, with a GlowFilter for added oomph). It’s mildly mouse reactive but I was too lazy to get the mappings just right. If you go counter-clockwise with your mouse in the upper left quadrant of your browser window you should see it react pretty well. Just wanted to show how dynamic the masking can be.
And here’s the source code to the PixelBender Kernel:
AcidBlend PixelBender Kernel Source
If you’re anxious to get started with a stencil, I’ve attached the one I used in the above demo:
As usual, hit me up with any suggestions for improvements or questions. Always happy to help!
1 Comment
this stuff’s pretty cool. pixel bender just gets so innovative day by day.