Jump to content

Luminance to Opacity (plugin or method search)


Coornio

Recommended Posts

I have some textures that are baked onto a black background, which works for some situations where an app can properly blend the textures that way, but in others it's an issue.

 

As such, I am looking for a way to convert a pixel's luminance value (HSV) to opacity. The closer to V=100 a pixel is, the closer to 255 alpha it gets basically. I need this applied to the entire texture of course, not on a per-pixel basis, in case it was misleading.

 

Does anyone have any recommendations for me? It is imperative to maintain color information so the likes of "Black and Alpha+" or BoltBait's "Gray to Alpha" don't work for me. Neither is one called "Color to alpha" or another "AlphaSpace" (this one mostly works but also seems to dampen brightness and lose pixels below a threshold).

 

Many thanks for any pointers!

Edited by Coornio
Link to comment
Share on other sites

Perhaps what you want is the Color Clearer with the Color to Make Transparent set to black. The default is the Primary Color. If Color to Make Transparent's isn't already black, it can easily be made black by moving the the Value color slider to the bottom of its range.

 

EDIT: I'll add that other similar plugins, such as Reverse Blend and Make Transparent, will likely also work. Though I take pride in the fact that Color Clearer is the most precise at removing all the specified color, black is an easy case, and I expect all the similar plugins will work about the same. So is you already have one of those plugins, you don't need to install another.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...