In the PS2 reflections topic we already talked about differences of PS2 files, converting them to PC files and so on. Here will be the place to discuss these things.
First of all, here are the binaries:
and here the source:
These tools arose of my obsession to understand all RW files used by GTA (especially the non-PC formats) and use them in my programs (I wrote a map viewer and some other programs using these). Of course the library can also write files so writing converters was very easy.
The three tools are:
- dffconv: converts any dff file to a generic (PC) file
- txdconv: converts any txd file to a PC file
- txdex: extracts the textures of any txd files into tgas
- converted peds aren't apparently usable on PC games (haven't tried myself yet, probably bone related)
Please let me know of any bugs you find that aren't mentioned yet.
Update: As part of my librw project (https://github.com/aap/librw) I release a new and much better dff converter now:
The version of the file written will be the same as the input by default (unless you set the version explicitly with the -v switch, see this for information on RW versions: http://www.gtamoddin...wiki/RenderWare).
- Instancing means converting the platform independent geometry data into a platform specific format that can be saved to a dff file (these dff files are called pre-instanced because instancing no longer happens at runtime). This is done in the PS2 and mobile games starting with VC and all xbox games. d3d8 and d3d9 pre-instanced geometry is not used by the games by default but the game should be able to read such dffs.
- Uninstancing is something the original RenderWare engine cannot do, but which librw can: it means converting the platform specific geometry back into a platform independent format again.
The -u and -i switches tell convdff to uninstance or instance a dff (note that not everything has been tested an implemented yet, expect bugs or problems).
Even non-instanced can be platform-specific (the -o switch sets the output platform, d3d8 being the default). Most noticeably ADC optimized geometry on the PS2 (to improve tristripping) and custom vertex formats on the xbox.
Example: to convert a ps2 file into the platform independent format and write it as version 220.127.116.11 use it as
convdff.exe -u -v 33002 input.dff output.dffTo pre-instance a file into xbox format:
convdff.exe -i -o xbox intput.dff output.dffI will implement more features in the future but the basic conversions should be working. I don't guarantee all conversions will work, i can't test everything. Please report bugs or unexpected behaviour.
- files with multiple clumps are not supported (everything after the first clump is ignored).
- uninstancing Xbox night normals is not supported yet
- instancing and uninstancing of SA mobile dffs is not (completely?) implemented yet.
Update: After taking a look at LCS TXD files I wrote a converter which converts PS2 CHKs and iOS TXDs (which are basically the same file format) to d3d8 TXDs.
Update: The same program now converts PS2 MDLs and iOS DFFs to regular dffs.