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

Newbie question : 4-channel RGBA TIF file with alpha channel - alpha doesn't work, can't save back to TIF


Recommended Posts

Complete newbie here, day 1 in Affinity Photo 2. Fell at the very first hurdle.

My workflow is and always has been for TIF images (textures for 3D Models) to have 4 channels - R,B,G and Alpha. When I load one of these into AP2, I see a lot more channels than I'm expecting (composite R,G,B, background R,G,B, background alpha, pixel selection and "Unassociated alpha").

For the life of me I can't seem to get just four channels - R,G,B and A. The loaded file won't allow me to save back to a TIF - it's trying to force me to save it as an .afphoto file.

I don't want the premultiplied alpha that you can get by loading the unassociated alpha to background alpha (and even then, I can't seem to save as a TIF - again it's forcing me to save as a .afphoto file). I need the alpha channel to stay as it is in the TIF file - a separate grayscale channel.

I've spent a couple of hours trying to pick through the forums and online help and I can't seem get to the bottom of what I consider to be the most simple, basic thing - how do I open, edit and save a basic, four-channel TIF image?

Attached are pics of what a typical texture looks like in Photoshop, and how it's coming out in AP2.

 

photoshop_alpha.jpg

affinity_alpha.jpg

Link to comment
Share on other sites

@chrisell

I can't help you with the alpha channel problems, sorry, but to "save" any image file to any format other than .aphoto you must Export it, (File>Export) or use the Export Persona.

HTH

Win 10 Pro, i7 6700K, 32Gb RAM, NVidia GTX1660 Ti and Intel HD530 Graphics

Long-time user of Serif products, chiefly PagePlus and PhotoPlus, but also WebPlus, CraftArtistProfessional and DrawPlus.  Delighted to be using Affinity Designer, Photo, and now Publisher, version 1 and now version 2.

iPad Pro (12.9") (iOS 17.4) running Affinity Photo and Designer version 1 and all three version 2 apps.

Link to comment
Share on other sites

3 hours ago, chrisell said:

The loaded file won't allow me to save back to a TIF - it's trying to force me to save it as an .afphoto file.

That is because of the additional channel named "Unassociated Alpha".

Affinity's RGBA TIFF output is going to be premultiplied, anyway, which is of no use to you.

I can give you a workaround if straight RGBA output to TGA or PNG format is acceptable (even if not ideal) to you.

Attach a problematic TIFF if you want to know more.

 

Link to comment
Share on other sites

3 hours ago, emmrecs01 said:

@chrisell

I can't help you with the alpha channel problems, sorry, but to "save" any image file to any format other than .aphoto you must Export it, (File>Export) or use the Export Persona.

HTH

Aha - That's a good tip - thanks !

 

2 hours ago, ,,, said:

That is because of the additional channel named "Unassociated Alpha".

Affinity's RGBA TIFF output is going to be premultiplied, anyway, which is of no use to you.

I can give you a workaround if straight RGBA output to TGA or PNG format is acceptable (even if not ideal) to you.

Attach a problematic TIFF if you want to know more.

 

TGA or PNG or even PSD would work for sure. Interested to hear the workaround.

Link to comment
Share on other sites

Thanks for the file.

The file is very unlike your opening example. It contains no "Unassociated Alpha" channel, and instead contains 4 hidden text objects (the numeral 8s) which I presume are supposed to mask or clip the blues Pixel object. Anyway, we can work with that.

To get a straight RGBA TGA or PNG export from Affinity, the alpha needs to be a raster Mask at the top of the layer stack in Affinity. You are going to convert the 8s to a raster Mask.

  1. Enable visibility of the four text objects then press cmd+G to group them (do not include the Pixel object in the Group).
  2. With only the Group object selected, do Select > Selection From Layer And Delete.
  3. The 8s will vanish and marching ants will appear where their edges were, indicating a pixel selection.
  4. Ensure the Pixel object is not selected in Layers panel because, when a Mask is added, we want it at top of the layer stack and not nested inside an object.
  5. Do Layer > New Mask Layer (or use the mask button at bottom of Layers panel) to create a raster Mask from the pixel selection.
  6. Optionally deselect the pixel selection by pressing cmd+D.
  7. A raster Mask will now be stacked above the Pixel object and a TGA or PNG can be exported.

I have attached an Affinity document with history that you can rewind and step through, and an exported TGA.

dignumber8.afphotodignumber8.tga

 

 

Link to comment
Share on other sites

Ok that's weird. The texture does have an alpha channel in photoshop - I've no idea where it's gone in AP2. Attached screenshot shows the texture in photoshop with the RGB and A channels.

I opened it in AP2 and for sure it doesn't show an unassociated alpha. Being a little confused as to what that was, I deleted the hidden layers in the TIF texture and re-saved it and now it does show unassociated alpha when imported into AP2. I've attached the new file here too.

So that leads to another question I guess - why is the behaviour different if there are hidden layers in the source texture?

I've been evaluating AP2 as a potential photoshop replacement but there are some things that are 'awkward' for my workflow (and my team) - the alpha channels is one. The fact that you can't just CTRL-S to save the open document, but have to export to the file format each time - that's a weirdly steep hill to climb.  I like how quick and clean everything is compared to Photoshop though - that's making a compelling argument to switch. But some of AP2's functionality choices are  - well - "weird" I'd say.

 

alphachannel.jpg

dignumber8.tif

Link to comment
Share on other sites

 

5 hours ago, chrisell said:

I opened it in AP2 and for sure it doesn't show an unassociated alpha. Being a little confused as to what that was, I deleted the hidden layers in the TIF texture and re-saved it and now it does show unassociated alpha when imported into AP2. I've attached the new file here too.

So that leads to another question I guess - why is the behaviour different if there are hidden layers in the source texture?

 

Thanks for the new file. I don't know the answer to your question, sorry.

The following procedure will give you an Affinity document from which RGBA with intact RGB can be exported in TGA or PNG format:

  1. Open the TIFF file with Affinity Photo 2.
  2. Cut then paste the "Background" Pixel object (this will be explained later).
  3. In Channels panel, right-click on "Unassociated Alpha" and pick Load To Pixel Selection - marching ants will appear.
  4. Ensure the Pixel object is not selected in Layers panel because, when a Mask is added, we want it at top of the layer stack and not nested inside an object.
  5. Do Layer > New Mask Layer (or use the mask button at bottom of Layers panel) to create a raster Mask from the pixel selection.
  6. Optionally deselect the pixel selection and remove the marching ants by pressing cmd+D.
  7. A raster Mask will now be stacked above the Pixel object and a TGA or PNG can be exported.

Step 2 should not be necessary, but if it is not performed then Affinity will bake the Unassociated Alpha channel into the "Background" object's alpha - including setting RGB to zero wherever alpha is zero - when the Affinity document is saved.

Attached is an Affinity document with history that you can rewind and step through, and an exported TGA.

dignumber8-2.afphoto dignumber8-2.tga

 

Link to comment
Share on other sites

1 hour ago, ,,, said:

 

 

Thanks for the new file. I don't know the answer to your question, sorry.

The following procedure will give you an Affinity document from which RGBA with intact RGB can be exported in TGA or PNG format:

  1. Open the TIFF file with Affinity Photo 2.
  2. Cut then paste the "Background" Pixel object (this will be explained later).
  3. In Channels panel, right-click on "Unassociated Alpha" and pick Load To Pixel Selection - marching ants will appear.
  4. Ensure the Pixel object is not selected in Layers panel because, when a Mask is added, we want it at top of the layer stack and not nested inside an object.
  5. Do Layer > New Mask Layer (or use the mask button at bottom of Layers panel) to create a raster Mask from the pixel selection.
  6. Optionally deselect the pixel selection and remove the marching ants by pressing cmd+D.
  7. A raster Mask will now be stacked above the Pixel object and a TGA or PNG can be exported.

Step 2 should not be necessary, but if it is not performed then Affinity will bake the Unassociated Alpha channel into the "Background" object's alpha - including setting RGB to zero wherever alpha is zero - when the Affinity document is saved.

Attached is an Affinity document with history that you can rewind and step through, and an exported TGA.

dignumber8-2.afphoto  dignumber8-2.tga 64.04 kB · 0 downloads

 

Awesome - thank you for the explainer :)

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.