Index Colour Palette
Little info on how the index colour mode works with HL1 textures.
Index colour allows you to have a set number of colours, which you can alter. With the HL1 engine you can only use a 256-colour palette per texture. Each colour you use will get a number in an index list, starting with colour number 0 and ending with colour number 255. If you use fewer colours then 256, then the rest of the spaces in the list will be filled, probably with just blacks.
The colour with the red square is index number 71 for example. (Screenshot from wally)
Because each colour used gets an index list number, each colour is unique to the computer, even if all 256 colours are the exact same colour values (256 blacks at R=0 G=0 B=0 for example).
Transparent textures (Alphatest ones)
that use the strong blue at the end, really only use colour number 255 in the
index list as transparent. So only using a strong blue (R=0 G=0 B=255) to be
the transparent parts will not make it work, as you could have several strong
blue colours with that same RGB value in the colour palette list.
This means you can use any colour to be transparent, as long as it is the last colour (No 255).
This even means it can be the same colour or RGB value a colour already used as it has a unique index number.
As there is no compression with HL1 textures, the file remembers the RGB values of each colour. This means that a 128x128 rainbow texture with a full 256 different colours or RGB values will be the same file size as a 128x128 full black texture.
Yup a wad of 16 different crazy rainbow
textures at 128x128 pixels is the same file size as a wad with 16 less-then-crazy
full black 128x128 pixel textures for example.
Quick HL/CS Transparency terms:
Additive Transparency – The darker colours in the texture are the most transparent, black being fully transparent. Very good for cobwebs.
AlphaTest Transparency – 255 colours, last extra colour is the transparency mask. Good for railings and vents.
IndexAlpha Transparency – 255 ‘colour’ Greyscale texture, last extra colour is the overall colour. Used for decals.