Jump to content

PLT files


Recommended Posts

OK, right now, he's got up a hack to put a Bitmap header on these, which brings them in, but I got a completely blank red channel, a green channel which seems reasonable, and a blue channel with noise - obviously wrong.


So, I think the solution is putting a BitMAPV4HEADER in, instead; this allow specifying the alpha channel as the last 8 bits, and then I gusss a 3-2-3 or 3-3-2 mask for the first eight bits. we'll have to explore the actual mapping anyway, a header should be somewhat different. I'm testing at the moment, I'll post more in a bit.


Damnit, stupid header introduced so much crap it's not worth doing.

Link to comment

OK, definitive information of PLT file:


'PLT '

'V1 '






Followed by widthxheight byte pairs, left to right, bottom to top.

(unsigned char)intensity - Intensity 0xFF is transparent

(unsigned char)mapcolor

Colors are mapped thusly:

00 Skin

01 Hair

02 Metal

03 leather

04 Metal 2

05 Clothes - minor

06 Clothes - major

07-7F shadow (all intensities same)

80-FF repeat


The high bit seems to be an indicator, but I have not seen it used in a Bioware PLT, and it seems to make no difference.


I made a very simple converter set:



they, frankly, need a bit more smarts :-)


plt2bmp input.plt output.bmp

bmp2plt input.bmp output.plt


I create 24 bit color BMPs (which actually are BGR, bottom to top, but that's another story).

Link to comment

Although it's less than two years old, this information is now reflected in the local copy of the IESDP.


Is there any standard on the colours mapped to each material (e.g. BAM workshop shows magenta shadows and turquoise transparency, IIRC)?


I currently have:

skin - grey

hair - cyan

metal - magenta

leather 1- yellow

metal 2 - red

cloth - minor - green

cloth - major - blue

shadow - black

transparent - white

Link to comment

Well, I initially I mapped the colors in a simple manner; but as that did not match the BAM mapping used elsewhere, I put in a lookup table to map the colors the same way when I coded it.

My mapping was:

Cv[7+] = 0; //shadow (black)

Cv[0] = 00BR; //skin (yellow)

Cv[1] = 00G0; //hair (green)

Cv[2] = 0B00; //metal (blue)

Cv[3] = 0BGR; //metal 2 (white)

Cv[4] = 000R; //leather (red)

Cv[5] = 0BG0; //clothes 2 (purple)

Cv[6] = 0B0R; //clothes 1 (cyan)


I give each of the channels the same intensity, that of the pixel in the PLT file. I don't make any adjustment for the 0-254 intensity of the PLT vs. the 1-255 intensity of the BMP; so I end up making very dark nominally colored pixels the same as shadow.


When converting back, I consider a pure white pixel as transparent, a pure black pixel shadow, and then take the most intense channel and the other channels if at least half that intensity, and use the average of the channels as the intensity.

Link to comment


This topic is now archived and is closed to further replies.

  • Create New...