Quantcast

Jump to content

» «
Photo

[SA|PLG]DDS2TXD

10 replies to this topic
_DK
  • _DK

    '22 'Pac

  • Members
  • Joined: 12 Apr 2009
  • Ukraine

#1

Posted 03 May 2013 - 09:11 AM Edited by DK22Pac, 15 June 2013 - 01:29 PM.

This .asi plugin generates .txd files from .dds images separated with folders.
The advantage of this using is that you can setup image properties, mipmap levels and compression type directly in image editor (DDS plugin for PS).
Notice it's not an application tool, that's a plugin for a game. This means, you need to launch-exit game and then you'll see the result.
So use this if you really know that you really need this smile.gif
  • Now I'll explain how its working.
    First - you need to create a folder named 'txd' in GTA SA root folder.
    Second - create folders inside the 'txd' folder if you want to build some txd archives separately.
    Third - inside these folders create folders with names for new .txd arhcives.
    Fourth - put .dds files inside these folders.
    For example:
    GTA SA
    --txd
    ----vehicles
    ------admiral
    --------body.dds
    --------wheel.dds
    --------glass.dds
    ------banshee
    --------body.dds
    --------wheel.dds
    ----general
    ------mytxd
    --------test.dds

    So, the code will generate admiral.txd, banshee.txd files inside 'vehicles' folder and mytxd.txd file in 'general' folder.
    Fifth - open/close your game.
  • If you want to work with .dds textures, there's NVIDIA DDS plugin for PS.
    While exporting an image, select the "DDS" format and then choose image compression/format type (For example DXT1 for image without alpha, DXT3/DXT5 for image with alpha. You can also try with other formats) and select an option for using prepared mipmaps/generated mipmaps.
  • You can open created .txd file with TXD Workshop, but don't click 'Save' then. You can't edit these archives with other tools anymore. If you want to edit it, you can just replace files inside your folders and re-generate archives with the plugin.
=DOWNLOAD=
  • Mr. Jago likes this

elMarcoPL
  • elMarcoPL

    Tronco

  • Members
  • Joined: 14 Mar 2011

#2

Posted 03 May 2013 - 11:11 AM Edited by xXaerooff2Xx, 03 May 2013 - 11:28 AM.

Yeah! Really good job. Gonna test it soon.

#edit - It works, but crashes when there is a texture with really long strenth, as:
nj5_shrubthing_rubbish2nj5bushdead1a.dds (GTA IV's texture)

_DK
  • _DK

    '22 'Pac

  • Members
  • Joined: 12 Apr 2009
  • Ukraine

#3

Posted 03 May 2013 - 11:38 AM Edited by DK22Pac, 03 May 2013 - 11:57 AM.

Ok, give me few mins to fix this...
Edit: Updated.

direstraits
  • direstraits

  • Members
  • Joined: 08 Mar 2011
  • Portugal

#4

Posted 03 May 2013 - 06:15 PM

Works perfectly. icon14.gif

You should add suport for DXT5

_DK
  • _DK

    '22 'Pac

  • Members
  • Joined: 12 Apr 2009
  • Ukraine

#5

Posted 03 May 2013 - 09:32 PM Edited by DK22Pac, 18 May 2013 - 01:10 PM.

DXT5 is supported. But TXD Workshop doesn't recognize it.

Ηeath
  • Ηeath

    Just Do It.

  • Members
  • Joined: 08 Feb 2011

#6

Posted 18 May 2013 - 05:35 AM

I would love to try this, but your account seems to be suspended. tounge.gif Mind re-uploading it again? smile.gif

_DK
  • _DK

    '22 'Pac

  • Members
  • Joined: 12 Apr 2009
  • Ukraine

#7

Posted 18 May 2013 - 01:19 PM

Reuploaded.

damiann69
  • damiann69

    He he

  • Members
  • Joined: 01 Feb 2011
  • Poland

#8

Posted 30 June 2013 - 08:47 AM Edited by damiann69, 30 June 2013 - 02:24 PM.

Hi. Plugin works very well, but I tried DXT save formats and they caused crashes SA after installing txd file to img archieve.
I tried with other (X.8.8.8 for example) formats and game runs good, but mipmaps don't seem to work. Texture is still grainy. I edited textures on original player model. Maybe game doesn't support mipmaps on this model. I don't know. Any ideas?

_DK
  • _DK

    '22 'Pac

  • Members
  • Joined: 12 Apr 2009
  • Ukraine

#9

Posted 2 weeks ago Edited by _DK, A week ago.

Hye guys!

Last night I did some small tool, maybe someone will find it useful.
It's called WTD2TXD, actually, a converter of GTA IV and Max Payne 3 PC texture dictionaries into GTA SA PC txd's.

kqkq.png 9wwj.png
 
I need this! (click to download from mediafire : version 0.5 with 3/VC/SA support)
 
I didn't create a new thread for it because it is very similar to DDS2TXD tool.

Building
Put the .exe file into the folder with .wtd files and launch it. The code will scan all files in that folder and also files in internal folders. Created .txd files will have same names as .wtd files.

Log file
After building, the log file will be generated. It will show you which textures was renamed (due to texture name size limit in RenderWare) and also skipped textures (if skipping options are enabled).

Configurations
There's an .ini file where you can set up some parameters.

Target
Game version. Only GTASA is supported.

Filtering
Filtering is the process used to determine how the texture object selects and displays individual MIP levels.
FilterMode is a mode for textures without mip-mapping. Available values are

rwFILTERNAFILTERMODE
rwFILTERNEAREST
rwFILTERLINEAR

FilterMipMode is a mode for textures with mip-mapping. Available values are

rwFILTERNAFILTERMODE
rwFILTERMIPNEAREST
rwFILTERMIPLINEAR
rwFILTERLINEARMIPNEAREST
rwFILTERLINEARMIPLINEAR

From RWG docs,
a3vf.png
 
Anisotropy filtering
From wikipedia, anisotropic filteringis a method of enhancing the image quality of textures on surfaces of computer graphics that are at oblique viewing angles with respect to the camera where the projection of the texture.
It could improve view of mip-mapped textures.
j2ng.png

The value you need to set is a max level of AF. You can check the max value that is supported on your system with this CLEO script:

{$CLEO}
0000:
while true
    wait 0
    0AA7: call_function 0x748F20 num_params 0 pop 0 0@
    0B10: 0@ = 0@ AND 0xFF
    0AD1: show_formatted_text_highpriority "Max supported anisotropy: %d" time 100 0@
end

Also, if you will set graphics settings to 'high' in game options, all textures that has AF enabled will use the maximum AF level that is available with your system.
 
Texture addressing
Addressing modes define the process used to determine a particular texel color. These modes define how the indexing along the texture map's U and V axes behaves when the edge of the texture map is reached.
Available values are

rwTEXTUREADDRESSWRAP
rwTEXTUREADDRESSMIRROR
rwTEXTUREADDRESSCLAMP
rwTEXTUREADDRESSBORDER

From RWG docs, 
8aij.png
 
Skipping options
You can skip normal map, bump map, specular map textures if you convert wtd archive directly from GTA IV. See parameters in SKIPPING OPTIONS section.

TXD Workshop
TXD Workshop is very old tool and it has many issues. It can't recognize DXT5, A8R8G8B8 and X8R8G8B8 correctly. So don't panic if you see incorrect images there. Check your txd in-game, it must work.

OpenIV
I recommend to use OpenIV for creating .wtd files. You can generate mipmaps there for non-dds images and also set up pixels format manually.

  • methodunderg, fastman92, LINK/2012 and 4 others like this

_DK
  • _DK

    '22 'Pac

  • Members
  • Joined: 12 Apr 2009
  • Ukraine

#10

Posted A week ago Edited by _DK, A week ago.

WTD2TXD was updated to version 0.5

Changes list:

-Added GTA3 target support;

-Added GTAVC target support;

-Anisotropy could be used with GTAVC target.

 

MipMaps in GTA 3 ;)

 
  • Silent, TJGM and MasterHK like this

TJGM
  • TJGM

    for science.

  • Members
  • Joined: 14 Jun 2011
  • Ireland

#11

Posted A week ago Edited by TJGM, A week ago.

Awesome stuff DK!
 
Some screens of mipmapped roads and vegetation in III HD, along with all the other fancy features. :)
 
gta3%202014-04-11%2003-21-15-28.png
 
gta3%202014-04-11%2003-08-08-12.png

EDIT: Just mipmapped more of the vegetation!

gta3%202014-04-11%2003-39-42-92.png

gta3%202014-04-11%2003-39-22-94.png

gta3%202014-04-11%2003-39-05-70.png

EDIT2: Mipmapped some other stuff.

Stadium before:
gta3%202014-04-11%2004-33-16-15.png
Stadium after:
gta3%202014-04-11%2004-44-59-20.png

Street + bushes before:
gta3%202014-04-11%2004-14-14-50.png
Street + bushes after:
gta3%202014-04-11%2004-31-06-17.png

Casino:
gta3%202014-04-11%2004-13-28-23.png
gta3%202014-04-11%2004-13-48-92.png

Billboard:
gta3%202014-04-11%2004-13-10-58.png

Skyscrappers:
gta3%202014-04-11%2004-13-01-57.png
  • Mr. Jago likes this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users