Hi, I have a question about masked textures in classic Unreal Tournament. I've read that if a texture is imported as masked, color index 0 is set as transparent.
I've tried to import some textures to Unreal Tournament using this feature, but the only textures that show up with transparency in game are the Chat icons I made. However, I also want some parts of the actual skin to have transparency.
So, here's my question: Is it possible to have textures with transparency on UT player models? Should I write a script file or is there something else I should do to get it to work? I have no idea why it works for chat icons and not for the other textures I tried to import.
Replies
Since the textures are for a custom model I'm trying to import, I'm trying to find a way to do this.
I have a small utility at home which lets you set all the various flags on a UT model. I'll be home in about 10 hours, I'll see if I can find it and i'll mail it to you. Whats your email address?
Never mind, got your email addy from your profile.
I dont know what version of MAx your using but this might be of interest:
http://www.planetunreal.com/fordy/eeroks.htm
Sorry for my late reply I was away for a short holiday this weekend. It would be cool if you could sent the zip file to |e-mail adres removed|
I exported the model from Milkshape to UT's Skeletal format (.psk), so I didn't have to animate the model myself and could use the animations included in the Advanced Models Support add-on. However, UnrealFX can only import and export UT's _d.3d format, so I couldn't use that tool to change the face flags, and Milkshape has no support for it at all. I searched the web for other tools to do the job, but they all needed Windows 2000 or Windows XP and I'm still using Windows ME.
Anyway, I did find the following workaround:
Because the model was imported with Advanced Model Support, I could add the following piece of code to my Skin info file:
<font class="small">Code:</font><hr /><pre>static function SetFX(actor SkinActor,Class<GenericPlayer> PlayerClass)
{
Super.SetFX(SkinActor,PlayerClass);
SkinActor.Style = STY_Masked;
}
static function UnsetSkin(actor SkinActor,Class<GenericPlayer> PlayerClass)
{
Super.UnsetSkin(SkinActor,PlayerClass);
SkinActor.Style = STY_Normal; //reset to default
}
</pre><hr />
With this script the in game model had transparency, eventhough I wasn't able to set the face flags in the .psk file itself. However, the script didn't work in the player selection menu. I could solve this issue by using a separate selection mesh in _d.3d format (exported from Milkshape) in combination with UnrealFX.
It's not a pretty solution though, because it's not recommended to change display attributes with a script and I'm not sure if Valhalla Avatar supports it.
I erased all the parts of the texture that needed color index 0, using the background eraser tool - leaving them completely transparent. I then converted the textures to the indexed color mode. But before the textures are converted a menu pops up where you can change the settings: now you only have to tick the transparency option. The parts of the texture that needed color index 0 now have color index 0. Finally - you can change color index 0 to any color you like using the color table.
Another option would be Erik Neve's tool Bright 1.83 for high quality palette reduction. It's a command line tool which can covert multiple textures in one "single sweep" to 8-bit palettized format. It also supports index color 0 - it changes a specific pink color on your texture to index 0. It also has an extra option for mipmapped textures. I never used it though - because I still don't know how it works.
I really should flag those polies in the psk file, but I still haven't found a tool that would work on my windows ME system.
* Edit *
Yeah, I'm happy! I've found an experimental tool to set face flags in psk files. I had to compile it myself, but it worked. The model has working masks now. For those who are also interested in the tool, you can get it here: Download pskhack from the beyondunreal forums