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

Premultiply alpha against black color? How?


Recommended Posts

Is there a way in Affinity Photo to premultiply the alpha against black color? I'm doing some renderings and I'm getting black halos around my objects. In Photoshop there's "Remove Black Matte" and in After Effects there's "Premultiplied - Matted With Color:" What about Affinity Photo?

Affinity Photo 2.4.2 for Windows  OS: Windows 10 Pro x64 ver. 22H2  CPU: AMD Ryzen 7950X 16-core  RAM: 64 GB DDR5-6400  GPU: MSI GeForce RTX 3090 Suprim X 24GB / driver 526.98  NVMe SSD Samsung 980 Pro 1 TB  Monitors: 2x Eizo ColorEdge CS2420 24"

Link to comment
Share on other sites

  • Staff

Hi Alex_M :)

Unfortunately there's no 'remove black matte' option in Affinity currently, although it has been previously requested here.

I can see that you have also previously made a post of a similar nature here, where my colleague provided an answer for Defringing, if you could provide an example then we may be able to help further!

Please note -

I am currently out of the office for a short while whilst recovering from surgery (nothing serious!), therefore will not be available on the Forums during this time.

Should you require a response from the team in a thread I have previously replied in - please Create a New Thread and our team will be sure to reply as soon as possible.

Many thanks!

Link to comment
Share on other sites

  • 2 weeks later...

Ok, please see the attached image. You will notice the black outline around the objects on the faucet to the left. It should look like the one to the right - no black outline. Do you have any ideas on how to get rid of the outline?

object_outline.jpg

Affinity Photo 2.4.2 for Windows  OS: Windows 10 Pro x64 ver. 22H2  CPU: AMD Ryzen 7950X 16-core  RAM: 64 GB DDR5-6400  GPU: MSI GeForce RTX 3090 Suprim X 24GB / driver 526.98  NVMe SSD Samsung 980 Pro 1 TB  Monitors: 2x Eizo ColorEdge CS2420 24"

Link to comment
Share on other sites

  • Staff

I see, thanks for that.

Any chance you could provide the source image, so I can try playing with it to see if I can help remove the matte? :) 

Please note -

I am currently out of the office for a short while whilst recovering from surgery (nothing serious!), therefore will not be available on the Forums during this time.

Should you require a response from the team in a thread I have previously replied in - please Create a New Thread and our team will be sure to reply as soon as possible.

Many thanks!

Link to comment
Share on other sites

Sure, please see attached.

EDIT: I Think the problem stems from the way the alpha is saved. The PNG format always saves alpha premultiplied so rendering against black background produces halos around edges of objects. In Photoshop the halo can be removed with Matting > Remove Black Matte and in After Effects you just tell it weather the alpha is premultiplied or straight. How do I do that with Photo? TGA format allows choosing to save the alpha as unpremultiplied (straight). Then I don't get the black halos in neither Photoshop nor Photo.

faucet.zip

Affinity Photo 2.4.2 for Windows  OS: Windows 10 Pro x64 ver. 22H2  CPU: AMD Ryzen 7950X 16-core  RAM: 64 GB DDR5-6400  GPU: MSI GeForce RTX 3090 Suprim X 24GB / driver 526.98  NVMe SSD Samsung 980 Pro 1 TB  Monitors: 2x Eizo ColorEdge CS2420 24"

Link to comment
Share on other sites

  • Staff

Thanks for that Alex :)

I've played around with the files and the closest I can get is changing the Gamma settings under the blend options for the image, see below.

606d0d7c8f49c86714942f5ba5b514bc.gif

As you can see, this makes a slight difference to the black haloing around the object.

Another option, if possible to your workflow, could be to use the EXR format as a straight alpha option is available in the export options of Affinity for this format. 

Please note -

I am currently out of the office for a short while whilst recovering from surgery (nothing serious!), therefore will not be available on the Forums during this time.

Should you require a response from the team in a thread I have previously replied in - please Create a New Thread and our team will be sure to reply as soon as possible.

Many thanks!

Link to comment
Share on other sites

Thanks for these examples! The Apply Image filter actually seems to work best. I had to change the Opacity parameter at the bottom to 50% to make it look good otherwise I get a white outline.

Affinity Photo 2.4.2 for Windows  OS: Windows 10 Pro x64 ver. 22H2  CPU: AMD Ryzen 7950X 16-core  RAM: 64 GB DDR5-6400  GPU: MSI GeForce RTX 3090 Suprim X 24GB / driver 526.98  NVMe SSD Samsung 980 Pro 1 TB  Monitors: 2x Eizo ColorEdge CS2420 24"

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.