Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: zookeeper on March 10, 2011, 07:18:48 am

Title: Using a -trans texture
Post by: zookeeper on March 10, 2011, 07:18:48 am
As a workaround for a certain problem (http://www.hard-light.net/forums/index.php?topic=74929.0), I've been trying to get a -trans texture (http://www.hard-light.net/wiki/index.php/Texturing#TextureName-trans.xxx) to work. However, no matter what I do, it won't show up in-game, nor does debug output ever indicate that it's been loaded. By grepping the source I found a few references to such textures though, so I'm not sure what the deal is with them. Has anyone successfully used a -trans map, and if so, was anything special required to get it to work? Can someone confirm whether they are indeed supposed to be supported or not?

Secondly, I don't even know what the format should be, as in what determines the level of transparency? Is it the alpha channel? RGB intensity? Green? Something else?
Title: Re: Using a -trans texture
Post by: headdie on March 10, 2011, 08:18:07 am
Quote from:  FS Wiki
TextureName-trans.xxx
This enables the transparency for the map of the model, once again using the UV’s for the model. Map in question can also be set as -shine or -glow map (for example TextureName-trans-glow). Unless more info is stated, this kind of texture is deprecated or useless. Transparency is currently set through alpha channel (see further below).

according to the link you gave -trans textures are depreciated and you should use the alpha channel in a format like DDS in a regular texture.
Title: Re: Using a -trans texture
Post by: zookeeper on March 10, 2011, 08:23:50 am
according to the link you gave -trans textures are depreciated

Obviously it does, but I'm asking if that's the case or not.
Title: Re: Using a -trans texture
Post by: Dragon on March 10, 2011, 09:34:28 am
It might have been removed and I didn't seen it in any mods.
If there's a problem that may require usage of -trans texture, I think that putting back the support for it would be a good idea.
Title: Re: Using a -trans texture
Post by: zookeeper on March 12, 2011, 02:08:33 am
Sooo... I searched around a bit more and stumbled upon this post by taylor (http://www.hard-light.net/forums/index.php?topic=37158.msg938167#msg938167). It suggests that I actually need to rename the base texture (both the file and the reference in the .pof file), and... well, it works!

I updated the wiki to clarify that (http://www.hard-light.net/wiki/index.php?title=Texturing&diff=33769&oldid=32939), since it didn't really say that you need to do it completely differently than the other textures.

Great feature. Please don't remove it. ;)
Title: Re: Using a -trans texture
Post by: Dragon on March 12, 2011, 03:26:39 am
It seems like SoL is using it, which should prevent it from being removed.
Also, it could allow for really, really awesome effects if it works like that.
I think that Spoon could experiment with this in WoD. For example, I noticed that Fura'ngle ships look better with "transparent" box checked in F3 Lab, because without it, some parts that are supposed to be transparent still obscure others (but not the background), due to a quirk in the way model hierarchy works.