Proposal "Node color to alpha"
Hi
I noticed many times that I had images with a background. Example a tree autumn feel on a white background, a white mother-of-pearl shirt button on a black background, a character on a green background.
I wonder if it could not be proposed a node so that the returned image with an alpha value. So that white or black or green or any other background color (chooses), sort in alpha while keeping the color of the output image.
Example node in thumbmail.
Best regards.
6 Comments
Kind of like the "Chroma Key" node, available in compositing mode ?
IMO there is a lot of compositing nodes I would like to see in shader editor, as well as some filters, matte nodes.
@loic.dautry: It can be a possibility. I was thinking of a simpler node. It would be necessary to know more about this node and in which circumstances to use it.
I'm afraid a simpler node with just a color setting won't be efficient enough. It needs a kind of threshold to make it usable with not-pixel-perfect colors such as low compressed image files or gradients. A kind of factor may not be obliged as you can still edit the output N&B alpha data with maths nodes or color ramp, but it's handy to have it right away. Fallof will make more control and usability, avoid jagged edges, ...
@loic.dautry: Yes, of course, I put the bare minimum to be usable. It can be embellished with plenty of options. Including an "invert" selection.
It is possible to add options as proposed below: Threshold Invert Output Black & White Outpout Red Output Blue Output Green
... and why not a color ramp?
color ramp goes into color input, invert nod can be added directly after the output.