Project

General

Profile

Bug #1392

OpenMW isn't using texture replacers in Targa format

Added by Lord Berandas over 3 years ago. Updated 3 months ago.

Status:
Confirmed
Priority:
Normal
Assignee:
-
Category:
General
Target version:
Start date:
06/04/2014
% Done:

0%

Reproducibility:
Always
Operating system:
Other
Severity:
Normal

Description

I was trying some texure replacer for magical item backgrounds and .tga files weren't working. They started appearing ingame, when I converted them into .dds format.

I'm using Win64 0.30.0 (367acd9676) version.

History

#1 Updated by scrawl . over 3 years ago

  • Target version changed from openmw-0.41 to openmw-future

I'm not sure if this can be fixed reasonably. Since you're making a replacement file, it should have the same filename as the original, right? Anything else would have strange results when you attempt to merge data folders.

I know vanilla completely ignores file endings, but we can mostly work around that. For new datasets in the future (e.g. our planned native model/scene format), we should get rid of this quirk (among a few others) anyway.

#2 Updated by Lord Berandas over 3 years ago

Well, vanilla MW uses usually Direct Draw Surface (.dds) for game textures, butI believe there are also some Targa (.tga) files for icons and GUI elements, aren't they? Although it can also read .bmp, .jpg and other formats, but .dds always has the highest priority.
I definatelly agree it would be best to use less formats, since it would probably mean less possible problems. But in this case I would stick to both .dds and .tga, simply because .dds is usual compressed format and .tga is usual uncompressed format used in PC games.
This decision will also make some MW mods uncompatible with OpenMW, unless converted, but that's probably not a big issue.

#3 Updated by scrawl . over 3 years ago

.tga files as such are supported (just like pretty much all image formats). However, you can't use a .tga file to "replace" an original .dds file.

#4 Updated by Alexei Dobrohotov 3 months ago

  • Status changed from New to Confirmed
  • Operating system changed from Windows to Other

Loose files, files with newer creation/modification date and files in data folders with higher priority should be preferred even if a DDS file with the same name exists.

#5 Updated by AnyOldName 3 3 months ago

Is that definitely what the original engine does? In the case where you have a Nif which references textures/atexture.dds, and then you present it with another file called textures/atexture.tga in a higher-priority source (such as another BSA) without getting rid of the original, and it'll load the TGA instead?

Also, out of curiosity, what type of TGA file is it? OSG only supports certain types, and for one of those, it's only since yesterday, so if you're trying anything with a colour map, for example, it won't be able to load the image unless you rebuild OpenMW and OSG using the latest git version of either regular OSG or Scrawl's fork.

#6 Updated by Alexei Dobrohotov 3 months ago

Is that definitely what the original engine does?

From what I have seen (but I've just taken a quick look), vanilla behavior matches OpenMW behavior; it uses the DDS file if it exists even if the shape texturing property points to a .bmp or .tga texture file. (Also, scrawl noted that vanilla completely ignores file endings up here.) But that's illogical. The behavior I described makes a bit more sense, but, well, it's subjective.
If the texturing property points to DDS file, vanilla always will use the DDS file. I didn't test the case when there isn't any DDS file yet the mesh wants it.

What type of TGA file is it?

It doesn't matter — not in Lord Berandas' case. OpenMW simply did not use the TGA file. TGA file of that incorrect type, even if it had higher priority than the DDS file, wouldn't have been just discarded; it would've been displayed incorrectly.

Also available in: Atom PDF