The Transparancy In Alien Textures.
Bronto
Join Date: 2002-10-24 Member: 1583Members
For some reason the alien_alpha1 and alien_alpha2 textures will not go transparent in the blue parts.
(Yes, they are funct_wall entities and have rendermode to solid and FX amount to 255)
I even opened them up in wally to see if the blue was actually the right shade of blue, and they were.
Is there some simple reason as to why I can not make the blue in these textures transparent? I can do it with other ones, but not the alien hive textures. The seem to work in the official maps, anyone know if I am doing somehtign wrong?
(Yes, they are funct_wall entities and have rendermode to solid and FX amount to 255)
I even opened them up in wally to see if the blue was actually the right shade of blue, and they were.
Is there some simple reason as to why I can not make the blue in these textures transparent? I can do it with other ones, but not the alien hive textures. The seem to work in the official maps, anyone know if I am doing somehtign wrong?
Comments
Thank you for going out of your way to fix that for me.
Really.
A note on both the {alien_alpha2 and {somealientext textures: in their palette they've got entries which color is very close to the color of the last palette entry. As a result of this the submips of both of these textures have visible black/blue in them. To prevent this from happening, make sure there are no entries which color is close to the last entry. The easiest way to do that is to use a different color, like pink, for the masked part and change that to blue right before importing the texture into Wally, but after reducing the color depth to 256 colors. This will also make color bleeding into the texture appearant
I'm sure there's a simpler way of saying this all, but alas, simple talk isn't my strongest asset.
I'm trying to attach both fixed textures...
Darn, just a few bytes too big. Part 1 then.
Part 1, second attempt
[edit]Oh, and btw Bronto,
the reason the original textures don't work is because they don't have the { prefix[/edit]
OK, take 2 at explaining:
Each texture inside a wad also has 3 submips. These submips are smaller versions of the original texture (with each dimension 1/2, 1/4 or 1/8 of the original texture) that are displayed by Half-Life when the texture becomes further away from the player.
The submips are created automaticaly by wally when a texture is imported into a .wad file. In the process the original texture is "resampled" to half, quarter and 1/8th it's size, like you would with any other paint program. Since the texture has a fixed palette of colors these colors will also be used for the submips. During this process Wally will attempt to create smooth color transitions between the pure blue (last palette entry) and the surrounding.
If a blueish palette entry is available he will use it along the edges of the pure blue areas.
If no blueish palette entry is available he'll be forced to use either the surrounding color (green in this case) or the pure blue color.
In both cases there won't be blueish colors surrounding the pure blue.
When the submips of a partially transparent texture are displayed only the pure blue part will be invisible. If there are blueish pixels around this, they will be visible.
So to sum it all up: make sure there are no "blueish" palette entries in the texture. Even if they aren't used by the texture the submips will use them.
The best trick to make sure of that is to first use a different color then blue, which also isn't used in the texture, to mark the transparent parts. Pink (255 0 255 RGB values) usually is a good choice.
Then use Wally to import this texture into a .wad file. At this time the submips are created. Since there are no near pink palette entries the submips will have a sharp transition between pink (transparent) and the non-transparent part of the texture.
Now edit the palette to turn the pink into pure blue (technically not required, but it's standard for Half-Life) and use "translate colors" to make sure it's also the last palette entry.
Save the texture with a { prefix and it's ready to go.
If any pink <i>did</i> leak into the submips or the original texture it will be apearant in wally, since the transparent part is now a very different color.
So the problem with Jobabob's texture is that although he removed the blueish "lining" around the transparent parts of the original texture and added a { prefix, there still are blueish linings in the submips.
Reading it all back I see it still isn't very easy to read, but all the information should be there. If anyone still has questions, carefully read through this entire post before posting what you don't understand / think is wrong.
<i>The problem with Jobabob's texture is that although he removed the blueish "lining" around the transparent parts of the original texture and added a { prefix, there still are blueish linings in the submips.</i>
As an example I changed the color of Jobabob's texture's last entry to yellow, showing the blue lining in the submips.
I then exported the exact same texture, opened with Wally, turned the last entry to pink, imported in the .wad file and turned the entry to yellow (to show the difference, normally it would be blue).
The difference isn't large, but very noticable in-game.
(let's hope the attachment works this time).
Jobabob, I can't see the blue lining at all for the smaller mipmaps when I am that far away, they are probably like 1 pixel <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo--> so they work great. Thanks.
And Wolv, thanks for the info, I didn't know that. I guess it would be more evident with a different texture.