Beamdog / nwn-issues

Neverwinter Nights: Enhanced Edition Technical Bug Tracker
http://nwn.beamdog.com
31 stars 1 forks source link

Cloaks texture bug when using TGA/DDS, introduced in .35 #645

Open alfa050moonshaes opened 1 month ago

alfa050moonshaes commented 1 month ago

Describe the bug

Repro instructions: Put attached cloakmodels.2da and TGA cloak texture files in your /development folder. Load attached test module (two test modules included; one built with game version .36, another built with game version .34). Pick up the cloak from the ground and put it on to observe the issue with the cloak's texture not being loaded.

Issue description:

  1. Cloaks in .34 and previously, could use PLT or TGA/DDS textures, the texture filename being specified via cloakmodels.2da. As of .35 onwards (have tested .34 to .37 builds inclusive) this is broken and a TGA/DDS cloak texture will not be loaded. Only a PLT texture works.
  2. When trying to use a TGA/DDS cloak texture, it does not load and the cloak mesh appears white. See screenshot: https://media.discordapp.net/attachments/995637334919893082/1265782738015752232/image.png?ex=66a2c389&is=66a17209&hm=d804d89af4f6d3aaf778e96bdd3f8fae34746d0d3ab53e534456900d3be431e8&=&format=webp&quality=lossless&width=327&height=525
  3. Interestingly though, if you switch to Debug view 'Base Color' you will see that your character's head PLT is somehow being applied to the cloak mesh. See screenshot: https://cdn.discordapp.com/attachments/995637334919893082/1265783043810005125/image.png?ex=66a2c3d2&is=66a17252&hm=dc74ee181572f3a6f501ae0d86a8ab6eebdf7c492162410a3a31674b3eeea062&
  4. Also, the texture loads fine on the cloak model in the Toolset item properties window. See screenshot: https://cdn.discordapp.com/attachments/995637334919893082/1265782901534888117/image.png?ex=66a2c3b0&is=66a17230&hm=a8ecb279be4f1ee4089ee0bd6ac2c70e3a55c7df61e0522f00cd4edb7b1777e1&
  5. Also possibly of note: in my game logs this resman lookup failure appears when testing: '[ResMan] Resource pfd0_cloak_003.tga not found'. This would seem to indicate to me that the engine is (perhaps when it at first doesn't find a PLT to load) searching for the TGA texture with that filename, which is wrong. The number suffix of that filename is the cloak model number (specified in column 2 of the cloakmodels.2da), which is not the texture it should be searching for. This could all just be incidental to the real issue however.
  6. Regarding the attached test module, texture & 2da, here is how it works in case a refresher on how cloaks work is useful: cloakmodels.2da column 3 ('TEXTURE') specifies the number which the texture file should have. In this case we are testing using 2da row 22, 'WarderCloak', which has in the TEXTURE column the number 21. Hence why the attached cloak texture filename is cloak_021.tga. Note for the avoidance of doubt I have searched the NWN game files for a clashing texture file also called cloak_021 and there isn't one. Also I have tested using a different texture file number just in case and that doesn't resolve the issue (in any case this is obviously a bug where it works in .34 and doesn't work in .35 onwards). Many thanks #thirdagecloaktestmodules.zip cloakmodel files.zip

Custom content or overrides used

Only the files attached to the above report i.e. the cloakmodels.2da, and the TGA texture file cloak_021.tga.

Game version

.35, .36, and Preview (.37) all tested and confirmed bug present. In .34 everything works correctly.

First seen on game version

.35

OS

Windows

Distribution

Steam

Finaldeath commented 1 month ago

@alfa050moonshaes I can't access any of the screenshots can you paste them directly onto github after saving them so I can understand what the issue is more closely?

There are workarounds to loading DDS files where a PLT is usually required, I think these need to be made more clear though.

alfa050moonshaes commented 1 month ago

@alfa050moonshaes I can't access any of the screenshots can you paste them directly onto github after saving them so I can understand what the issue is more closely?

There are workarounds to loading DDS files where a PLT is usually required, I think these need to be made more clear though.

Here are the screenshots: image-17 image-22

image-14

Give me a shout on discord if I can assist with reproducing etc. Thank you! -El Grillo