Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums! (92,466 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

The_GTA

[REL|OpenSrc] TxdGen, RW texture converter

Recommended Posts

The_GTA

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

This was my first tool release ever. Thank you so much for considering my tools!

 

Best wishes,

- Martin

Edited by The_GTA

Share this post


Link to post
Share on other sites
Concavax

This tool support dxt5?

Share this post


Link to post
Share on other sites
The_GTA

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 by The_GTA

Share this post


Link to post
Share on other sites
Concavax

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. :)

Share this post


Link to post
Share on other sites
Mr. Jago

looks really good, does it support mipmaps? also, could you put a mirror up by any chance?

Share this post


Link to post
Share on other sites
The_GTA
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 by The_GTA

Share this post


Link to post
Share on other sites
Vadim M.

Huge thanks for this tool! Now I can finally convert some Xbox txds to PC format!

Share this post


Link to post
Share on other sites
Concavax

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).

Share this post


Link to post
Share on other sites
4NT1R3KL4M4

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.

Share this post


Link to post
Share on other sites
The_GTA

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 by The_GTA

Share this post


Link to post
Share on other sites
4NT1R3KL4M4

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.

Share this post


Link to post
Share on other sites
Concavax

 

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". :)

:cookie::cookie::cookie::cookie::cookie::cookie::cookie::cookie:

I hope this come true :)

Share this post


Link to post
Share on other sites
The_GTA

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 :D

 

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 :lol:

Edited by The_GTA

Share this post


Link to post
Share on other sites
4NT1R3KL4M4

 

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 :D

 

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 :lol:

 

thanks for the quick fix now it workin well

 

bug- dodo's rotor has no texture converting gta3 ps2 txd to pc

Edited by 4NT1R3KL4M4

Share this post


Link to post
Share on other sites
Mr. Jago

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 by Mr. Jago

Share this post


Link to post
Share on other sites
The_GTA

I expect great things from you after posting this wonderful melody. :lol:

 

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 kappa.png?w=545.

 

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! :panic:

Share this post


Link to post
Share on other sites
Concavax

 

 

I expect great things from you after posting this wonderful melody. :lol: 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 kappa.png?w=545. 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! :panic:

 

That is the soul of modding. :cookie: (And Life)

Share this post


Link to post
Share on other sites
MrMateczko

Well...looks like DK always knows when to step on the scene, and make everyone happy.

Share this post


Link to post
Share on other sites
The_GTA

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 ;)

Share this post


Link to post
Share on other sites
The Hero

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?

Share this post


Link to post
Share on other sites
The_GTA

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 :D

 

-------------------------------------------

 

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. :cookie::cookie::cookie:

 

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 by The_GTA

Share this post


Link to post
Share on other sites
El Dorado

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 by format c:

Share this post


Link to post
Share on other sites
The_GTA

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 by The_GTA

Share this post


Link to post
Share on other sites
Concavax

TxdGen Compared to Dk-Tools Using TXDWorkshop (dds2txd, wtd2dds, Magictxd, etc)


TxdGen

gta_sa%2B2015-03-01%2B10-21-09.png

 

 

 

 

 

Dk´s tools

gta_sa%2B2015-03-01%2B10-29-08.png

 

 

Share this post


Link to post
Share on other sites
KELASHI

Should I deal with "texture has an invalid raster format"? Converting textures from SRT.

Share this post


Link to post
Share on other sites
The_GTA

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: (...)". :)

Share this post


Link to post
Share on other sites
KawakSallas

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?

Share this post


Link to post
Share on other sites
The_GTA

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 by The_GTA

Share this post


Link to post
Share on other sites
dkluin

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.

Share this post


Link to post
Share on other sites
The_GTA

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 by The_GTA

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.