Jump to content

How to Edit the Alpha Channel


Recommended Posts

5 hours ago, jamie_c said:

have found some continuing issues with the Alpha channel bleeding through and modifying the RGB channels using channel packing

Welcome to the Affinity forums :)

Something that works currently (AP 1.9.3), is to ensure an object that represents alpha is at the top of the stack when you export to an image file.

That object can be a Pixel Mask or it can be anything with its intensity inversely mapped to opacity (black through white mapped to opaque through transparent) and blend mode set to Erase. The mapping can be done with a downward ramp in the left-hand graph of the object's Blend Options.

Below are 3 documents which all export to PNG without RGB being destroyed where alpha is zero.

1.  alpha by erasing.afphoto

1722849065_Screenshotalphabyerasing.thumb.png.bda545a8325c82925d05345bd13a4df0.png

 

2. alpha by erasing (simplified).afphoto

673136761_Screenshotalphabyerasing(simplified).thumb.png.c50b8938ffd9338897446bb66047eec6.png

 

3. alpha by masking.afphoto

1439867314_Screenshotalphabymasking.thumb.png.f0ca5c8a42fbcff2dbb41e78fe462aab.png

 

Screenshot of a PNG that was exported from from "alpha by erasing.afphoto": 

1567030312_ScreenshotofanexportedPNG.thumb.png.9364c48cf3c6f861f0dfccce2305cfb9.png

 

Screenshot of that PNG after filling alpha to prove the RGB was not destroyed:

1283376507_ScreenshotofanexportedPNGwithitsalphafilled.thumb.png.7a866f1d05e5acc4650a22e52fc94287.png

 

 

 

Link to comment
Share on other sites

@anon2 thanks for that, and it works. I think I may have stumbled on this in my first test, but not the ones that followed. I probably found every other way that doesn't work in the process. I was thinking about writing a script to solve the issue external to AP if needed.

That's one less mark against AP!

Link to comment
Share on other sites

  • 1 month later...

@anon2 thank you! It's not bad and works for my pipeline. There is only one thing that is not very pleasant: alpha channel packs separately only in TGA (I mean the algorithm when you can open saved file in Photoshop and see alpha in the stack of channel without been hidden in Transparency). So I need to convert this TGA to TIFF via other soft each time cause it's very import for the resource compiler of the engine I work with. But you are right, it can be saved with alpha and without damage for the main channels now. And now it makes sense to at least start working with Affinity. So thank you again.

Link to comment
Share on other sites

  • 2 weeks later...

Hey, so it's been well over 2 years since affinity users have tried to make the devs aware that alpha editing is stupid in affinity photo, is there any progress to speak of on this? I'd 100% pay for a v2.0 update, even if the price was doubled, if I could edit channels as simply as photoshop and save non-destructively into 32bit TGA. Some rather basic functions for such an advanced piece of software. :) 

Link to comment
Share on other sites

  • 1 month later...
42 minutes ago, Dbrebner said:

Surely when the channel tab is active and the layer is selected with the alpha channel set to view and edit - it should be simple to allow the painting tools to operate on this channel with a color other than white just like it works on the other color channels?

Why? You only need white to hide parts in the picture. Other color has no effect.

AMD Ryzen 5 5600G | 32 GB DDR4 3200MHz | Sapphire RX 5600 XT 6 GB | Windows 11 Pro (22H2 Build 22621.436)
Affinity Suite V1.10.5.1342
Better translations with: https://www.deepl.com/translator  
SVG preview in Windows Explorer with "SVG-See  Download SVG-See

Those who want to achieve something are looking for solutions,
the others always see only the problem.

Link to comment
Share on other sites

45 minutes ago, MattyWS said:

I mean, you need every shade from black to white but I'm assuming you meant that.

Sure, but the question was, why no other color can be used. And the answer is, all other colors as black and white (and the shades between)  makes no sense.

AMD Ryzen 5 5600G | 32 GB DDR4 3200MHz | Sapphire RX 5600 XT 6 GB | Windows 11 Pro (22H2 Build 22621.436)
Affinity Suite V1.10.5.1342
Better translations with: https://www.deepl.com/translator  
SVG preview in Windows Explorer with "SVG-See  Download SVG-See

Those who want to achieve something are looking for solutions,
the others always see only the problem.

Link to comment
Share on other sites

40 minutes ago, Komatös said:

Sure, but the question was, why no other color can be used. And the answer is, all other colors as black and white (and the shades between)  makes no sense.

It seems reasonable to expect that any colour can be used, with the app automatically desaturating whatever colour the user chooses.

Alfred spacer.png
Affinity Designer/Photo/Publisher for Windows 1.10 • Windows 10 Home/Pro
Affinity Photo for iPad 1.10 • Designer for iPad 1.10 • iPadOS 15.6 (iPad Air 2)

Link to comment
Share on other sites

  • 1 month later...

In the current version 1.10.1.1142 it is still not possible to conveniently edit any single channel. Even inverting on channel does not work. The channel's Editable has basically no function, if unselected, still all channels are drawn on, even with a grayscale brush or other workaround mentioned in this lengthy thread, nothing works reliably or is close to convenient. I can understand that copy&paste into channels is a bit more challanging, but with what is there now, it seems fairly doable:

Copy&Paste: If you copy a grayscale, it should be pasted in each Editable channel. If you copy multiple channels like RGBA, the channel order (Red on Red, Green on Green...usually) applies. Again the Editable selection on each channel applies, only pasting the channels that have Editable enabled.

Link to comment
Share on other sites

On 9/16/2021 at 3:10 PM, ambersand said:

In the current version 1.10.1.1142 it is still not possible to conveniently edit any single channel. Even inverting on channel does not work. The channel's Editable has basically no function, if unselected, still all channels are drawn on, even with a grayscale brush or other workaround mentioned in this lengthy thread, nothing works reliably or is close to convenient.

Hi, 

cannot reproduce these claims.

  • Every channel can be inverted individually using the context menu of the channel
  • When having only one channel active for editing, a brush impacts only the editable channel

Tested on iPad, and this always worked on PC.

Otherwise, i agree that channels editing is overly complicated and the opposite of intuitive.

Especially live adjustments and filters cannot be restricted to individual channels.

 

 

Link to comment
Share on other sites

1 hour ago, NotMyFault said:

cannot reproduce these claims.

  • Every channel can be inverted individually using the context menu of the channel
  • When having only one channel active for editing, a brush impacts only the editable channel

Tested on iPad, and this always worked on PC.

FWIW, I get the same thing on the current Mac version. Inverting a channel causes an extreme, impossible to miss change in the document. Brushes affect only the editable channel(s); although depending on the document & the brush used, the effect can be subtle.

Affinity Photo 1.10.5, Affinity Designer 1.10.5, Affinity Publisher 1.10.5;  2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.5.280 & Affinity Designer 1.10.5 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.0.2

Link to comment
Share on other sites

  • 4 weeks later...

Is there any indication from the devs that this whole area of channel editing and manipulation will be improved?

My work centers around 3D CGI and I use a lot of channel manipulation. Affinity is good in the area of 32bit work, and I'd like to use it more, but working with channels feels about as enjoyable as booking an appointment at the dentist...

 

Link to comment
Share on other sites

On 9/27/2019 at 1:46 PM, Patrick Connor said:

@efflam & @tazcebula

Welcome to the Serif Affinity forums :) 

Agreed, but that has not been our target market so far, sorry. Better tools to edit the alpha channel directly will be needed before Affinity Photo would be more suitable for the parts of the games industry that reply on TGA-alpha for texture storage. I would not say it "makes no sense at all", it's just not right for your particular use.

Massively disagree here. The Affinity suite was marketed toward a few things, like photo editing, illustration, heck making magazines, printing and also game development. I’ve seen Affinity advertised for game development. But that aside, the general idea of affinity photo is literally image manipulation and we can’t really manipulate 1/4th of our images, and it’s pretty sucky trying to edit the other 3/4ths of our images too. I’m talking about channels here, RGBA. We should be able to edit them easily. Currently photoshop does this better but we want to be able to use affinity instead. The pushback is astounding to me because if I were you guys, I’d certainly want to accommodate the entire photoshop target audience. 

Link to comment
Share on other sites

  • Moderators

Fair point @MattyWS it's not ideal given that tweet. I will discuss with the marketing department and development this inconsistency.

Gaming newbie question... correct me if I'm wrong here please.... We're treating alpha as "alpha" (opacity/transparency). Because 4 channels is all that was available for many years the games industry packed that 4th channel with non-alpha information as a neat place to hide texture information and now that creates a requirement the ability to manipulate that channel independently and export as-is. So what happens to actually alpha when feathering edges and using blend modes. Isn't it better to have a 5th channel for texture and choose to output it as 'a' in a 4 channel rgba file (ignoring the alpha at export but using it in normal on screen processing) or can you manage without a real alpha for your work, so don't need/use that 5th channel?

Patrick Connor
Serif Europe Ltd

"There is nothing noble in being superior to your fellow man. True nobility lies in being superior to your previous self."  W. L. Sheldon

 

Link to comment
Share on other sites

5 minutes ago, Patrick Connor said:

Fair point @MattyWS it's not ideal given that tweet. I will discuss with the marketing department and development this inconsistency.

Gaming newbie question... correct me if I'm wrong here please.... We're treating alpha as "alpha" (opacity/transparency). Because 4 channels is all that was available for many years the games industry packed that 4th channel with non-alpha information as a neat place to hide texture information and now that creates a requirement the ability to manipulate that channel independently and export as-is. So what happens to actually alpha when feathering edges and using blend modes. Isn't it better to have a 5th channel for texture and choose to output it as 'a' in a 4 channel rgba file (ignoring the alpha at export but using it in normal on screen processing) or can you manage without a real alpha for your work, so don't need/use that 5th channel?

I'm not sure I fully understand but, in cases with VFX textures R G B and A can be used as individual greyscale images that can be used in game engines and such, but also in the case with GUI work in games, applications and TV is that say you have an icon or logo, you'll want to edit the RGB as if there were no transparency, and the A channel would be used in whatever application/shader to create the transparency to avoid any bleeding because depending on how the image gets exported from photoshop/affintiy it could remove colour information from the RGB channels where the alpha channel is pure black, (which is ideally not what anyone wants in this case). 

Take this texture for example, the person who created this image filled the outer areas with an average green colour and wants that colour information to be retained so the alpha channel in an external application (like unity or unreal) can simply use the alpha channel as a way to mask the area out, but when viewing the texture from a distance the texture will mip out (get smaller in pixel size). if the outside area if this texture was pure black or pure white instead of green, then from a distance you'd get a white or black outline around all your tree leaves. 

Ether | WPG | wz::Projeto Final::Estilo | Pinterest | Hand painted textures, Paint texture and ...

Likewise, the alpha channel may not simply be a black and white mask, it might be a gradient from black to white so the person making the shader can use that to tighten or widen the alpha with the shader. artists and graphic designers need full control over each individual channel for this reason, and each channels information needs to be retained on export. 

That said I've just decided to do any texture packing in substance designer now because that *does* retain all the information in channels and I can just make seperate greyscale images in affinity photo if need be, save them out as bitmap/whatever and import to designer to pack... it's not super ideal though and not everyone uses substance designer/wants to use another expensive application to do basic stuff like this.

thats probably a tangent to what you're talking about though, do you mean to effectively keep affinity photo much the same and just use a 5th channel as the 4th on export? If so this doesn't solve the issue of channels being difficult to work with. I'd say why even have channels exposed in the UI of affinity photo if they aren't meant to be edited? 

Link to comment
Share on other sites

10 hours ago, Patrick Connor said:

Isn't it better to have a 5th channel for texture and choose to output it as 'a' in a 4 channel rgba file (ignoring the alpha at export but using it in normal on screen processing) or can you manage without a real alpha for your work, so don't need/use that 5th channel?

To generalize this even further, combining with other feature requests:

  • Users need the option to select which channels get impacted by a operation, including live adjustments and filters, and if a channels is treated as "color" channel or "alpha" channel.
  • Today you can use channels panel to select which channels get impacted by a limited set of destructive brush / fill operations, but its unavailable for all live layers.
  • Layer blending is brutally applying the defined formula to RGB and A. No way do choose, e.g. selectively say which channel undergoes color blending, and which undergoes alpha blending. Need an option to chose.
  • Need a kind of live "apply image" with the option to define own blend formula, individual for every channel.

 

Link to comment
Share on other sites

I think it's a stretch to say it's dead. we do need to have the ability to edit channels but the affinity devs are notoriously stubborn when you're wrong about stuff, seem to really double down/ignore feedback... But the software is still nice and it can still mostly replace photoshop. 

I've just started doing channel packing in substance designer instead. It's a faf that I cant use Affinity but if the devs want to go out of their way to make the software awkward to use them what you gunna do?

Link to comment
Share on other sites

I don't know when this functionality has been introduced, i never recognized this before, and others may have overlooked it, too.

When you left-click on a spare channel in the channels panel, the current image gets temporary replaced by that spare channel, and you can directly edit the channel with regular edit tools (blur, sharpen, brush, ...). This is similar to isolation mode for mask layers.

I know, this does not give a major part of the desired / request functionality of the thread, but every little steps help.

The help file doesn't explicitly list that function (only right-click)

https://affinity.help/photo/English.lproj/pages/Panels/channelsPanel.html

Link to comment
Share on other sites

1 hour ago, NotMyFault said:

I don't know when this functionality has been introduced, i never recognized this before, and others may have overlooked it, too.

When you left-click on a spare channel in the channels panel, the current image gets temporary replaced by that spare channel, and you can directly edit the channel with regular edit tools (blur, sharpen, brush, ...). This is similar to isolation mode for mask layers.

I know, this does not give a major part of the desired / request functionality of the thread, but every little steps help.

...

Yes. But this funtion is limited to the RGB channels. Alpha is not working this way. And you can't copy/paste directly into channels.

Link to comment
Share on other sites

5 hours ago, Christoph Werner said:

But this funtion is limited to the RGB channels. Alpha is not working this way.

now you are confusing me.


I was talking about spare channels. These are neither RGB or Alpha, but can be transformed by one-click actions from and to any other channel type.
 

5 hours ago, Christoph Werner said:

And you can't copy/paste directly into channels.

The difference between copy/paste and create spare channel / load to layer <choose you channel> is not that huge.

 

Link to comment
Share on other sites

11 hours ago, NotMyFault said:

now you are confusing me.


I was talking about spare channels. These are neither RGB or Alpha, but can be transformed by one-click actions from and to any other channel type.
 

The difference between copy/paste and create spare channel / load to layer <choose you channel> is not that huge.

 

Sorry. My fault.

Hint: But you don't need a seperate spare channel to edit a RGB value. Just click on one of the RGBA channels and you can paint on it.

The main problem, that is described but missed in the meantime, is the missing of the possibility to work directly in an alpha channel if it was a regular image layer. I mean to paint, use (most) filters or copy image data into it etc. This is something that is working completely different in Affinity Photo and very complex to understand for people. Too much steps to simply edit an alpha channel. This works more intuitive and better in other software.

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.