Jump to content

Massive problem with saving tga files with alpha channel


Recommended Posts

When the alpha is 0 it writes black to the colour channels. Just upgraded to V2 and this is completely useless for me.

Behold, a completely white image with an alpha channel as such:

image.png.efee7bcaeccc3bab72e113c88ad43b46.png

The resulting saved tga colour information:

image.png.5a6d7fa31a0f2c61187aae0dbf26d785.png

It should be white as the original, but it's changed all 0 alpha to black. Please fix this ASAP, I cannot use this software as is.

Link to comment
Share on other sites

  • Staff

Hi Idle John,

Please could you provide a copy of the imge shown in your example so I can try and replicate this issue here?

Thanks
C

Please tag me using @ in your reply so I can be sure to respond ASAP.

Link to comment
Share on other sites

Hi @IdleJohn,

What exactly is the issue with the file?

Affinity Designer 2.5.5 | Affinity Photo 2.5.5 | Affinity Publisher 2.5.5
MacBook Pro M3 Max, 36 GB Unified Memory, macOS Sonoma 14.6.1, Magic Mouse
HP ENVY x360, 8 GB RAM, AMD Ryzen 5 2500U, Windows 10 Home, Logitech Mouse

Link to comment
Share on other sites

1 hour ago, IdleJohn said:

if you open it and hide composite alpha it will show as large areas of black where the alpha is 0

Which software are you taking your TGA files into once exported?

Affinity Designer 2.5.5 | Affinity Photo 2.5.5 | Affinity Publisher 2.5.5
MacBook Pro M3 Max, 36 GB Unified Memory, macOS Sonoma 14.6.1, Magic Mouse
HP ENVY x360, 8 GB RAM, AMD Ryzen 5 2500U, Windows 10 Home, Logitech Mouse

Link to comment
Share on other sites

Hi @IdleJohn,

Thanks for confirming...

There are numerous references online to this potentially being a Blender issue...

If you Google 'why does TGA alpha show as black in Blender' you will find lots of results, hopefully one of which will directly answer your question...

I would post a more specific answer but I'm unsure which exact solution answers the question without reinstalling Blender...

Affinity Designer 2.5.5 | Affinity Photo 2.5.5 | Affinity Publisher 2.5.5
MacBook Pro M3 Max, 36 GB Unified Memory, macOS Sonoma 14.6.1, Magic Mouse
HP ENVY x360, 8 GB RAM, AMD Ryzen 5 2500U, Windows 10 Home, Logitech Mouse

Link to comment
Share on other sites

Hi @IdleJohn,

10 minutes ago, IdleJohn said:

I specifically isolated the colour channels in Blender.
In our game engine it ruins the mipmaps

I don't know exactly what the issue is here...

There seem to have been numerous reports of people experiencing the same issue in Blender which leads me to believe this 'may' be Blender-specific rather than an Affinity issue though I can't be sure...

Exporting an identical file to TIFF and PNG results in the same output, i.e., hiding the composite alpha layer in the channels panel shows black where the alpha is 0.

My understanding, rightly or wrongly, is that different software interprets the Alpha channel differently, some using a black layer, others not...

I was hoping some of the suggested solutions for this issue posted in the Blender forums might help but if that's not the issue please let us know...

Affinity Designer 2.5.5 | Affinity Photo 2.5.5 | Affinity Publisher 2.5.5
MacBook Pro M3 Max, 36 GB Unified Memory, macOS Sonoma 14.6.1, Magic Mouse
HP ENVY x360, 8 GB RAM, AMD Ryzen 5 2500U, Windows 10 Home, Logitech Mouse

Link to comment
Share on other sites

Blender does display alpha as black in the image viewer, but that's not the issue. I grabbed my screenshot from the 3d viewport with the alpha channels disabled and that shows the 'true' image. You can clearly see the one output from Photo 2 is black, whereas the orgininal from Photoshop is not black. Also I showed in my game engine the same thing.

Link to comment
Share on other sites

I think nothing has changed in handling of alpha (with zero) recently.

The workarounds for channel packing are still required:

 

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

just as a heads up the 'Alpha Chanel Packing' tutorial no longer works for alpha values of 0, affinity in its infinite wisdom patched out the one work around and its now impossible to do what you want 🙃

Link to comment
Share on other sites

5 minutes ago, Robbin said:

just as a heads up the 'Alpha Chanel Packing' tutorial no longer works for alpha values of 0, affinity in its infinite wisdom patched out the one work around and its now impossible to do what you want 🙃

To be precise:

  1. specifically if all / majority of  pixels are alpha zero.
  2. I still need to figure out when it toggles from correct (as before) to unusable.
  3. This has not changed. V1 and V2 behave identical. I only never checked for this specific case before you raised the issue.

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

Compound mask on top + turning the Grayscale Layer into a Mask is all that is needed.
at least that still works with 100% (White) and 0% (Black ) Masks.
I use that for Gamedev.
 

Sketchbook (with Affinity Suite usage) | timurariman.com | artstation store

Windows 11 Pro - 23H2 | Ryzen 5800X3D | RTX 3090 - 24GB | 128GB |
Main SSD with 1TB | SSD 4TB | PCIe SSD 256GB (configured as Scratch disk) |

 

Link to comment
Share on other sites

2 minutes ago, myclay said:

Compound mask on top + turning the Grayscale Layer into a Mask is all that is needed.
at least that still works with 100% (White) and 0% (Black ) Masks.
I use that for Gamedev.
 

not for TGA export on iPad and a fully black mask. It is a specific edge case.

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

22 minutes ago, NotMyFault said:

 

  1. I still need to figure out when it toggles from correct (as before) to unusable.

The trigger condition is simple:

If mask is full black: TGA export is broken (mask is ignored, export is fully opaque).

If mask is not fully black, but is only non-black where the pixel area is black: The exported TGA does not allow to recover RGB pixels. all RGB values get zeroed out.

You may have any number of black mask pixels but you need at least one single pixel which is both not black in RGB channels and not black in alpha channel. Then the exported TGA file can be fully recovered in RGB channels.

 

Tested on Mac with Photo V2. You milage may vary on iPad or V1

 

 

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

I spent a few hours testing lots of combinations, and documented my results in the forum.

Your screenshots show that you did not follow the tutorial exactly, and deviated in many relevant aspects:

  • tutorial says exactly two layers, pixel on bottom, mask on top.
  • you used a group of vector shapes, and placed a rectangle with channels mixer below.

This is not to blame you, just an observation and my conclusions. It is too time consuming for me to reverse engineer your edit steps and guesstimate your intentions. Please try it again on your own, following exactly the steps as described. 

From older discussions i know that many new Affinity users perceive this learning curve as too steep, and i understand this. If your time is worth more than 200 bucks per year for Adobe, make a wise decision.

 

 

 

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.