0
\$\begingroup\$

I've got a file that needs to be TGA for technical reasons. In that file, I've got two boxes in the lower half, just right of center, that need transparency. One is for glass (upper, fully transparent) and one is for a "smoke" sun visor (lower, gray/transparent).

Texture

The texture already has an alpha layer. If I click "Remove Alpha Channel" then the transparent square goes white and the smoke square goes gray.

I export this to TGA, can open the TGA, it shows as transparent.

When I import the texture to Unreal, the "Has Alpha Channel" is True, but the transparent block now shows as blue for some reason, and the smoke block turns solid black.

Imported texture

I can't seem to figure out why this is happening. The best I've been able to find online is to use a PNG instead, but again I can't do that for reasons beyond the scope of this question.

I've also seen advice to tick an "alpha channel" option on export, but I have no such option when I export the file. All I get are the options for compression or no compression, and where the origin of the file is.

Export options

If this isn't possible then I can try to work around it, but I'd really like some help understanding what I'm doing wrong. I'm hoping someone here has seen this issue before.

\$\endgroup\$
4
  • \$\begingroup\$ Is this just a problem in the preview of the texture, or do you find the alpha information is missing when you sample this texture in a transparent material too? \$\endgroup\$
    – DMGregory
    Oct 23, 2022 at 11:56
  • \$\begingroup\$ @DMGregory - I think you're right, the material preview sphere shows a transparent patch where it's supposed to be. I'd like to give you some time to read this comment, so you can get some closure. Feel free to delete this question after you read or I'll come back and delete it later today. Thanks for pointing that out! \$\endgroup\$
    – Chuck
    Oct 23, 2022 at 14:16
  • 1
    \$\begingroup\$ I'd recommend posting an answer below, showing your material, rather than deleting the question. That can help other folks who are experiencing the same confusing feedback, and searching for help. As to why the preview might work this way: often the alpha of TGA files is used to represent something other than transparcency, like the smoothness/roughness of a PBR surface. So I'm guessing Unreal's texture preview defaults to that assumption, and figures you want to see just the colour channels without fading them. Some tools have a toggle for this, but I don't know Unreal 4's interface well. \$\endgroup\$
    – DMGregory
    Oct 23, 2022 at 14:30
  • \$\begingroup\$ @DMGregory Fair point, I'll post that a little later tonight :) \$\endgroup\$
    – Chuck
    Oct 23, 2022 at 20:14

1 Answer 1

0
\$\begingroup\$

:EDIT: - Here's the real cause of the issue!

The "transparent" color was solid blue, [0,255,0], with opacity set to 0. I noticed my "clear" material still had a tinge of blue, so I went back to the color and realized what's up. I'm assuming the color is showing as blue in the texture preview because Unreal isn't rendering the alpha channel in the preview.

-Original answer-

As @DMGregory hinted in the comment above, looking at the material that's using the texture made a big difference. I want the texture to be transparent, but it's showing up as blue/black when I view the texture AND when I view the material:

Opaque Material Preview

Changing the Blend Mode to Translucent seems to have correctly applied the transparencies, though. I still don't know why the TGA transparent values are showing up as blue, but if they're meant to be transparent then you need to have a translucent material.

Translucent Material Preview

Another problem I was having is that I've applied the same texture to two different materials, one that's supposed to be opaque and one that's supposed to be translucent. I would check the texture preview, see the blue, click the opaque material, also see the blue. It wasn't until I checked the translucent material that I saw it was showing transparency correctly.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .