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

Alpha channel packed without destroy color data


Recommended Posts

We have been asking for years to edit textures for videogames to be able to save the alpha in a tga, png or tiff... without destroying the rest of the RGB channels info and we still have no answer to the only thing that prevents us from using Affinity for videogames.

Simply that alpha does not destroy the color information in those formats. We can't work with Affinity, we can't export our work to a game engine. I don't understand how we don't have that but then you put us a normals map filter...

Link to comment
Share on other sites

I haven't bought v2 yet, has anything else about alpha handling improved? ( I hate how it's impossible to make affinity treat alpha channel like "just another channel" ).

It's one of the reasons I can't commit to Affinity Photo for all my work. It feels silly to do 90% of my work happily in Affinity and the open a web app like photopea.com so I can do some basic alpha channel editing.

With the normal map editing obviously throwing a bone towards game dev / cg artists, easy alpha editing is MUCH MORE of a must than normal map tweaking.

Link to comment
Share on other sites

I'm for.
Meanwhile, you can try this method, I have been using it since version 1.8


APhoto_TGAalpha.thumb.jpg.43388d4a756ca78692d0f6b73a36b65c.jpg

Preparing the TGA file for editing
Move the alpha channel to the new mask layer.
1. Open the file for editing and make sure the document background is transparent.
2. Select the background layer in the Layers panel.
3. Create a mask from Background Alpha in the "Channels" pane.

Removal of the original alpha and discovery of RGB pixels:
4. Select the Background layer again;
5. Select the fill option for "Background Alpha" in the "Channels" pane.
6. Now you can hide the mask layer and check if information in RGB channels is preserved.

Editing the mask.
7. After the mask layer is displayed again, you can start editing.

ATTENTION!!!!!!!
Keep the mask position on the top layer and under no circumstances merge it with other layers or flatten the file before exporting. In Affinity Photo, it seems that masks remove information about other channels from the layer they are pinned to, so be sure to keep the mask on a separate layer.

Export to TGA
8. Make sure the background is transparent in the export options.

When re-editing the file, follow the instructions provided.
Unfortunately, working in this way is a bit tedious but not impossible.
You can speed up the preparcess by using macro.

Textures.afmacros

Edited by ArturM
Link to comment
Share on other sites

22 hours ago, AcidArrow said:

I haven't bought v2 yet, has anything else about alpha handling improved? ( I hate how it's impossible to make affinity treat alpha channel like "just another channel" ).

It's one of the reasons I can't commit to Affinity Photo for all my work. It feels silly to do 90% of my work happily in Affinity and the open a web app like photopea.com so I can do some basic alpha channel editing.

With the normal map editing obviously throwing a bone towards game dev / cg artists, easy alpha editing is MUCH MORE of a must than normal map tweaking.

Yeah, obviusly the normal map filter is a god idea but it is a strange workflow, but the alpha channel is a basic, is like have layers...

Link to comment
Share on other sites

On 11/10/2022 at 8:20 PM, ARTurek said:

Meanwhile, you can try this method, I have been using it since version 1.8

Excellent description.

would you mind copying this as tutorial in the tutorial section? Makes it easier to find.

I think we can even extend this method to allow full edit of the mask as pixel layer:

  • instead of a mask layer, simply create a pixel layer,
  • add a channels mixer adjustment
  • Map one or all color channels into the alpha channel
  • i will check if this works later

PS: it does not work. Mask layers have one special property not available by pixel Layers.

  • masks can simply replace the alpha value of all layers below. No blend formula is applied, the RGB values stay as before
  • transparency is treated specially for masks: the transparent background shines through
  • Pixel layers, even with nested adjustments on alpha, enforce blend formula and will produce black color where alpha was 0.

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.

 

Link to comment
Share on other sites

I would like to add, that while the workaround existing is nice, it is a hard sell to anyone wanting quick and easy alpha editing.

I tried to workaround, it's nice, but I still open photopea to edit my Alphas.

For whatever it is worth, the alpha editing issue is the one thing that is stopping me from openly and freely suggesting Affinity Photo to other gamedev people. And I don't think linking them to a tutorial when they ask if you can edit alpha maps is doing affinity any favours (it makes the software seem a lot more complicated than the competition, and that's not really true).

Link to comment
Share on other sites

On 11/18/2022 at 3:15 PM, NotMyFault said:

Excellent description.

would you mind copying this as tutorial in the tutorial section? Makes it easier to find.

I think we can even extend this method to allow full edit of the mask as pixel layer:

  • instead of a mask layer, simply create a pixel layer,
  • add a channels mixer adjustment
  • Map one or all color channels into the alpha channel
  • i will check if this works later

PS: it does not work. Mask layers have one special property not available by pixel Layers.

  • masks can simply replace the alpha value of all layers below. No blend formula is applied, the RGB values stay as before
  • transparency is treated specially for masks: the transparent background shines through
  • Pixel layers, even with nested adjustments on alpha, enforce blend formula and will produce black color where alpha was 0.

I didn't put my entry in the tutorials because I thought a similar one already existed.

I prefer to stay away from the Alpha channel. The Alpha channel behaves very strangely and is the only channel that needs the eraser to edit. While the brush only affects the selected channel, the eraser does not. When the eraser reaches full black, it starts affecting all other color channels and removes information from them.
I definitely prefer masks on separate layers. Their editing is much more intuitive and I don't need an eraser. I hold [alt] and click on the mask layer to enter mask edit mode. In the mask mode, I have a preview and can edit it like normal channels. Interestingly, all RGB channels are affected simultaneously, but not channel A. In the mask, this channel is not editable.

Link to comment
Share on other sites

You are right, but there is a different set of issues when using explicit mask layers instead of inherent mask layers:

  • nested adjustment and filters may create surprising results
  • when nesting or grouping layers, Affinty has some limits where it hides nested layers, making it impossible to tweak those layers settings (e.g. when trying to blur a nested mask layer with minimum live blur)

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.

 

Link to comment
Share on other sites

22 minutes ago, NotMyFault said:

You are right, but there is a different set of issues when using explicit mask layers instead of inherent mask layers:

  • nested adjustment and filters may create surprising results
  • when nesting or grouping layers, Affinty has some limits where it hides nested layers, making it impossible to tweak those layers settings (e.g. when trying to blur a nested mask layer with minimum live blur)

This shows there is a problem. I'm curious how and when it will be solved by Serif.

Link to comment
Share on other sites

On 11/18/2022 at 3:22 PM, AcidArrow said:

For whatever it is worth, the alpha editing issue is the one thing that is stopping me from openly and freely suggesting Affinity Photo to other gamedev people...

I understand your point of view and I'm not surprised at all. I have a similar dilemma myself.
For texture editing, I prefer to recommend software created for this purpose. AP can only supplement such a program, but it will never reach the same level because it is not designed to do so. An example here is Quixel Mixer. But gamedev is not only about textures

Link to comment
Share on other sites

  • 11 months later...

The method in general works for all file formats, but tiff is special as a container format with a huge variety of individual content types. 
 

Do you have an example file?

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.

 

Link to comment
Share on other sites

  • 1 month later...

PhotoPea on the left, affinity on the right. Both are showing the red channel.

image.thumb.png.a6117eb105cf83519e27252534f982c1.png

Affinity apparently destroys the color data immediately upon loading.

I can open a tga with alpha in affinity, do nothing, save, and the color channels will have changed drastically.

This is a bug, it needs fixing.

Link to comment
Share on other sites

16 minutes ago, AcidArrow said:

I can open a tga with alpha in affinity, do nothing, save, and the color channels will have changed drastically.

You need to recover RGB channels by the method described here:

only 2 steps, can be recorded as macro and assigned a keyboard shortcut.

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.

 

Link to comment
Share on other sites

9 hours ago, AcidArrow said:

Affinity apparently destroys the color data immediately upon loading.

No. There are only „potentially lost“ if you don’t use the method described above, and export the file.

9 hours ago, AcidArrow said:

This is a bug, it needs fixing.

Affinity stated consistently it does work as designed. This thread is a feature request, and it will become more likely to getting implemented if more users add their vote and provide arguments how this would improve their workflows and why workarounds are not sufficient.

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.

 

Link to comment
Share on other sites

  • 1 month later...
On 1/15/2024 at 11:36 PM, NotMyFault said:

No. There are only „potentially lost“ if you don’t use the method described above, and export the file.

Affinity stated consistently it does work as designed. This thread is a feature request, and it will become more likely to getting implemented if more users add their vote and provide arguments how this would improve their workflows and why workarounds are not sufficient.

Quick alpha edits are a pain, quick RGB edits when alpha is present are also a pain because Affinity might destroy RGB data if the alpha dares to have zeros in it.

I understand workarounds exist, but I'm not going to add 10 steps to what should be super simple.

As it is now, opening a .tga file with an alpha, doing a quick color adjustment and saving -> results in RGB data loss, unless I add 10 more steps.

As it is now, opening a file with an alpha and wanting to do a quick couple of brushstrokes in the alpha channel and save, is impossible, unless I add 10 more steps.

I consider the current behaviour a bug, there is such thing as buggy design. But sure, let's call it a feature request, it's semantics. The thing that is 100% sure is that this is a problem.

Because otherwise, they might as well add a section to their docs called "How to deal with the alpha channel" that just has a link to photopea and nothing else.

Link to comment
Share on other sites

Hello there !

I'd like to point up how RGBA channels are handled. I'm a game artist who is used to heavily work with channels and being able to copy/paste to swap them, get data, transfer from one texture to another is crucial. And I work my 2D source files either in .PSD or .TGA, so import/Export should be seamless and without any compression. 

Please improve how channels are imported when an alpha channel is there (currently it destroys data and using a complex workaround is not a great solution. At least it shows how much we need it)
Please also reach at least what photoshop do with channels pannel (copy/paste, display, ux design). I'm not against a better-than-photoshop pannel of course, but until then, a simple copy would greatly help :)

Edited by Vexod14
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.