First plugin - Color to Alpha
Posted 25 September 2011 - 11:17 AM
It takes colors, and changes them to a different alpha level of your choice. It was inspired by "Grim Color Reaper", one of (what I think) the most useful plugins out there. However it was always lacking in some regards, and I think this covers them. Or rather, this is a start in that direction.
It can remove any color you want (Color wheel for UI), with a tolerance level as well to provide some flexibility.
Additionally, you can make the tolerance slider make the entire image 0 alpha (not terribly useful, I agree, but available).
The tolerance level also gives the plugin a third, unintentional, feature; allowing you to remove any color except the one you have selected.
This is done by setting the tolerance level to 254 (each number represents 1 rbg value), then changing the RBG values in the color wheel to what you desire, and repeat up to twice to remove all colors you don't want.
This is best explained with pictures.
I don't mean for this to be a guide, or tutorial. Just a means to explicitly explain what this plugin can do so I can receive feedback.
The last two options I haven't mentioned are the "Finalized Alpha" slider and that checkbox.
"Finalized Alpha" simply controls what alpha level you convert your colors to.
The checkbox was a last minute "Hey that sounds neat" idea.
Checking it disables the plugin, reverting your canvass back to it's original form, before the plugin affected it.
This is so you can get a good look at how you're affecting your image, before clicking "Okay"
I thought it was a nice touch, instead of having to alternate between Ctrl+Z and Ctrl+Y after applying the plugin.
As it stands...it's more or less an over elaborate magic wand tool, except it doesn't make selections and applies globally.
I'd like to make it start antialiasing things after it changes to alpha and maybe affect semi-transparent pixels, but I haven't even looked into that yet. Any tips as to where to start? As in, should I just make it depend on another plugin, or code the antialiasing myself (I have no idea how to do that lol)
And thoughts on this? Is it worth continuing?
Oh, also, I set this to Effects>Color. I read the rules for plugin placement...but it all went over my head >_> so if I did a no-no, could you point it out? I don't really know what "Effect's Render/OnRender" are, so I'm hoping I don't have to worry about messing it, but what do I know.
(first time sharing with mediafire, I hope this works)
Posted 25 September 2011 - 06:49 PM
It is pretty similar, except that it uses a range. No problem, this is just the beginning and exactly why I put this here.
Next two things I'll shoot for then is to make it skip around an object it doesn't match with, and then antialias that object.
Edit: I've been thinking about it for a long while, and I can't figure out the best method to work around an object.
For example I want to remove black, but there's a circle in the image filled with black, outlined with white.
How would I go about removing all the black on the outside of the circle?
The only way I can imagine doing it is to make two loops, one that travels left to right, thens stops when it hits a color it doesn't want.
Then repeat going right to left, and stopping on a color it doesn't want.
That seems unnecessary, lengthy, and buggy though. It would cause issues in objects that aren't closed shapes as well...
Hmm...any tips on how to approach this? I don't exactly need code, but just a method to solve the problem.
Or name a plugin that does something similar that I can look into
Edited by W@@dy, 25 September 2011 - 08:56 PM.
Posted 27 December 2011 - 04:35 AM
About ignoring some regions when removing colors, it's really easy if your plugin only operates inside the selection (like the Reaper does). Just select the areas you want, invert selection, then run it. So for example, you can remove black outside an object but not inside.