skip to Main Content

I thaught they were the same.

But these days I found png and targa textures behaves differently in UE4.

Today I read something at Adobe,

Alpha channels can contain anything, while transparency is a specific channel relationship.

And it says also,

(Transparency channels) Each image pixel is represented by a set of numerical values for the visible colorants and one additional numerical value containing the opacity information.

This confused me a lot.

Do they save different data? Does alpha channel is “stronger” than transparency channel?

3

Answers


  1. with alpha channel you can edit individual color channels. Depends on the color mode.

    Login or Signup to reply.
  2. Short answer: Anything can be in the alpha channel. The name "A" or "alpha" doesn’t really mean transparency, or anything else really, it’s just the name that refers to the fourth channel of the image. So you can put anything in it, depends on what you want in it.

    Long answer, if you want to understand it in more depth, is below.

    Image channels are just a container with some data. You can have any number of channels, depending on what the format allows. For example, JPEG files can have three, PNG can have four. Some formats, like OpenEXR, which is used widely in the film/CG industry, can have very many.

    The first three channels are usually called as R, B, and G, since they’re mostly used for color images, to represent the amounts Red/Green/Blue. But of course, since they’re just data, they don’t have to represent that, you can put anything in them. For example, in a technique widely used in the game industry to optimize, people put metallic and roughness values in the first two channels, instead of Red and Green amounts. See https://www.youtube.com/watch?v=4-EsLM40_9o for more details.

    If you are creating the image, of course you can decide yourself what to put in each channel. It all depends on the use case.

    Here are some example use cases:

    • If you use your image to depict a grayscale photo, one channel can be enough. It will just represent how bright each spot of the image is.
    • If you use your image to depict a color photo, you can use three channels to depict Red/Green/Blue. This is known as additive color, since adding all of them makes white.
    • For printing a color image, four channels to depict Cyan/Magenta/Yellow/Black are used. The specific reasons why these ones, and why four, are out of scope for this question, but suffice to mention they’re known as subtractive colors, since subtracting them from white makes Red/Green/Blue/White.
    • If you want to depict a transparent colored image, the easiest way is probably go with RGB for the first three channels, and transparency in the fourth. This is the most widely used "RGBA" approach, in png and tga images for example.

    png and targa textures behaves differently in UE4

    They don’t, if all channels contain the same data. If someone put something else, apart from transparency, in the fourth channel, then they would. But so would two different png images.

    Login or Signup to reply.
  3. It seems that png allows for a different method ofr transparency
    https://www.w3.org/TR/PNG-DataRep.html

    rather than in the alpha channel like all previous file formats it uses a tRNS chunk in the beginning of the file determine transparency. Since the png was designed for web rather than print it is able to use a completely different method not based on analog techniques like the alpha channel/mask technique

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search