Jump to content
You must now use your email address to sign in [click for more info] ×

Make pixels semi-transparent based on brightness and saturation?


Recommended Posts

Hi,

perhaps someone knows whether this is possible (or has a better approach). 

I'm trying to mask out an object as good as possible. Usually refine mask does a very good job and I try to get things right in camera. In this rare case I need to get rid of the bright edges in the selection (a person). It was photographed on a white background which is the reason for the super bright edges. They aren't pure white any more but naturally reflect the light around the subject. 

Now I want to make those brighter and less saturated pixels semi-transparent to better blend everything on a non-white background. -> The brighter and less saturated the pixel is, the more transparent it should be. Similar to how multiply works. Is there something like an eraser that just erases a defined hsl range?

I've tried everything I know so far with selections, refining and blend ranges but couldn't find a good way.

Any ideas how to let a selection better blend or fade out at the bright edges? 

Thanks!

Selection.jpg

Link to comment
Share on other sites

Hi,

 

assuming you already using a mask, or copied a selection so you have a pixel layer with alpha where the edges show alpha below 1.  

a first step would be a levels asjustment on alpha channel. 
play with gamma, black and white level to check if this helps.

Curves on alpha channel as next option.

My favorite for advanced users is procedural text filter. 
Unfortunately, it is based on pure RGB and lacks functions to convert to HSL or directly use hue/saturation/luminance.

With help of Wikipedia, you will find the formulas allowing to convert on you own.

I hope this helps.

Regards, Timo

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

Thanks Timo,

It seems that it isn't possible to edit the mask itself as alpha with levels or such adjustments. I've tried to rasterise the masked pixel layer to get a pixel layer with an alpha channel. However, that didn't get me towards what I want to achieve. I can't edit just the alpha channel of that pixel layer but only the composite alpha. 

It is well possible that I just don't understand how to do it. I couldn't find further info in the Help or any tutorials on that. How would you approach that?

 

alpha.jpg

Link to comment
Share on other sites

Now i will share a 1 million dollar secret sauce for free:

You can use any pixel layer as mask, and use any tool like dogde, burn, adjustments, brushes on this mask, and see the masking effect in realtime.

Just add a "procedural text" filter to the mask, and enter the simple formula A=(1-R).

The, start to work on the mask (which is still a pixel layer).

I use the R channel for simplicity as all RGB channels should be identical when the mask layer is grayscale.

Have fun.

 

image.thumb.png.94a905c3b1becf94ac32f6a2f3c359ad.png

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

Do give some more hints:

 

  1. First, create a grayscale layer using the "channels" panel from you selection or mask.
  2. Rename this layer to "pixel mask"
  3. add the live procedural text filter with this formula A=(1-R)
  4. Clip this live filter to "pixel mask"
  5. Clip "pixel mask" layer to the layer where you want to use it. The procedural text filter will become invisible in the layer stack, but still working.
  6. Modify the "pixel mask" layer with any pixel tool you like
  7. Send all your spare money to me ;-). At least give a "heart" or "thanks" to my post.

 

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

And here is the preset ready to import.

image.png.3623867a6faab28a9c1bbe61d13094b9.png

image.png.5ff8c77684bcb433769e6acb028ddcd7.png

 

use pixel layer as mask from NotMyFault.aftoolpresets

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

Hi 0815,

 

schön das es bei Dir funktioniert hat, und super video!
 

Gruß, Timo

 

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

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.
Note: Your post will require moderator approval before it will be visible.

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.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.