The_GTA Posted January 29, 2015 Share Posted January 29, 2015 (edited) TxdGen is a RenderWare texture conversion toolchain that I have been working on since December. It started out with my idea to mod the PlayStation 2 version of GTA:San Andreas but I decided to go full-on and add support for all kinds of RenderWare TXD formats (PC, PS2, XBOX). It supports every known Rockstar Games TXD archive. Visit the GTA Modding wiki page for all the details! Release page on GTAGarage. Similar tool by The Hero/aap. I have forked his old codebase and done heavy research on the PlayStation 2 textures so that I could generate working ones from scratch. If everything goes well I will contribute my research back to his codebase. Without his open source work, I would have been set back by some time while trying to develop my own RenderWare toolchain, so give this guy a heads up Direct download (1.0, 17.10.2016 00:06): OneDrive Supported is Windows XP SP3 and above. No runtime libraries required anymore. How to use TxdGen First, you have to get some TXD files that you want to convert (from the modding scene or official Rockstar discs). Put all of the TXD files into the "txdgen_in/" folder that is located by the tool. Now edit the "txdgen.ini" file that comes with the tool so that it converts the TXDs how you want it to. Then simply double click on "txdgen.exe". A command line window will open and tell you about conversion progress and debug info. By default (in 0.8) your new TXDs should be located in a new "txdgen_out/" folder. Put those TXDs into your custom game and enjoy! Could you not follow these steps? Visit the wiki or watch the tutorial video below! Media (tutorial, HQ download) (tutorial, HQ download) 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 Uses the PowerVR SDK (http://www.imgtec.com/tools/powervr-tools/) Uses the Compressonator library (github) Uses the libjpeg library (http://libjpeg.sourceforge.net/) Uses the libpng library (http://libpng.org/) Uses the libtiff library (http://libtiff.org/) This was my first tool release ever. Thank you so much for considering my tools! Best wishes, - Martin Edited October 16, 2016 by The_GTA reyks, Frank.s, Concavax and 23 others 26 Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/ Share on other sites More sharing options...
Concavax Posted February 1, 2015 Share Posted February 1, 2015 This tool support dxt5? Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1066906352 Share on other sites More sharing options...
The_GTA Posted February 1, 2015 Author Share Posted February 1, 2015 (edited) This tool support dxt5? DXT1, DXT3, DXT4, DXT5 What more could you wish for For compatibility reasons, it does not output in DXT5. I could improve that in future versions. But if you convert from PC to XBOX, it should preserve your DXT5 compressed textures. Added a D3DFORMAT compatibility list to the wiki page. Edited February 1, 2015 by The_GTA Concavax 1 Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1066907077 Share on other sites More sharing options...
Concavax Posted February 1, 2015 Share Posted February 1, 2015 Thanks, i try your tool with a txd compress in DXT5, and can convert Dxt5 Pc to Pc. Really a pretty good tool. Please i hope this awesome project dont die. Thank you, again. Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1066908548 Share on other sites More sharing options...
Jago Posted February 3, 2015 Share Posted February 3, 2015 looks really good, does it support mipmaps? also, could you put a mirror up by any chance? Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1066915427 Share on other sites More sharing options...
The_GTA Posted February 3, 2015 Author Share Posted February 3, 2015 (edited) looks really good, does it support mipmaps? also, could you put a mirror up by any chance? Yes, it extracts mipmaps from all platforms. In version 0.8 there is a bug where it extracts zero sized mipmaps of XBOX textures. That is fixed in the latest revision. The latest revision will also add XBOX GTAIII and GTA Vice City IMG decompression support. Mirror (0.8): http://en.file-upload.net/download-10233594/txdgen_0.8.zip.html Mirror (0.8.1): http://www.file-upload.net/download-10249862/txdgen_0.8.1.zip.html NOTE: compressing textures for PlayStation 2 hardware may remove its mipmaps. This can be prevented by setting compressionQuality to 1.0. Alright guys, 0.8.1 is out now! Now you can convert GTAIII and GTA Vice City XBOX textures to PC Edited February 3, 2015 by The_GTA Concavax, Jago, Vadim M. and 2 others 5 Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1066916129 Share on other sites More sharing options...
Vadim M. Posted February 3, 2015 Share Posted February 3, 2015 Huge thanks for this tool! Now I can finally convert some Xbox txds to PC format! The_GTA and Ss4gogeta0 2 Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1066918470 Share on other sites More sharing options...
Concavax Posted February 4, 2015 Share Posted February 4, 2015 Any chance to built txd files with this tool in the future? I mean, conversion (TxdPC to TxdXbox) and build(Png, tar, etc to Txd). Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1066919419 Share on other sites More sharing options...
4NT1R3KL4M4 Posted February 4, 2015 Share Posted February 4, 2015 Thanks, i try your tool with a txd compress in DXT5, and can convert Dxt5 Pc to Pc. Really a pretty good tool. Please i hope this awesome project dont die. Thank you, again. what your "txdgen.ini" setting to convert pc txd to pc?. i want compress txd for gta3. Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1066920130 Share on other sites More sharing options...
The_GTA Posted February 4, 2015 Author Share Posted February 4, 2015 (edited) Any chance to built txd files with this tool in the future? I mean, conversion (TxdPC to TxdXbox) and build(Png, tar, etc to Txd). Yes, I have plans to release a seperate tool that uses the same toolchain. I guess it will be called "TxdBuild". what your "txdgen.ini" setting to convert pc txd to pc?. i want compress txd for gta3. To compress PC format TXD files, just put them (or the .img containers they are in) into the "txdgen_in/" folder. Then set "compressTextures" to "true". If you want to enable DXT5 compression (for better alpha), then set "compressionQuality" to "1.0". To target the GTAIII engine, set "targetVersion" to "GTA3". Also, set "targetPlatform" to "PC". Important to note is that already compressed textures will not be recompressed. By the way, I just uploaded a hotfix (0.8.2) that fixes conversion of PS2 textures to raw PC format (without DXT compression). 0.8.1 and prior have a little oversight that put out invalid TXD containers. Mirror (0.8.2): http://en.file-upload.net/download-10253109/txdgen_0.8.2.zip.html Edited February 4, 2015 by The_GTA Concavax, pangoomis and Jago 3 Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1066921325 Share on other sites More sharing options...
4NT1R3KL4M4 Posted February 4, 2015 Share Posted February 4, 2015 what your "txdgen.ini" setting to convert pc txd to pc?. i want compress txd for gta3. To compress PC format TXD files, just put them (or the .img containers they are in) into the "txdgen_in/" folder. Then set "compressTextures" to "true". If you want to enable DXT5 compression (for better alpha), then set "compressionQuality" to "1.0". To target the GTAIII engine, set "targetVersion" to "GTA3". Also, set "targetPlatform" to "PC". Important to note is that already compressed textures will not be recompressed. i did compressed all txd in gta3.img and rebuilt after but the game stuck at loading screen what's wrong. The_GTA 1 Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1066921508 Share on other sites More sharing options...
Concavax Posted February 4, 2015 Share Posted February 4, 2015 Any chance to built txd files with this tool in the future? I mean, conversion (TxdPC to TxdXbox) and build(Png, tar, etc to Txd). Yes, I have plans to release a seperate tool that uses the same toolchain. I guess it will be called "TxdBuild". I hope this come true The_GTA 1 Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1066923150 Share on other sites More sharing options...
The_GTA Posted February 5, 2015 Author Share Posted February 5, 2015 (edited) i did compressed all txd in gta3.img and rebuilt after but the game stuck at loading screen what's wrong. It turns out that I forgot to update the Direct3D texture native struct header, so that the game probably rejected the TXD archives (for a good reason). Then I forgot to add IMG archive version 1 creation support. Also, there was another crash when building IMG archives, due to me restructuring that code in 0.8.1. You guys really know how to put work into my hands Anyway, time for another hotfix release! Mirror (0.8.3): http://en.file-upload.net/download-10255544/txdgen_0.8.3.zip.html I recommend that anyone who has converted textures using prior versions lets this tool "fix" them by passing them through it. I tested this tool by compressing the GTA3 textures to DXT. In return I got faster loading times. Time to sleep now Edited February 5, 2015 by The_GTA 4NT1R3KL4M4 and Concavax 2 Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1066923786 Share on other sites More sharing options...
4NT1R3KL4M4 Posted February 5, 2015 Share Posted February 5, 2015 (edited) i did compressed all txd in gta3.img and rebuilt after but the game stuck at loading screen what's wrong. It turns out that I forgot to update the Direct3D texture native struct header, so that the game probably rejected the TXD archives (for a good reason). Then I forgot to add IMG archive version 1 creation support. Also, there was another crash when building IMG archives, due to me restructuring that code in 0.8.1. You guys really know how to put work into my hands Anyway, time for another hotfix release! Mirror (0.8.3): http://en.file-upload.net/download-10255544/txdgen_0.8.3.zip.html I recommend that anyone who has converted textures using prior versions lets this tool "fix" them by passing them through it. I tested this tool by compressing the GTA3 textures to DXT. In return I got faster loading times. Time to sleep now thanks for the quick fix now it workin well bug- dodo's rotor has no texture converting gta3 ps2 txd to pc Edited February 5, 2015 by 4NT1R3KL4M4 The_GTA and Concavax 2 Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1066924584 Share on other sites More sharing options...
Jago Posted February 5, 2015 Share Posted February 5, 2015 (edited) thanks for the quick fix now it workin well bug- dodo's rotor has no texture converting gta3 ps2 txd to pc not a bug, the ps2 model just has the rotor mapped to the one in "dodoalpha64" instead of getting its own dedicated texture also I LOVE THIS TOOL, I made a txd with dds2txd then converted it to vice city with no problemo, mip-maps and all edit: just noticed that magic txd builder came out, praise the lords for the bountiful tools Edited February 5, 2015 by Mr. Jago The_GTA 1 Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1066927558 Share on other sites More sharing options...
The_GTA Posted February 6, 2015 Author Share Posted February 6, 2015 I expect great things from you after posting this wonderful melody. After a quick test I gotta say that Magic.TxdBuilder works quite well. I dunno whether I still need to make a TXD building toolchain, other than for competetive purposes . I recommend using DK22Pac's tool with TxdGen. When you have created your TXD files, you can easily convert them to another game by setting the "gameRoot" directory to the output directory of Magic.TxdBuilder. Then set the "outputRoot" folder to "txdout_vicecity_pc/" or something. Happy modding! Concavax and Jago 2 Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1066927967 Share on other sites More sharing options...
Concavax Posted February 6, 2015 Share Posted February 6, 2015 I expect great things from you after posting this wonderful melody. After a quick test I gotta say that Magic.TxdBuilder works quite well. I dunno whether I still need to make a TXD building toolchain, other than for competetive purposes . I recommend using DK22Pac's tool with TxdGen. When you have created your TXD files, you can easily convert them to another game by setting the "gameRoot" directory to the output directory of Magic.TxdBuilder. Then set the "outputRoot" folder to "txdout_vicecity_pc/" or something. Happy modding! That is the soul of modding. (And Life) The_GTA 1 Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1066928102 Share on other sites More sharing options...
pangoomis Posted February 6, 2015 Share Posted February 6, 2015 Well...looks like DK always knows when to step on the scene, and make everyone happy. Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1066928701 Share on other sites More sharing options...
The_GTA Posted February 6, 2015 Author Share Posted February 6, 2015 Well...looks like DK always knows when to step on the scene, and make everyone happy. Ideas are what drive this world, man. Only fools give them up early. Things have to surface at the right time, with the right attitude pangoomis and Concavax 2 Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1066930913 Share on other sites More sharing options...
The Hero Posted February 18, 2015 Share Posted February 18, 2015 Hey, I didn't notice this thread till now. Cool work. This will sure be useful for librw. Why don't you come back on irc? The_GTA 1 Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1066984904 Share on other sites More sharing options...
The_GTA Posted February 25, 2015 Author Share Posted February 25, 2015 (edited) Hey, I didn't notice this thread till now. Cool work. This will sure be useful for librw. Why don't you come back on irc? Yo Now that I have version 0.9 out, I feel like I have a major milestone set. After a quick unshaking I will come over ------------------------------------------- Version 0.9 has just released! With it come two new tutorials that demonstrate the potential of TxdGen! (HQ download) (HQ download) Step up your game, brothers. San Andreas is much more enjoyable with mipmaps. Anyone who previously experienced problems with San Andreas textures with this tool: they are no more! I made important bug fixes after heavy testing sessions which have paid off. There of course are limitations of the engine that you still have to keep in mind tho. New in this version is fixed XBOX swizzling! I am no longer using the deprecated swizzling code. This means that you can convert all of XBOX GTA3 textures to PC. I am pretty sure that TxdGen supports all of the official Rockstar Games TXD files now. If you find any which do not work, please report to me in this thread. Happy modding! NOTE to people converting XBOX textures: Please do not use TXD Workshop for viewing the TXD archives after you have converted them to PC. TXD Workshop is seriously outdated and does not understand DXT4 not DXT5 compression. The community needs a new tool. If you just want to take a look at the output textures, download Sage Thumbs and set the "outputDebug" property in "txdgen.ini" to true. Edited February 26, 2015 by The_GTA Ash_735, NikDelgad, Concavax and 4 others 7 Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1067022218 Share on other sites More sharing options...
El Dorado Posted February 27, 2015 Share Posted February 27, 2015 (edited) This is the most easy to use tool since txd workshop, a few questions Textures with alpha channels should be DXT5, right? What about textures without alpha channel? This tool automatically sets the right level of compression to the textures? Edited February 27, 2015 by format c: The_GTA 1 Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1067031376 Share on other sites More sharing options...
The_GTA Posted February 27, 2015 Author Share Posted February 27, 2015 (edited) This is the most easy to use tool since txd workshop, a few questions Textures with alpha channels should be DXT5, right? What about textures without alpha channel? This tool automatically sets the right level of compression to the textures? Yea, it does. DXT2-5 add nothing quality-wise if there is no alpha. So they are always DXT1. Currently it completely relies on the user to switch between DXT3 and DXT5. If "compressionQuality" is equal or greater than "1", then it always compresses using DXT5. Otherwise it goes for DXT3. Isn't DXT5 better than DXT3 anyway? Thank you for the compliment, btw! (working on 0.9.1 now... should clean up some things) Edited February 28, 2015 by The_GTA Concavax 1 Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1067031611 Share on other sites More sharing options...
Concavax Posted March 1, 2015 Share Posted March 1, 2015 TxdGen Compared to Dk-Tools Using TXDWorkshop (dds2txd, wtd2dds, Magictxd, etc) TxdGen Dk´s tools The_GTA 1 Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1067042089 Share on other sites More sharing options...
KELASHI Posted March 7, 2015 Share Posted March 7, 2015 Should I deal with "texture has an invalid raster format"? Converting textures from SRT. Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1067071155 Share on other sites More sharing options...
The_GTA Posted March 7, 2015 Author Share Posted March 7, 2015 Should I deal with "texture has an invalid raster format"? Converting textures from SRT.The textures are automatically fixed for you. The only moment you have to act is if instead of "OK", it says "error: (...)". Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1067071410 Share on other sites More sharing options...
KawakSallas Posted March 9, 2015 Share Posted March 9, 2015 Any chance of a new txd workshop? I mean, a graphical interface and all... Maybe I don't know how to read, but what do I have to do if I want to edit or replace a specific texture inside a txd? Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1067083277 Share on other sites More sharing options...
The_GTA Posted March 9, 2015 Author Share Posted March 9, 2015 (edited) Any chance of a new txd workshop? I mean, a graphical interface and all...Maybe! I am currently rewriting my RenderWare implementation. When things are matured out I can release a tool with a GUI, preferably written in Lua. That tool would replace TXD Workshop. Maybe I don't know how to read, but what do I have to do if I want to edit or replace a specific texture inside a txd? TxdGen itself cannot currently insert textures, as it is not part of the featureset. The implementation is perfectly capable of doing it, though. Edited March 9, 2015 by The_GTA Concavax 1 Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1067083309 Share on other sites More sharing options...
dkluin Posted March 22, 2015 Share Posted March 22, 2015 I've used your tool, alpha textures end up completely messed. This needs work, and why the hell would someone use PS2 as an output? PC is much better in many ways. Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1067177444 Share on other sites More sharing options...
The_GTA Posted March 22, 2015 Author Share Posted March 22, 2015 (edited) I've used your tool, alpha textures end up completely messed. This needs work, (...). I agree! TXD Workshop finally needs a good replacement! For guys interested in my progress, my tool now successfully supports all mobile TXD formats. Since the RenderWare implementation is pretty new, I need to rewrite tons of code that is incompatible. When I am done TxdGen is gonna be even better! Edited March 22, 2015 by The_GTA Jago, Vadim M. and Concavax 3 Link to comment https://gtaforums.com/topic/764498-relopensrc-txdgen-rw-texture-converter/#findComment-1067178021 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now