Transparent mosaicsI'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 transparent entries!
Here's a walked example....
First I selected an image with which to decorate my Forza car:
(IMG:http://img60.echo.cx/img60/9963/mario10247uu.th.jpg)
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

).
(IMG:
http://img270.echo.cx/img270/6663/mario2560rc.gif)
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 using
TGAPal24to32 -e Mario256.tga Mario256.txtMario256.txt:QUOTE
Num R G B I
0 2 1 3 255
1 39 23 15 255
2 25 39 23 255
<snip />
66 0 255 0 255
<snip />
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.txtto re-inject the modified palette into the TGA. So I've only modified a single palette thus far.
Then
TGAtoTiles 128 128 Mario256.tga decalto 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.
(IMG:
http://img63.echo.cx/img63/196/mariothumbspsp22df.gif)
This post has been edited by PedrosPad: Jun 22 2005, 08:21 AM