voodoo47 on 29/4/2019 at 18:08
I didn't manage to find any tutorials on how to make/modify object textures with transparent parts using tools that wouldn't require a win95 virtual machine, so I've tried my luck with Gimp and found out it's actually pretty easy - as posted on (
https://www.systemshock.org/index.php?topic=10574) systemshock.org;
If you are creating or modifying object textures that have transparent parts, you might have noticed how easy it is to break them - typically, the texture will display some transparency artifacts, looking like small holes when viewed ingame. Fixing this is quite easy, fortunately - you just need to get Gimp (freeware), and follow the instructions below:
- load the texture into Gimp
- go image/mode, select RGB
- click on the currently selected color, pick a custom color, set it to ff00ff (it's what is being used by vanilla SS2 textures, so lets go with that)
- color all parts that should be transparent with this color
- go image/mode, select indexed
- set it to generate optimum palette, number of colors 254, and convert
- go windows/dockable dialogs/colormap
- rightclick on the ff00ff pixel, choose rearrange colormap, move it to spot 0, click ok
- export as gif (or pcx)
The resulting texture should have proper transparency, both under NewDark and oldDark. I'm guessing the same result can be achieved with other image editing tools as well, as long as they support all the required functionality.
Notes: if you observe similar transparency artifacts on a texture that doesn't need any transparency, saving it as png should be enough to fix it (but you could apply the colormap fix as well if you really want to, or if oldDark compatibility is required). Also, remember that all Dark textures should be (
https://en.wikipedia.org/wiki/Power_of_two) power of two sized.
it is possible that I have missed some link with an already existing tutorial similar or identical to this (as mentioned a couple of times before, the TTLG FAQs are basically unusable), but I'm pretty sure that someone will let me know in case I'm reinventing the wheel here (will delete this if that turns out to be the case).
Cardia on 29/4/2019 at 19:11
never used Gimp to do gif. textures with transparencies , i have to to try this program, png texture have a good quality but for some objects it doesn't render well, while with gif. format it always render well in newdark.
ZylonBane on 29/4/2019 at 20:32
Quote Posted by Cardia
png texture have a good quality but for some objects it doesn't render well, while with gif. format it always render well in newdark.
This is only because you have no idea what you're doing.
Cardia on 29/4/2019 at 21:49
Quote Posted by ZylonBane
This is only because you have no idea what you're doing.
I agree with you.
voodoo47 on 30/4/2019 at 08:10
not sure whether you can make indexed/paletted TGAs, or whether there is an actual reason you would want to.
Yandros on 30/4/2019 at 15:48
You can but there is no reason to. Because, unless you're building your mission using and for OldDark, there is no reason at all to use image file formats other than PNG and DDS. None.
voodoo47 on 30/4/2019 at 16:01
PNGs are not too efficient if memory serves (no compression), but that shouldn't matter too much unless you go completely bonkers with both the amount and resolution (or are running on 20 years old hardware).
but I have to admit I prefer to stay as efficient as possible, as I like to run Dark on 500MHz cpus with 16MB gpus sometimes.
ZylonBane on 30/4/2019 at 17:14
Quote Posted by Yandros
You can but there is no reason to. Because, unless you're building your mission using and for OldDark, there is no reason at all to use image file formats other than PNG and DDS. None.
I have a reason to, albeit not a great one. PaintShop Pro 7 (which I'm still stubbornly sticking with) has an unfortunate optimization with transparent PNGs. When you save them, any pixels that are 100% transparent are converted to black. This reduces the file size, but introduces a subtle black fringe around the edges when the PNG is used as a filtered texture. TGA doesn't have this problem since the alpha channel is stored as a separate layer.
As for PNG over GIF/PCX, I have a suspicion that GIF/PCX textures load faster due to the simpler format, but I've never run any tests to actually confirm this.
Quote Posted by voodoo47
PNGs are not too efficient if memory serves (no compression)
You're probably thinking of lossy vs lossless compression. PNG is lossless, but it does use the (
https://en.wikipedia.org/wiki/DEFLATE) Deflate algorithm to compress things as much as possible.
voodoo47 on 30/4/2019 at 17:26
right. not an expert in the texture field by any stretch of the imagination.