A simple guide for how a you can setup a GIMP project with the PLT plugin, then change a texture to be PLT based.
This is useful when making, say, helmets, or any other item you want to convert to layered PLT usage.
These will run under Windows, Mac or Linux.
- GIMP - https://www.gimp.org/
- GIMP PLT Plugin - https://neverwintervault.org/project/nwn1/other/tool/gimp-plt-plugin-cross-platform
Making a PLT Texture
The first thing to do with your textures is back them up - always keep the originals as much as possible in their original form for later use. PLT files are always greyscale thus will lose information when exported to PLT.
Example: Tower shield PLT
For an example I have decided to take the Beamdog HD Pack Tower Shield DDS file and convert it to PLT. I took a_towershield.dds and firstly converted it to PNG using NWN Crunch and actually de-DDS'ed it using Cupscale (this step may gain some improvement in quality, and with PLT we need every improvement we can get).
This is then opened in GIMP to start a project;
One thing to note is since I converted from DDS we will actually want to flip it now, vertically; Image → Transform → Flip Vertically. Then it will display properly in game since the final PLT file is generated from this view.
The next thing is to add the layers you want - since the majority - almost all of the texture - will be "Metal 1" we'll firstly rename the base layer metal1
You can then add the others manually (the order isn't important, only the name is) or use the Tools → Plt: Setup Layers. The only ones we really need are:
It should look something like this - the order is really unimportant, remember one pixel per layer!
Moving things to other PLT Layers
The main thing to note here: every single pixel should only be on one layer. PLT files are essentially a bitmap with each pixel is individually coded into the file, but with an additional bit of info saying what layer each pixel is assigned.
This means we have to carefully cut and paste areas out moving them to different layers.
I want to move this area to the metal2 layer, this is an adornment in the centre of a shield. I lasso the area with straight lines overlapping the edge used by the model;
Now hit CTRL+X to cut it, and go on the layers list and select the metal2 layer;
Next paste without touching anything else - this creates a floating layer with the same location:
Finally either right click the floating layer and select Anchor Layer or select Layer → Anchor Layer or press CTRL + H.
This adds it to the metal2 layer you selected earlier. You can toggle the eye to see it go away too to confirm:
This can now be done for any sections you want to move to other layers. It can be tedious but there is a variety of helpful selection tools such as the Fuzzy Select (magic wand icon) I want to use for this wood.
The settings that seemed to work fine were Antialiasing on, Select by HSV Hue and a Threshold of 10. The threshold is the most important value since it really depends how the texture was designed and the colours used.
It won't be perfect - since PLT doesn't allow any kind of dithering or "this is more than one layer" you will have hard edges where the original file didn't have them, and you can tidy this up a bit later.
Moved to cloth1 (hidden layer) and the metal bolts are still in metal1:
cloth1 with all 3 parts of wood on it:
Finding Other Bits using Blender
The model apparently was going to have leather straps - well, at least metal ones don't tend to come with buckles!
Since the texture is a bit messy, containing 3 shields in 1 really, we need to track down the belt parts. Open the MDL with Blender and Neverblender, and open the Texture Paint view for the textures to load (if they don't try adding them), then open the UV Editing view, it should auto load the textures. But they're probably upside down! So...we'll flip the UV maps for reading the file properly and find these belts.
On the right hand image select the model, hit A to select all parts of the model.
Then on the left hand image click it and hit A so it is all selected and orange:
Finally in the UV menu select Mirror → Y Axis.
Then it's good! Sure it's upside down but we only need to know the general area to find it
Selecting part of the 3D model (in this case the entire model is one part) gives us a good location to look at:
Thus it's this area:
You can then find it on the GIMP project:
And move it to the leather1 layer:
Save the file as XCF to retain all the original texture colours so it is easier to make later edits.
Checking for 0 and 255 Values
Note before you finish you might want to remove any values which are 0 or 255 (completely black or white) since these can be vantablack (ie no shiny/nice stuff) or highly transparent/shiny (totally alpha/no colour). This texture didn't have that so no need to do it here.
Exporting to PLT
Export As... and select PLT, this has no real options and will just generate the PLT based off the layer names.
Then test it in game:
(As the right one shows shiny leather, this was something to fix but in the specular and roughness maps, not the base PLT file).