Author Topic: User-selected color to define Alpha layer?  (Read 1675 times)

WHAT I'D LIKE TO DO:

I would like to allow a user to load up his own bitmap image.  (That works fine.)
Ideally, it would be a PNG file with an alpha layer.  (That works fine, too.)

If the picture does not have an alpha layer, I'd like the user to be able to specify a color which should become transparent.

Usually it's going to be a picture on a white background, but if they use the color-picker tool, they could select any color to be transparent.

WHAT I TRIED SO FAR:

I know a little bit about the "channel mapper" where I can assign the incoming Red, Blue, or Green channel to the Alpha channel.

But how could I do something like white?  Or Orange?
I suspect it's going to turn out to be easy once I know the solution.

Any ideas?
Hobbyist
----------
Common "Help" suggestions:
- LOG FILE tips - https://forum.allegorithmic.com/index.php/topic,22451.0.html
- LICENSING issues https://www.allegorithmic.com/contact
- ATTACH files and pictures to posts: https://forum.allegorithmic.com/index.php/topic,23670.0.html

Hello,

maybe a combination of "color to mask" and "channel shuffle" nodes would suit your needs?

Hello,

maybe a combination of "color to mask" and "channel shuffle" nodes would suit your needs?

I would suggest Color To Mask as well.

Cheers,
Wes
Head of Substance Demo Art Team
the3dninja@adobe.com
Twitter: The3DNinja

Thanks for the quick tips.  It sounds kind of obvious now.  I can't wait give it a try.

I seem to spend a lot of time randomly searching through nodes, often being close but missing the prize.  If I learn one new node each week, I'll be pretty good in 6 or 7 years.   :P
Last Edit: November 12, 2015, 06:12:33 pm
Hobbyist
----------
Common "Help" suggestions:
- LOG FILE tips - https://forum.allegorithmic.com/index.php/topic,22451.0.html
- LICENSING issues https://www.allegorithmic.com/contact
- ATTACH files and pictures to posts: https://forum.allegorithmic.com/index.php/topic,23670.0.html