Difference between revisions of "TxdGen"
Jump to navigation
Jump to search
(→Configuration) |
(→Configuration) |
||
Line 30: | Line 30: | ||
targetPlatform=PS2 | targetPlatform=PS2 | ||
compressTextures=true | compressTextures=true | ||
+ | compressionQuality=0.5 | ||
palRuntimeType=PNGQUANT | palRuntimeType=PNGQUANT | ||
+ | dxtRuntimeType=SQUISH | ||
warningLevel=1 | warningLevel=1 | ||
reconstructIMGArchives=true | reconstructIMGArchives=true | ||
fixIncompatibleRasters=true | fixIncompatibleRasters=true | ||
+ | dxtPackedDecompression=false | ||
</source> | </source> | ||
===Description=== | ===Description=== | ||
Line 41: | Line 44: | ||
*'''targetPlatform:''' can be PC, PS2 or (WIP) XBOX | *'''targetPlatform:''' can be PC, PS2 or (WIP) XBOX | ||
*'''compressTextures:''' decides whether textures should be '''compressed''' if they are not already (to save memory and disk space) | *'''compressTextures:''' decides whether textures should be '''compressed''' if they are not already (to save memory and disk space) | ||
+ | *'''compressionQuality:''' floating point (0..1) that toggles the quality for compression/optimization (only effective if compressTextures=true) | ||
*'''palRuntimeType:''' decides the technique that should be used for palettization/compression; can be '''NATIVE''' or '''PNGQUANT''' | *'''palRuntimeType:''' decides the technique that should be used for palettization/compression; can be '''NATIVE''' or '''PNGQUANT''' | ||
+ | *'''dxtRuntimeType:''' chooses between '''NATIVE''' or '''SQUISH''' S3TC compression algorithms | ||
*'''warningLevel:''' integer that toggles the warning throughput of the TXD parser (the higher the more warnings) | *'''warningLevel:''' integer that toggles the warning throughput of the TXD parser (the higher the more warnings) | ||
*'''reconstructIMGArchives:''' boolean which decides whether IMG archives should be reconstructed in the target directory | *'''reconstructIMGArchives:''' boolean which decides whether IMG archives should be reconstructed in the target directory | ||
*'''fixIncompatibleRasters:''' if this parameter is true then TxdGen attempts to change raster parameters to prevent game engine crashes | *'''fixIncompatibleRasters:''' if this parameter is true then TxdGen attempts to change raster parameters to prevent game engine crashes | ||
+ | *'''dxtPackedDecompression:''' if true, then rwtools will pack decompressed DXT texels in a close approximate raster format to prefer small size over quality | ||
==Credits== | ==Credits== |
Revision as of 23:46, 7 January 2015
Current version: | 0.7 |
---|---|
Developed by: | Martin Turski (The_GTA) |
Type: | Texture Dictionary generator |
TxdGen is the RenderWare texture dictionary conversion tool. It supports all PC formats, has full support for many PS2 titles and has partial support for the XBOX titles. It scans for TXD files in a source directory and converts them into a desired format into a target directory.
The supported games are , and .
Features
- Supports all PC TXD formats
- Supports all known raster formats (RGBA, RGB, DXTn, 1555, 565, 4444, etc)
- Outputs TXD in actually working PS2 and PC format
- Lossless conversion between formats!
- User-friendly configuration file!
- Texture compression on demand!
- Debug output on common errors
- Automatic processing of IMG archives (version 1 and 2)
Configuration
The conversion parameters are specified in the txdgen.ini file. It can look like this...
[Main]
gameRoot=C:/Program Files (x86)/Rockstar Games/GTA San Andreas/
outputRoot=txdgen_out/
targetVersion=SA
targetPlatform=PS2
compressTextures=true
compressionQuality=0.5
palRuntimeType=PNGQUANT
dxtRuntimeType=SQUISH
warningLevel=1
reconstructIMGArchives=true
fixIncompatibleRasters=true
dxtPackedDecompression=false
Description
- gameRoot: directory where the TXDs, that should be converted, are located (needs trailing slash!)
- outputRoot: directory where the new TXDs should be put into (needs trailing slash!)
- targetVersion: can be GTA3, VC or SA (self explanatory)
- targetPlatform: can be PC, PS2 or (WIP) XBOX
- compressTextures: decides whether textures should be compressed if they are not already (to save memory and disk space)
- compressionQuality: floating point (0..1) that toggles the quality for compression/optimization (only effective if compressTextures=true)
- palRuntimeType: decides the technique that should be used for palettization/compression; can be NATIVE or PNGQUANT
- dxtRuntimeType: chooses between NATIVE or SQUISH S3TC compression algorithms
- warningLevel: integer that toggles the warning throughput of the TXD parser (the higher the more warnings)
- reconstructIMGArchives: boolean which decides whether IMG archives should be reconstructed in the target directory
- fixIncompatibleRasters: if this parameter is true then TxdGen attempts to change raster parameters to prevent game engine crashes
- dxtPackedDecompression: if true, then rwtools will pack decompressed DXT texels in a close approximate raster format to prefer small size over quality
Credits
- Uses a fork of rwtools by aap (https://github.com/aap/rwtools)
- Uses the libimagequant library (http://pngquant.org/lib/)
The licenses (if present) should be bundled with the tool.
Source code
See the MTA:Eir repository for the source code.