VitaSmith / gust_tools

A set of utilities for dealing with Gust (Koei Tecmo) PC games files
Other
206 stars 23 forks source link

Atelier Arland DX .g1t files have the wrong colors #12

Closed Zardas81 closed 4 years ago

Zardas81 commented 4 years ago

The .g1t files found in the remastered PC version of the Arland games (A11V-A13V) come out like this when converted:

000

Original file: A11V_PLUS_11.zip

Joschuka commented 4 years ago

Seems like an offset issue, the format is BC7 (code 5F) which is supposed to be supported. A11V_PLUS_11

Zardas81 commented 4 years ago

Yeah, thought so. Is there anything I can do to fix it on my end, or does it need a program update?

Joschuka commented 4 years ago

It needs a program update unless you're familiar with the G1T format. In the meantime you can use the texture cooker to extract them manually or my Noesis plugin https://github.com/Joschuka/fmt_g1m

VitaSmith commented 4 years ago

Should be fixed now.

The problem is that we followed what Steven's Gas Machine/Xentax does (which says that texture type 0x5F is supposed to "work perfectly") for the DDS_HEADER_DXT10 header section, and in x_dds.cppCreateBC7Header() they set arraySize to 0 which is completely wrong.

Per Microsoft's doc:

For a 3D texture, you must set this number to 1.

Having 0 instead of 1 there made the texture invalid.