Texture File naming conventions?

I am trying to untangle some issues related to texture names in *.mdb files, and I am hoping that someone can point me at documentation on the limitations of these names.

My problem is that I want to use mods which have conflicting textures with the same name.

When I look at https://nwn2.fandom.com/wiki/MDB_Format I see that the texture name fields are 32 characters wide.

When I examine actual files, I run into some oddities. For example, NWN2_Models/P_HHM_Hair15.MDB has name fields with these null terminated strings:

HHM hair low Dummy01
P_HHM_Hair13_N      
P_HHM_Hair15        
P_HHM_Hair15_L01    
P_HHM_Hair15_L02    
P_HHM_Hair15_t      
P_HHM_skel

I can probably ignore the dummy name and the skel reference. But, these files exist:

NWN2_Materials/P_HHM_Hair13_N.dds
NWN2_Materials/P_HHM_Hair15.dds
NWN2_Materials/P_HHM_Hair15_n.dds
NWN2_Materials/P_HHM_Hair15_t.dds

Meanwhile, the P_HHM_Hair15.dds file has mipmaps, and the _L01 and _L02 suffixes are presumably references to specific mip levels within that file.

All of which suggests that I can not just, for example, rename textures with arbitrary long file names and expect to have these work in these model files.

On the other hand, I expect that a lot of the use of naming conventions for texture files was just that those names were handy to use when the textures were being created.

Still…

Has anyone else played with this issue? If so, what were your findings?

Or, has anyone stumbled across documentation on the requirements for texture file names in .mdb files?

Welcome Victorya

The dummy is used by the engine to determine which part of the hair needs to be removed when a helmet is worn.
For P_HHM_Hair01 for instance, the engine knows there’s a ponytail:

_L01 and _L02 are the original mesh with fewer faces (40% and 60% less usually respectively, they are used for display when the level of details is not important since the object is far away).

Usually, _d or nothing is for the diffuse texture (i.e. the colors you’ll see), _n for the normal mapping (i.e. where the bumps and hollow parts in the mesh are), _i or _g for the glow/self-illumination (when there’s no light, the object will appear as if lit from inside) and _t for the tint (i.e. how you can change the colors from the diffuse map).

That being said, if you want to be able to use conflicting textures, you could just rename one set and use MDB Config or MDB Cloner to update the maps.

1 Like

What’s your secret, Victorya?

1 Like

MDB Cloner is pretty close to what I was looking for. I will have to spend some time with it.

Thank you.