Closed NoShotz closed 1 year ago
Hi NoShotz. Thanks for the report and example files. Can you confirm they are supposed to look like this:
I don't have a fix in yet... but I did confirm that strictly-speaking these are not-well-formed dds files. In the dds header 32 of the bits are 'flags', and they're 'supposed' to have a bit set saying to use the FourCC code, or for older dds files, RGBA/RGB/A/L flags. but none of the bits are set, even though there is a valid four-character-code after.
I can probably tie this to the 'strict loading' checkbox in Preferences->System (which was needed to allow some bad jpg files). This option defaults to off... so it would just work. i.e. It could be made to assume FourCC if no bits set and the 4CC looks reasonable.
Yes, that is indeed how they are supposed to look. I do wonder why they aren't formed correctly as those files were obtained via official modding tools for the game they are from.
Edit: Based on looking at some things with said modding tools, it looks like that stuff may be handled in engine rather than in the DDS file, which would explain why DDS files extracted from the game don't contain those flags.
Yeah. It's tricky to get all of this stuff right especially with a complex format like dds that has evolved over time. I'm guessing you may also be correct about the memory image and it having lost some header info.
In fact, the file has another problem ;) If you look at the second mipmap (1-based) it's left edge has BC1 blocks with binary alpha (reversed endpoints). Most of the left 2 pixels of this block are transparent.
This is displayed correctly by tacent view. There is no 'flag' to say NOT to interpret dxt1/BC1 reversed-endpoint blocks as having punchthrough alpha... the dxt1ba format is not really a different format in this sense... it just means some blocks have this property.
I quickly re-exported using nVidia's NVTT standalone tool and had it generate the mipmaps instead. I set the alpha-bias to 1 just in case (NVTT has a small issue they are fixing when you encode a 32-bit image to dxt1-no-alpha on a machine without CUDA... it can write BA blocks... the bias is a workaround until their next release). Incidentally, I've tried quite a few encoders -- NVTT gives higher visual quality results than most.
(all good)
Gonna close this issue. Fixed in f81d55c1735ceb7fdb93b8bba3b813d0c39287bc I've attached a zip if you don't want to wait for the next release. tacentview_1.0.36.zip
In my search to find a replacement for the extremely old WTV program, I ended up finding this one. It works well but some of the DDS files I work with just don't open properly in the program unless I first open them in Paint.Net and resave them in the same DDS format, which isn't the best solution. It only seems to happen with DXT1/5 files as A8R8G8B8 files open fine.
Here are some files that won't load. DDS Files.zip