chrisell Posted February 22, 2023 Posted February 22, 2023 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. Quote
chrisell Posted February 22, 2023 Author Posted February 22, 2023 Footnote: I fear from this 4-year-long, 12-page-long topic that AP2 just can't do alpha channels the way the game and simulation industry needs (and has been using for decades) ---> Quote
emmrecs01 Posted February 22, 2023 Posted February 22, 2023 @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 Quote Win 11 Pro, intel i7 14700, NVidia GTX 4060, 32G RAM, intel UHD 770. 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 18.2) running Affinity Photo and Designer version 1 and all three version 2 apps.
lepr Posted February 22, 2023 Posted February 22, 2023 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. Quote
chrisell Posted February 22, 2023 Author Posted February 22, 2023 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. Quote
lepr Posted February 23, 2023 Posted February 23, 2023 5 hours ago, chrisell said: TGA or PNG or even PSD would work for sure. Interested to hear the workaround. Then attach a TIFF, as I requested. I want to show you with one of your own files so there are no ambiguities. Quote
chrisell Posted February 23, 2023 Author Posted February 23, 2023 12 hours ago, ,,, said: Then attach a TIFF, as I requested. I want to show you with one of your own files so there are no ambiguities. Here's a nice small example. dignumber8.tif Quote
lepr Posted February 23, 2023 Posted February 23, 2023 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. Enable visibility of the four text objects then press cmd+G to group them (do not include the Pixel object in the Group). With only the Group object selected, do Select > Selection From Layer And Delete. The 8s will vanish and marching ants will appear where their edges were, indicating a pixel selection. 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. Do Layer > New Mask Layer (or use the mask button at bottom of Layers panel) to create a raster Mask from the pixel selection. Optionally deselect the pixel selection by pressing cmd+D. 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 Quote
chrisell Posted February 24, 2023 Author Posted February 24, 2023 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. dignumber8.tif henryanthony 1 Quote
lepr Posted February 24, 2023 Posted February 24, 2023 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: Open the TIFF file with Affinity Photo 2. Cut then paste the "Background" Pixel object (this will be explained later). In Channels panel, right-click on "Unassociated Alpha" and pick Load To Pixel Selection - marching ants will appear. 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. Do Layer > New Mask Layer (or use the mask button at bottom of Layers panel) to create a raster Mask from the pixel selection. Optionally deselect the pixel selection and remove the marching ants by pressing cmd+D. 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 Quote
chrisell Posted February 24, 2023 Author Posted February 24, 2023 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: Open the TIFF file with Affinity Photo 2. Cut then paste the "Background" Pixel object (this will be explained later). In Channels panel, right-click on "Unassociated Alpha" and pick Load To Pixel Selection - marching ants will appear. 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. Do Layer > New Mask Layer (or use the mask button at bottom of Layers panel) to create a raster Mask from the pixel selection. Optionally deselect the pixel selection and remove the marching ants by pressing cmd+D. 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 Quote
Recommended Posts
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.