Some workflows and information on texture creation for Overhaul.
This is a multi-step process, but reasonably simple, to obtain a upscaled PNG file.
Then you use this as the basis for the others, and if you need to scale back to 2048x2048 or smaller use Crunch to do it at the DDS stage.
Same as above but you can avoid the Crunch step; just run Cupscale on the TGA file with 4xBSRGAN.pth model being run. It'll self-convert to PNG automatically.
This can be a big pain in the arse. Things like leaves or whatnot. Some notes to follow and check out 4x Texture Upscaling pages for some attempts at formalising it.
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
There are some reasonable default cmd scripts but some edits are needed for doing:
See the SVN for these scripts.
Final DDS should be as close to the original sizes as possible, keeping under 15MB, see Overhaul Models and Textures at the bottom for notes on this but basically with alpha it is usually 2048x2048 maximum and without alpha it is 4096x4096 - although only needed on very large creatures like Dragons or Giants.
The mainstay of content for the Overhaul to begin with will be using upscaled 4x textures with PBR additions.
Starting Tutorial: Using ShaderMap 4 (SM4) to Make Simple PBR Textures
If a creature is quite "dry" and "normal" we can just do a normal map. This adds some shadowing on the model where bumps are in the texture.
Using ShaderMap 4 we just simply add the image we want to create normals from, which will generate a basic normal map - to have it to NWN standards change the green channel to be Y+
(shamelessly from the tutorial above) Select the normal map then click the axis icon in the bottom left panel.
Next, click the box at the top of the green axis.
Click the checkbox to accept the changes.
This might be all you need to do - save the normal file as a PNG by right clicking on it.
You can also edit the intensity (usually the main thing to do) and the other options. Listing these on the creature model pages may be recommended to recreate it later (eg; if you change the texture size, or swap the texture).
For the specular you can use this to generate a good enough general spec map to later edit in GIMP or similar to change to NWN specifics. See Merrickdad's tutorial for most of this.
These maps provide a shine to the object.
However it's not as simple as "just export stuff from ShaderMap 4" or any other tool, since:
Specular maps:
Roughness maps:
Some experimentation is required here and for different types.
Using shader variables
This might be easier than having a ton of DDS files which essentially are one uniform colour. Saves a lot of disk space and file mess too.
Example MTR c_ettercap.mtr - the top two lines force normal maps and specular/diffuse compared to leaving them blank, taken from the PBR demo module (bit more on default shaders used here: https://github.com/mtijanic/nwnee-shader-tutorials/blob/master/tut/material-fragment-shaders.md ). The values though will just be uniform for the model, as if we produced an entire specular/roughness map which was all uniform white or black or grey.
customshadervs vslit_nm customshaderfs fslit_nm renderhint NormalTangents // Textures texture0 c_ettercap_d texture1 c_ettercap_n parameter float Specularity 0.02 parameter float Roughness 0.1 |
Example code to change the values for testing - debug console - select the ettercap and apply.
float fSpecularity = 0.02;
float fRoughness = 0.05;
SetMaterialShaderUniformVec4(OBJECT_SELF, "c_ettercap", "Specularity", fSpecularity);
SetMaterialShaderUniformVec4(OBJECT_SELF, "c_ettercap", "Roughness", fRoughness); |
Example values see here: Enhanced Lighting Engine and PBR
However having something that is "wet but solid" instead of water needs some testing. It sometimes also benefits from the diffuse file (main colours) being altered to remove shadows or lighten them up.
Some examples:
| Specular | Roughness | Picture | Description |
|---|---|---|---|
| 0.3 | 0.05 |
| Generally a bit "wet" but not quite good enough |
| 1.0 | 0.00001 |
| A metallic mess (note setting Roughness to 0.0 seems to recalculate it as if it wasn't set) |
There's a Metallicness value set in the shader too. We'll look at that another time...the shader defines it in inc_material.shd and seems to be auto generated anyway:
uniform lowp float Specularity; uniform lowp float Roughness; uniform lowp float Metallicness; Default definition: fMetallicness = clamp(fMetallicnessModifier * fSpecularity - fMetallicnessMod, 0.0, 1.0); |
Code to test:
float fSpecularity = 0.02;
float fRoughness = 0.05;
float fMetallicness = 0.05;
SetMaterialShaderUniformVec4(OBJECT_SELF, "c_ettercap", "Specularity", fSpecularity);
SetMaterialShaderUniformVec4(OBJECT_SELF, "c_ettercap", "Roughness", fRoughness);
SetMaterialShaderUniformVec4(OBJECT_SELF, "c_ettercap", "Metallicness", fMetallicness); |
These provide some colourisation information to the model where things are reflected. The default games version without PBR's is a bit lackluster.
The "default" option uses the texture file "chrome1"

This applies - as it looks like - a bit of a silvery-shine.
Needs further testing on how we replace this default or, well, how it works overall. Some aspects of implementation: