UE1 - UT Trying to get black pixels to not be transparent on a flag.

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Helen

Member
Jan 23, 2010
48
0
6
Hello.

I have a texture I want to put on a flag, however all the black pixels are drawn as transparent. I just want them to be black.

The default Style for the flag (the CTFFlag class) is STY_Masked, I have tried setting that to STY_Normal, didn't work.

I load the texture dynamically, so I tried setting its bMasked property to false, didn't work.

Code:
local Texture t;
local CTFFlag f;

// assume flag has been spawned

t = Texture(DynamicLoadObject("myTexPackage.myTex", class'Texture'));
t.bMasked = false;
f.Skin = t;

As an experiment only, I tried an exec line to get texture in to see if setting the properties this way would work, but it did not (not that I will be doing it this way, I'll be loading it dynamically).

Code:
#exec texture IMPORT NAME=r0 FILE=TEXTURES\myFlag.pcx Mask=off Flags=2

I experimented with the texture itself by using it on a sheet brush in the editor, and the black drew black, so it's not the texture.

Does anyone have any suggestions?

Thanks.
 

Wormbo

Administrator
Staff member
Jun 4, 2001
5,913
36
48
Germany
www.koehler-homepage.de
Meshes can override various texture properties for certain surfaces. There's not much you can do about that. As for masked textures - how about modifying the texture so the black on the texture isn't entry 0 in its palette? (Masked textures don't make black transparent, but the first palette entry.)