Atvaark / FtexTool

Fox Engine Texture (.ftex) to DDS converter
MIT License
32 stars 9 forks source link

Strange Graphical Anomaly for the "Naked Snake Sneaking Suit" DLC Outfit. #6

Closed morbidslinky closed 8 years ago

morbidslinky commented 8 years ago

File : 1a5ae73c97eda.dds / 1a5ae73c97eda.ftex, 1a5ae73c97eda.1.ftexs, 1a5ae73c97eda.2.ftexs, 1a5ae73c97eda.3.ftexs

Location : MGS_TPP\master\0\00\3a34137dbf9d0.pftxs, MGS_TPP\master\0\01

How to reproduce :

Unpack 3a34137dbf9d0.pftxs to acquire 1a5ae73c97eda.ftex and 1a5ae73c97eda.1.ftexs, then acquire 1a5ae73c97eda.2.ftexs and 1a5ae73c97eda.3.ftexs from MGS_TPP\master\0\01.dat.

Convert the FTEX files to a DDS (No edits are necessary to achieve the reproduction.) Convert the DDS file back to FTEX files with the command prompt "ftextool -f 3 1a5ae73c97eda.dds", and repack the necessary files.

The strange textures can now be seen on any Male Diamond Dog Soldier's suit. (Venom's version of the suit, which shares the 1a5ae73c97eda.2.ftexs, 1a5ae73c97eda.3.ftexs files, will appear properly at close distances, but edits disappear as the distance increases. Therefore, this leads me to believe that the 1a5ae73c97eda.ftex, or perhaps the 1a5ae73c97eda.1.ftexs is at fault for the graphical anomaly.)

Reference files used : https://drive.google.com/file/d/0B4HIOk1QhmKAQTRvXzF0Y3B2NjA/view?usp=sharing

Screenshots : http://imgur.com/a/OmTu8

I've pointed out the strange issue in the image descriptions. The absurd color scheme was used to show off the anomaly, but this problem happens whenever the file is converted from the .dds format to the FTEX file format. I hope this helps, I look forward to hearing from you!

Atvaark commented 8 years ago

Hey,

have you tried to also replace 1a5ae73c97eda.ftex and 1a5ae73c97eda.1.ftexs in 1da785669b77b.pftxs? If the engine loads the original .ftex file then there might be some glitches.

If that doesn't work then please attach your edited .ftex file so that I can compare it to the original. (There might be some custom flags that aren't set properly.)

morbidslinky commented 8 years ago

have you tried to also replace 1a5ae73c97eda.ftex and 1a5ae73c97eda.1.ftexs in 1da785669b77b.pftxs? If the engine loads the original .ftex file then there might be some glitches.

When I did this, Venom's suit would no longer have the "disappearing at long distances" issue, but the graphical glitch is still present on both his and the diamond dog soldier's outfits.

Here's a link to the .ftex file, as well as it's .ftexs and the edited .dds: https://drive.google.com/file/d/0B4HIOk1QhmKAZmMxUlJJTjQyR28/view?usp=sharing

Thanks!

Atvaark commented 8 years ago

Could you check if the glitches still occur with these files? I just changed 2 bytes in the .ftex file. Maybe they're used to flip or rotate the texture in some way.

1a5ae73c97eda.zip

morbidslinky commented 8 years ago

Applying your changes caused some unexpected results, similar to:

Venom's version of the suit, which shares the 1a5ae73c97eda.2.ftexs, 1a5ae73c97eda.3.ftexs files, will appear properly at close distances, but edits disappear as the distance increases.

The difference is that the changes cause the distant textures to be jet-black, not the vanilla textures. It's a little hard to describe, so I uploaded some videos to showcase the problem:

https://youtu.be/8VNHwMaQuUU https://youtu.be/foJ6NJEgXEI

Atvaark commented 8 years ago

This isn't really unexpected. The DDS file you uploaded has a black a black texture as a mip map. 1a5ae73c97eda

This is the same texture with (10) newly generated mip maps: fixed.zip

Could you do me a favor and test how these two files look like in the game? fixed_test_1.zip fixed_test_2.zip

morbidslinky commented 8 years ago

Good news, both fixed_test_1 and fixed_test_2 appear to work properly, at any distance from the camera. I didn't notice anything out of the ordinary for either of them.

Atvaark commented 8 years ago

I fixed the issue with black mip maps. Would you be so kind and test this pre-release? v0.3.2-pre1

morbidslinky commented 8 years ago

I'm running into some errors with v0.3.2-pre1. When I convert the .dds to ftex, and then back again, there's the black texture in the mip map.

Using the files from fixed_test_1, I attempted to convert the .ftex to .dds. This resulted in an error message:

Hope this helps!

Atvaark commented 8 years ago

The DDS file you use is still missing the mip map. Either open it with some tool that can regenerate the 10 mip maps or use this file instead: 1a5ae73c97eda.zip

v0.3.1 corrupted parts of the .ftexs files, so you can't read .ftex files created with v0.3.1 with the pre-release. (DDS files created with v0.3.1 work just file with v0.3.2)

morbidslinky commented 8 years ago

Ah my bad, sorry about that.

Well 0.3.2 seems to work great so far, and I bet I'll be using it quite a lot.

Thanks for the fix! And I can't thank you enough for making this tool, it's amazing!

Atvaark commented 8 years ago

Thanks for testing my changes. I just released v0.3.2 which includes some more more bugfixes.