Quantcast

Jump to content

» «
Photo

[REL|OpenSrc] TxdGen, RW texture converter

60 replies to this topic
The_GTA
  • The_GTA

    revenclaw

  • Members
  • Joined: 27 Dec 2012
  • Germany
  • Modding Milestone [Magic.TXD]

#1

Posted 29 January 2015 - 06:43 PM Edited by The_GTA, 16 October 2016 - 10:06 PM.

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
'SanAndreas Retextured3' on PlayStation 2
Tutorial on how to use TxdGen
Optimizing GTA3 Textures (PC) (tutorial, HQ download)
Mipmapping San Andreas for PC (tutorial, HQ download)
 
CreditsThis was my first tool release ever. Thank you so much for considering my tools!

Best wishes,
- Martin
  • The Hero, gamerzworld, Frank.s and 22 others like this

Concavax
  • Concavax

    Punk-ass Bitch

  • Members
  • Joined: 26 Dec 2013
  • None

#2

Posted 01 February 2015 - 04:39 AM

This tool support dxt5?


The_GTA
  • The_GTA

    revenclaw

  • Members
  • Joined: 27 Dec 2012
  • Germany
  • Modding Milestone [Magic.TXD]

#3

Posted 01 February 2015 - 11:35 AM Edited by The_GTA, 01 February 2015 - 12:02 PM.

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.

  • Concavax likes this

Concavax
  • Concavax

    Punk-ass Bitch

  • Members
  • Joined: 26 Dec 2013
  • None

#4

Posted 01 February 2015 - 08:01 PM

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


Mr. Jago
  • Mr. Jago

  • Members
  • Joined: 10 May 2011
  • United-States

#5

Posted 03 February 2015 - 07:51 AM

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


The_GTA
  • The_GTA

    revenclaw

  • Members
  • Joined: 27 Dec 2012
  • Germany
  • Modding Milestone [Magic.TXD]

#6

Posted 03 February 2015 - 12:20 PM Edited by The_GTA, 03 February 2015 - 08:49 PM.

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-uploa...en_0.8.zip.html

Mirror (0.8.1): http://www.file-uplo..._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 :)

  • Blackbird88, Vadim M., Mr. Jago and 2 others like this

Vadim M.
  • Vadim M.

    Stay tuned

  • Members
  • Joined: 09 Sep 2008
  • Latvia

#7

Posted 03 February 2015 - 10:09 PM

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

  • Ss4gogeta0 and The_GTA like this

Concavax
  • Concavax

    Punk-ass Bitch

  • Members
  • Joined: 26 Dec 2013
  • None

#8

Posted 04 February 2015 - 02:57 AM

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


4NT1R3KL4M4
  • 4NT1R3KL4M4

    Snitch

  • Members
  • Joined: 03 Feb 2015
  • None

#9

Posted 04 February 2015 - 06:45 AM

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.


The_GTA
  • The_GTA

    revenclaw

  • Members
  • Joined: 27 Dec 2012
  • Germany
  • Modding Milestone [Magic.TXD]

#10

Posted 04 February 2015 - 03:53 PM Edited by The_GTA, 04 February 2015 - 04:02 PM.

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-uploa..._0.8.2.zip.html

  • Mr. Jago, MrMateczko and Concavax like this

4NT1R3KL4M4
  • 4NT1R3KL4M4

    Snitch

  • Members
  • Joined: 03 Feb 2015
  • None

#11

Posted 04 February 2015 - 04:43 PM

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 likes this

Concavax
  • Concavax

    Punk-ass Bitch

  • Members
  • Joined: 26 Dec 2013
  • None

#12

Posted 04 February 2015 - 11:33 PM

 

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

  • The_GTA likes this

The_GTA
  • The_GTA

    revenclaw

  • Members
  • Joined: 27 Dec 2012
  • Germany
  • Modding Milestone [Magic.TXD]

#13

Posted 05 February 2015 - 02:52 AM Edited by The_GTA, 05 February 2015 - 03:04 AM.

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-uploa..._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:

  • Concavax and 4NT1R3KL4M4 like this

4NT1R3KL4M4
  • 4NT1R3KL4M4

    Snitch

  • Members
  • Joined: 03 Feb 2015
  • None

#14

Posted 05 February 2015 - 08:32 AM Edited by 4NT1R3KL4M4, 05 February 2015 - 09:35 PM.

 

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-uploa..._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

  • The_GTA and Concavax like this

Mr. Jago
  • Mr. Jago

  • Members
  • Joined: 10 May 2011
  • United-States

#15

Posted 05 February 2015 - 11:08 PM Edited by Mr. Jago, 05 February 2015 - 11:09 PM.

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

  • The_GTA likes this

The_GTA
  • The_GTA

    revenclaw

  • Members
  • Joined: 27 Dec 2012
  • Germany
  • Modding Milestone [Magic.TXD]

#16

Posted 06 February 2015 - 01:09 AM

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:

  • Mr. Jago and Concavax like this

Concavax
  • Concavax

    Punk-ass Bitch

  • Members
  • Joined: 26 Dec 2013
  • None

#17

Posted 06 February 2015 - 02:33 AM

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)

  • The_GTA likes this

MrMateczko
  • MrMateczko

    ThinkPad is love

  • Members
  • Joined: 10 Dec 2011
  • Poland
  • Helpfulness Award [Chain Game]

#18

Posted 06 February 2015 - 06:52 AM

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

The_GTA
  • The_GTA

    revenclaw

  • Members
  • Joined: 27 Dec 2012
  • Germany
  • Modding Milestone [Magic.TXD]

#19

Posted 06 February 2015 - 07:38 PM

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

  • MrMateczko and Concavax like this

The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#20

Posted 18 February 2015 - 12:09 PM

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 likes this

The_GTA
  • The_GTA

    revenclaw

  • Members
  • Joined: 27 Dec 2012
  • Germany
  • Modding Milestone [Magic.TXD]

#21

Posted 25 February 2015 - 12:15 PM Edited by The_GTA, 26 February 2015 - 05:13 AM.

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!

 

Optimizing GTA3 Textures (PC) (HQ download)

Mipmapping San Andreas (PC) (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.

  • The Hero, Ash_735, Tomasak and 4 others like this

El Dorado
  • El Dorado

    If it keeps on rainin' levee's goin' to break

  • Feroci
  • Joined: 07 Nov 2013
  • Brazil

#22

Posted 27 February 2015 - 12:17 PM Edited by format c:, 27 February 2015 - 12:20 PM.

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?

  • The_GTA likes this

The_GTA
  • The_GTA

    revenclaw

  • Members
  • Joined: 27 Dec 2012
  • Germany
  • Modding Milestone [Magic.TXD]

#23

Posted 27 February 2015 - 01:36 PM Edited by The_GTA, 28 February 2015 - 06:45 AM.

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)
  • Concavax likes this

Concavax
  • Concavax

    Punk-ass Bitch

  • Members
  • Joined: 26 Dec 2013
  • None

#24

Posted 01 March 2015 - 05:36 PM

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

Spoiler

 

Spoiler
  • The_GTA likes this

KELASHI
  • KELASHI

    Crackhead

  • Members
  • Joined: 25 Dec 2013
  • China

#25

Posted 07 March 2015 - 08:45 AM

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


The_GTA
  • The_GTA

    revenclaw

  • Members
  • Joined: 27 Dec 2012
  • Germany
  • Modding Milestone [Magic.TXD]

#26

Posted 07 March 2015 - 10:17 AM

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

KawakSallas
  • KawakSallas

    Kifflom

  • Members
  • Joined: 15 May 2012
  • None

#27

Posted 09 March 2015 - 03:23 PM

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?


The_GTA
  • The_GTA

    revenclaw

  • Members
  • Joined: 27 Dec 2012
  • Germany
  • Modding Milestone [Magic.TXD]

#28

Posted 09 March 2015 - 03:29 PM Edited by The_GTA, 09 March 2015 - 03:30 PM.

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.
  • Concavax likes this

dkluin
  • dkluin

    GTA:Underground Developer

  • Members
  • Joined: 11 Jun 2013
  • Netherlands
  • Best Conversion 2016 [GTA: Underground]

#29

Posted 22 March 2015 - 09:13 PM

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.


The_GTA
  • The_GTA

    revenclaw

  • Members
  • Joined: 27 Dec 2012
  • Germany
  • Modding Milestone [Magic.TXD]

#30

Posted 22 March 2015 - 10:55 PM Edited by The_GTA, 22 March 2015 - 11:19 PM.

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! :)
  • Vadim M., Mr. Jago and Concavax like this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users