Difference between revisions of "TxdGen"
Jump to navigation
Jump to search
(I am on a roll. :)) |
(version 0.9 is out!) |
||
Line 2: | Line 2: | ||
{{ToolBox | {{ToolBox | ||
| name = TxdGen | | name = TxdGen | ||
− | | version = 0. | + | | version = 0.9 |
| patrol = no | | patrol = no | ||
| author = Martin Turski (The_GTA) | | author = Martin Turski (The_GTA) | ||
Line 9: | Line 9: | ||
| image = [[Image:Txdgen_overview.png|250px]] | | image = [[Image:Txdgen_overview.png|250px]] | ||
}} | }} | ||
− | '''TxdGen''' is the RenderWare [[texture dictionary]] conversion tool. It supports all PC formats, has full support for many PS2 titles and has | + | '''TxdGen''' is the RenderWare [[texture dictionary]] conversion tool. It supports all PC formats, has full support for many PS2 titles and has full 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. |
==Features== | ==Features== | ||
Line 23: | Line 23: | ||
* XBOX IMG (de-)compression! | * XBOX IMG (de-)compression! | ||
* Mipmap generation. | * Mipmap generation. | ||
+ | * ''black-roads fix'' | ||
==Media== | ==Media== | ||
* [https://www.youtube.com/watch?v=zkHkgO-lZio Video tutorial on how to generate PS2 textures] | * [https://www.youtube.com/watch?v=zkHkgO-lZio Video tutorial on how to generate PS2 textures] | ||
* [https://www.youtube.com/watch?v=YoBace396fs Showing off 'SanAndreas Retextured 3' on PS2 hardware] | * [https://www.youtube.com/watch?v=YoBace396fs Showing off 'SanAndreas Retextured 3' on PS2 hardware] | ||
+ | * [https://www.youtube.com/watch?v=LB7HFalEdXc Optimizing GTA3 Textures (PC)] | ||
+ | * [https://www.youtube.com/watch?v=6So27GlS5qg Mipmapping San Andreas (PC)] | ||
==Configuration settings== | ==Configuration settings== | ||
The conversion parameters are specified in the '''txdgen.ini''' file. | The conversion parameters are specified in the '''txdgen.ini''' file. | ||
+ | *'''outputDebug:''' boolean whether to dump texture debug into a new "debug_output/" directory | ||
*'''gameRoot:''' directory where the TXDs, that should be converted, are located (needs trailing slash!); make sure it exists | *'''gameRoot:''' directory where the TXDs, that should be converted, are located (needs trailing slash!); make sure it exists | ||
*'''outputRoot:''' directory where the new TXDs should be put into (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''') | *'''targetVersion:''' can be GTA3, VC or SA ('''self explanatory''') | ||
− | *'''targetPlatform:''' can be PC, PS2 or ( | + | *'''targetPlatform:''' can be PC, PS2 or XBOX |
+ | *'''clearMipmaps:''' removes mipmaps that shipped with textures (before doing anything else) | ||
*'''generateMipmaps:''' decides whether mipmaps should be generated or not | *'''generateMipmaps:''' decides whether mipmaps should be generated or not | ||
*'''mipGenMode:''' hint to the mipmap generator for stylized mipmap generation | *'''mipGenMode:''' hint to the mipmap generator for stylized mipmap generation | ||
*'''mipGenMaxLevel:''' integer that denotes the maximum mipmap layer that TxdGen should generate to (main texture is layer 0) | *'''mipGenMaxLevel:''' integer that denotes the maximum mipmap layer that TxdGen should generate to (main texture is layer 0) | ||
*'''mipGenSafe:''' if true then mipmap generation will terminate at either width=4 or height=4 if compression is used | *'''mipGenSafe:''' if true then mipmap generation will terminate at either width=4 or height=4 if compression is used | ||
+ | *'''improveFiltering:''' enables linear filtering for textures | ||
*'''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) | *'''compressionQuality:''' floating point (0..1) that toggles the quality for compression/optimization (only effective if compressTextures=true) | ||
Line 56: | Line 62: | ||
targetVersion=SA | targetVersion=SA | ||
targetPlatform=PS2 | targetPlatform=PS2 | ||
+ | clearMipmaps=false | ||
generateMipmaps=true | generateMipmaps=true | ||
mipGenMode=default | mipGenMode=default | ||
mipGenMaxLevel=6 | mipGenMaxLevel=6 | ||
mipGenSafe=true | mipGenSafe=true | ||
+ | improveFiltering=true | ||
compressTextures=true | compressTextures=true | ||
compressionQuality=0.5 | compressionQuality=0.5 | ||
Line 109: | Line 117: | ||
* {{GTAG|26916}} | * {{GTAG|26916}} | ||
* {{GTAF|764498}} | * {{GTAF|764498}} | ||
− | * [http://en.file-upload.net/download- | + | * [http://en.file-upload.net/download-10344065/txdgen_0.9.zip.html Download Mirror (temporary)] |
− | * [https://www.assembla.com/code/green-candy/subversion/nodes/ | + | * [https://www.assembla.com/code/green-candy/subversion/nodes/577/trunk/ps2%20export%20tool the MTA:Eir repository] - source code |
{{N|SA|VC|3}} | {{N|SA|VC|3}} |
Revision as of 12:05, 25 February 2015
Current version: | 0.9 |
---|---|
Developed by: | Martin Turski (The_GTA) |
Supported games: | GTA III, GTA VC, GTA SA |
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 full 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.
Features
- Supports all PC TXD formats
- Supports all known raster formats (RGBA, RGB, DXTn, 1555, 565, 4444, etc)
- Outputs TXD in actually working PS2, PC and XBOX 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)
- DXTn compression!
- XBOX IMG (de-)compression!
- Mipmap generation.
- black-roads fix
Media
- Video tutorial on how to generate PS2 textures
- Showing off 'SanAndreas Retextured 3' on PS2 hardware
- Optimizing GTA3 Textures (PC)
- Mipmapping San Andreas (PC)
Configuration settings
The conversion parameters are specified in the txdgen.ini file.
- outputDebug: boolean whether to dump texture debug into a new "debug_output/" directory
- gameRoot: directory where the TXDs, that should be converted, are located (needs trailing slash!); make sure it exists
- 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 XBOX
- clearMipmaps: removes mipmaps that shipped with textures (before doing anything else)
- generateMipmaps: decides whether mipmaps should be generated or not
- mipGenMode: hint to the mipmap generator for stylized mipmap generation
- mipGenMaxLevel: integer that denotes the maximum mipmap layer that TxdGen should generate to (main texture is layer 0)
- mipGenSafe: if true then mipmap generation will terminate at either width=4 or height=4 if compression is used
- improveFiltering: enables linear filtering for textures
- 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)
- ignoreSecureWarnings: boolean whether to ignore warnings that do not crash the engine
- 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
- imgArchivesCompressed: if true, then compressed IMG archives will be decompressed upon reading and files inside IMG archives will be compressed on writing (required for XBOX GTA Vice City and GTA III)
An Example file:
[Main]
gameRoot=C:/Program Files (x86)/Rockstar Games/GTA San Andreas/
outputRoot=txdgen_out/
targetVersion=SA
targetPlatform=PS2
clearMipmaps=false
generateMipmaps=true
mipGenMode=default
mipGenMaxLevel=6
mipGenSafe=true
improveFiltering=true
compressTextures=true
compressionQuality=0.5
palRuntimeType=PNGQUANT
dxtRuntimeType=SQUISH
warningLevel=1
ignoreSecureWarnings=true
reconstructIMGArchives=true
fixIncompatibleRasters=true
dxtPackedDecompression=false
imgArchivesCompressed=false
D3DFORMAT compatibility list
Raw colors
- D3DFMT_A8R8G8B8
- D3DFMT_X8R8G8B8
- D3DFMT_R8G8B8
- D3DFMT_R5G6B5
- D3DFMT_X1R5G5B5
- D3DFMT_A1R5G5B5
- D3DFMT_A4R4G4B4
- D3DFMT_A8B8G8R8
- D3DFMT_X8B8G8R8
- D3DFMT_P8
Compressed colors
- D3DFMT_DXT1
- D3DFMT_DXT2 (no compression/decompression)
- D3DFMT_DXT3
- D3DFMT_DXT4 (only decompression)
- D3DFMT_DXT5
Credits
- Uses a fork of rwtools by aap (https://github.com/aap/rwtools)
- Uses the libimagequant library (http://pngquant.org/lib/)
- Uses the libsquish library (https://code.google.com/p/libsquish/)
- Uses the lzo library (http://www.oberhumer.com/opensource/lzo/)
- Thanks to aru from GTAForums for XBOX swizzling and unswizzling algorithms (http://gtaforums.com/topic/213907-unswizzle-tool/)
- Some parts are inspired by research from DK22Pac
The licenses (if present) should be bundled with the tool.