Mavirick, would it possible to have a Tonberry texture support for FFVII steam version since the game works in a similar way ? How much work would it take ?
Yes, I believe so. The FFVII Steam release uses DirectX 9 so I think you could use the exact same D3D9Callback.dll. There is some question as to whether the textures are the same size and are handled the same way (they are written to the GPU upside down in Tonberry, don't ask me why), but assuming they are mostly similar to FFVIII then the same process could be used: use Tonberry debug mode to find in-game textures, upscale them or repaint them, use hash of in-game texture to replace with new texture. I don't own the Steam version of FFVII, but if someone wanted to try Tonberry 2.04 with it I'd be interested in their findings. You'd want to empty \textures, tonberry\hashmap, and tonberry\objmap,
set debug_mode=yes in tonberry\prefs.txt, and create a proper tonberry\debug folder structure for saving images.
The biggest problem would be the hashing algorithm, which Omzy wrote and then reinforced by a set of handchosen pixels that seemed to reduce collisions to an acceptable level. This algorithm would probably not work very well with FFVII and its entirely separate set of textures, which would mean tons of collisions and general misery for modders. In a perfect world, you'd want to do what the eventual plan for FFVIII is:
- Use Tonberry with debug mode on to collect a large majority of in-game textures. The more textures the better--the best way to do this would be to crowdsource it, assigning people different areas to run around and then send all the collected textures to one person. One diligent speedrunner could also collect most of them in a reasonable amount of time, assuming he had the harddrive space (likely 100+GB of images), and if I've learned anything from qhimm it's that you should never underestimate the patience of a determined modder (I'm looking at you, FatedCourage ).
- Run some analysis on the set of in-game textures to find an ideal set of pixels for hashing. I've developed a process that I think does an excellent job of this, and was able to reduce collisions among the FFVIII textures I'd collected to ~2% (versus the 20+% in the current hash algo). However, the new hash algorithm was never completed/implemented for a variety of reasons, not the least of which was the release of The Witcher 3
- Use pixels from analysis to create an (almost-)optimal hashing algorithm that can replace every texture in the game with whatever modders want without any significant collisions. Use the existing Tonberry structure with hashmaps and a directory for replacement textures.
- Release the collection of in-game textures with their hashes (or an app for generating the hashes, like BerryMapper) and let modders go to town.
- Release an updated Tonberry that uses the new hashing algorithm.
There are several other improvements in development (if a somewhat
delayed development) for Tonberry, including logic that can search for 1-4 objects in all four corners of a texture so that modders like FatedCourage don't have to trawl the game for every possible combination of character textures to include in the hashmap. The important thing, I think, is that the replacement strategy that Omzy came up with and the texture cache that JeMa and I developed are both iron tight. They can and should be used for other games.