Some workflows and information on texture creation for Overhaul.
| Table of Contents |
|---|
Texture Naming and Sizing Notes
See parent page Overhaul Models and Textures for naming and sizing conventions. All files in an MTR file must be suffixed though with the appropriate ID (eg; _n for normal maps) even if the filename is truncated so script commands can work on each part of the MTR.
4x Upscaling Existing Texture DDS
...
This can be a big pain in the arse. Things like leaves or whatnot. Even icons. Some notes to follow and check out 4x Texture Upscaling pages for some attempts at formalising it.
Basically you need to use Pytorch mode and set the Alpha Mode in the options first. To save reading below use:
- 2 - Channel Alpha
- 8 bit transparency mode
For the purposes of at least basic icons there are some better options then the default "Differential Alpha" option:
| Alpha Mode | Tested Use Case | Notes | Alpha Layer Pictures |
|---|---|---|---|
| 0 - Disabled | Anything with no alpha channel usage | Many NWN textures contain no alpha. Most tileset textures for instance, many GUI icons and textures, many feat and spell icons. | |
| 1- Differential Alpha | This seems to be pretty bad, at least for icons (in this case id_good.tga), see picture for what the "Alpha" layer turns into! It should be all black but instead has some alpha all over the place. Basically if we were using alpha more passively - like having wisps of smoke or the like, then it might be usable. Most domains, feats, spells icons will not use this and instead use mode 2. Will need to test it on some others. ife_disarm.tga as the second example shows it is awful, since it's got lots of random transparency all over the icon. | ||
| 2 - Separated Alpha | Icons (feats, domains, actions) | This seems to work perfectly well for icons and the like where there is basically an icon in the middle, and alpha (tending to black) around it. Example of the same icon which as a much better "small amount" of alpha fade at the edges and otherwise the middle is all opaque. ife_disarm.tga looks ok - a little bit of transparency at the edges (here with 8 bit alpha on) - but it's got some weird harder edges compared to the other 2 options. | |
| 3 - Channel | This appears to be very similar to type 11, for icons at least. See id_good.tga to the right, again it moves some alpha into the icon which isn't present in the original. The outer edges however are more nicely/gradually faded. Not that they have to be - the original icon is basically "opaque or not" alpha, with the outer edge not even being entirely black (although it kinda "fades to black"). The second example shows a slightly better case when used on ife_disarm.tga - seems better rounded parts and gives a better outline. |
There is also an Alpha Depth option, using 2 - Separated Alpha, we have:
| Type | Notes | Picture |
|---|---|---|
| Full (8 Bit) | This is best for anything with fading alpha. IE not icons with a border, but for things like grass or whatever Note the fade in the example icon - it's not bad if you want a little fading however! | |
| Binary (1 Bit) | This may be quite good for alpha-with-a-border, ie things like icons See example picture it gives a nice crisp edge. | |
| Ternary (2 Bit) | This isn't really suitable for anything in NWN. It's basically a worse 8 bit version, where pixels do have bits of transparency at the edge, but don't look as good/as smooth. |
Converting to DDS
The intermediary file, usually PNG, could be TGA or another uncompressed format, can be converted using NWN Crunch: https://neverwintervault.org/project/nwnee/other/tool/nwn-crunch-enhanced-edition
...
- Non-alpha using 4096x4096 textures with DTX1 - this compresses a lot better when you don't need that alpha layer
- Converting dimensions downwards, such as making portraits smaller using one base large image
- Note that we are generating mipmaps for portraits since we are also enabling mipmaps for them
See the SVN for these scripts. The autoflip = 1 should likely be on if you've converted the files originally from DDS.
...
The mainstay of content for the Overhaul to begin with will be using upscaled 4x textures with PBR additions.
Laigter
Download: https://azagaya.itch.io/laigter
From dafena: When making normal maps, bump's height make it 0. Gotta select all textures, make a "default one" and then you can go one by one to see if the result satisfies you without needing to uhhh, first export and such
Need to figure out if there's a command line option but it's generally quite quick to output normals and spec maps.
The good thing is I think it defaults to OpenGL normals and the normals is pretty easy to do. Heightmap generator is also included but not amazing so not sure about it's use.
The method:
- Load up a single image
- Apply the settings from a preset, but the settings usually used are for Normal Map (spec map leave at defaults, don't use the rest really):
- Enhance:
- Height 400 (or if too extreme 255 or lower is better, tweak as needed)
- Soft: 2
- Bump:
- Height: 0 (rest of the settings won't matter)
- Enhance:
- Then you can load an image in it'll use those settings and you can test them, tweak, and export.
- Spec maps may need attention eg; a creatures fur might not really be that reflective even if white (like a white Bear) therefore can tone down the Brightness option easily enough.
Height map
Go "Parallax and change type to "Height Map". Usable? Maybe.
It's only depressions though in NWN so not too useful for things that are meant to "pop out" but good for things like cobblestones or wall bricks where between the stones/bricks it might "depress".
White is "to the model level" and darker is going deeper, so mortar around bricks would be blacker. Bumping up brightness and contrast a fair bit, but to be honest it probably won't be that usable except on very uniform textures. If you can't get it to work right, export and tweak by making black areas whiter with GIMP's exposure tool (copy the stuff to change to a new layer to do it).
ShaderMap 4
Starting Tutorial: Using ShaderMap 4 (SM4) to Make Simple PBR Textures
...
These provide some colourisation information to the model where things are reflected. The textures alpha channel is used to modify the texture based on the environment map.
The default games version without PBR's is a bit lackluster.
...
- TXI (urg) can define it with EnvMapTexture
- MTR can supposedly use Texture15 for it, this needs further testing
- You can specify a texture filename in the appearance.2da entry (not a terrible idea, but only works for creatures not placeables or tiles)
Removing Baked In Specular Maps
Can use GIMP or in MindText2 you can use "Flatten Color" to remove the shine from a texture, from Defana:
It loses some of it's quality so it can be difficult to do properly.
Using Alpha as Specular
As noted above alpha layers are used for the environment mapping "shiny/reflective" surfaces. It'd be nice to get these converted over to PBR's though (which gives us some nicer control).
In GIMP you can go Alpha → Greyscale like this: https://graphicdesign.stackexchange.com/questions/155206/alpha-to-colour-value-in-gimp
- Bucket Fill with Normal mode and black colour all channels except alpha so RGB layers are black (do this by unselecting the alpha under Channels)
- (optional but not really needed) Insert an all back layer below the now alpha only layer
- Use "Behind" bucket fill with white colour on the alpha layer
- Should fill it in with black being "no alpha" and white being "full alpha" more or less
- You can now delete the alpha layer; select the layer, right click and then select Remove Alpha Channel:
Now it's ok but might not be to what specular maps should be (where white == shiny). This is because the NWN envmaps overwhelm the colour and so fully alpha would mean, basically, full environment map replacement, which is really bad.
We want to extend the colours so black stays black, and greys become more white. Most of the time the non-alpha black bits are all the non-metal parts (eg wood, skin etc.) so it's pretty safe assumption the even dark grey bits are meant to be shiny.
I've found that Colors → Exposure works well. Put black level to 0.1 (maximum) to keep the blacks and the Exposure upwards, say to 2.0 or so. Going a little higher can really push the whites. Over 3.0 and it tends to white out everything on the example below. 2.0 seems to be fine in game for our purposes.
Then convert with Crunch and bingo (here with a normal map from Shadermap 4):
Note the diffuse has been passed in as DXT1 to remove any alpha (and lower the DDS size, they tend to get quite big at 2048 size).


