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

Compositing Transparency Problem


Recommended Posts

This should be so simple, I can't believe I can't do it.

I have two images (both exr). One has a transparent background. I just want the one with the transparent background on top so they are (crudely) composited. With the lower image appearing where the transparency is on the upper image.

Once I get them into Affinity (Photo or Designer) I can't make it happen.

I thought the way to do this was to pop the top image above the other one, change it to Add and that would do it. What happens is the top image is half visible, like a ghost. As if it were partly opaque. But the opacity settings for both the layers are at 100%.

This is bread and butter stuff I am sure, but I must be missing something super basic. I could do it in seconds in gimp, well - if they were png I could, but I am lost here for some reason.

I don't want to mask anything manually. I'll never get it as accurate as it already is.

Any help much appreciated!

Link to comment
Share on other sites

Hi David,

what happens when you just use blend mode normal? It should do the trick.

Can you use the info panel and check if the background is really shown as transparent (alpha equal to 0 when cursor is at position of background pixels)? Only the layer with transparent background should be active, all other layers de-active during this check.

One assumption is the pixels RGB values may be using pre-multiplied alpha, which needs to be adjusted by a filter. 

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.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

Thank you for your prompt reply.

After following your advice re the info panel I think the image is not as transparent as I thought! Those pixels have RBG 0 but A 255, so I need to go back to the program that spat it out, which is where the issue will be. Not an affinity product that is doing that.

The difficulty being that Affinity is the only program I have that can open exr, otherwise I suspect I would have noticed this sooner!

Thank you for your help.

David

Link to comment
Share on other sites

Hi David,

it would be very easy in Photo to automatically make those black pixel fully transparent, if only the background has black pixles.

possible workflow:

  1. Invert Adjustment
  2. Threshhold adjustment so that only pure white pixels are shown in white, and all others in black
  3. rasterize to mask
  4. If there are a few pixels in wrong color, edit mask with black/ white brush

Other option:

  • use procedural texture filter with formula (basic concept, may need some tweaking):
  • A=1-((1-R)*(1-G)*(1-B)*256-255)

 

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.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

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.