I've read that some people are finding creating transparent decals with TGAPal24to32 a bit tedious. While TGAPal24to32 is certainly cumbersome, I didn't think it was that
bad. This left me wondering if users realised that the companion utility TGAtoTiles actually works with TGA images with any
palette? - including palettes that already contain
Here's a walked example....
First I selected an image with which to decorate my Forza car:
Then I used PSP to cut out my character, resize the canvas to 512x512, reduce the palette from 16 million colours to 256, and paint the unwanted background with my chosen transparent marker colour (in this case R=0,G=255,B=0). (The magic wand selection tools was very helpful here
In the above image, note the eyedropper tooltip - it contains R=0,G=255,B=0,I=66. I
is the palette index
of the colour under the eyedropper!
Having saved my image as a 256 colour (aka. 8bit) uncompressed TGA, I exported the palette usingTGAPal24to32 -e Mario256.tga Mario256.txtMario256.txt:
Num R G B I
0 2 1 3 255
1 39 23 15 255
2 25 39 23 255
66 0 255 0 255
254 0 0 0 255
255 0 0 0 255
My chosen transparent marker colour, R=0,G=255,B=0, is right there in entry number 66 - just as PSP indicated.
I used Notepad to edit the intensity
of palette entry 66 from the original value of 255 right down to 0 (fully transparent), and saved.
I then used TGAPal24to32 -i Mario256.tga Mario256.txt
to re-inject the modified palette into the TGA. So I've only modified a single palette thus far.
ThenTGAtoTiles 128 128 Mario256.tga decal
to split out the 16 128x128 decals, and TGAtoTiles ensures each one retains a copy of the master images' colour palette, complete with its transparent entry.
So I end up with 16 decal images, all with the correct transparency, and I've only had to edit a single palette.
Edited by PedrosPad, 22 June 2005 - 08:21 AM.