Jump to content

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

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

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

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...
 Share

×
×
  • Create New...

Important Information

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. These are the Terms of Use you will be asked to agree to if you join the forum. | 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.