Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

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

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

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

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

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

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

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. 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. 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. News

    2. Forum Support

    3. Site Suggestions

ThaKilla

[REL] TXD Builder

Recommended Posts

ThaKilla

From the time I started editing Vice City I have had a dream to be able to edit TXD files using my own code. While GTAVC-VisualCode is long gone, I have not given up my dream.

 

And now I am pleased to say I have finally done it.

This program can do everthing you need to a TXD (except preview right on a few cards, but if you save it than its right confused.gif )

 

I am using DirectX for 90% of the work that this program does (converting Bits, MipMaps, Alphas, Preview.)

 

This is a BETA release and here are a few bugs I know of:

MipMaps will not work on cars, peds, weapons. (SA just dosn't support them, and why would you mipmap a dynamic object anyway)

There is a problem with Radeon cards that makes my 2D preview look like a 3D landscape. (If any of you have a problem please PM and let me know, I'm working on trying to fix it.)

Problem with reading the Alpha channel of a DDS file on import (will be fixed very soon)

 

Now some information about what it can do:

It will allow you to create new TXDs

Allow for Adding/Deleting of Images from TXD

Generate/Clear MipMaps

Resize Textures

Enable/Disable Alpha Channels

Convert 16-bit to 32-Bit (and 32-bit to 16-bit)

Supports Import of bmp, jpg, tga, dds, png

Supports Export bmp, dds (more will be added)

 

Screen Shot

 

TXD Builder Download

 

Edit 2: Even though I have not really gotten any more fed back on the Radeon issue, I have been hard at work trying to fix it. the only thing I could figure is that the vertexbuffer was being cleared on each pass, so I made it so it sets it on the render loop.

 

Edit:

Ok, Here is a graph of the cards that work so far:

Nvidia [||||||||]

Radeon [|........]

Other [|........]

ati saphire [.........]

 

Nvida & Other:

user posted image

 

Radeon:

9800:user posted image

 

9000:user posted image

 

To test the Preview orblem, download and extract--->start "TXDBuilder.exe"--->click on "New TXD"--> and tell me if it shows up right

 

Please help me fix the problems, the Data part is no problem, you can use all the features with no problem (if you export the file its right), its just the preview.

Edited by REspawn

Share this post


Link to post
Share on other sites
commando

Good work for what i can see. cookie.gif

This will be a very good alternative to the other txd programs. Any special tools in the program that we didnt saw yet on a txd program?

Share this post


Link to post
Share on other sites
ThaKilla

Not really, not till the next GTASA-UE gets released, but thats mainly being able to go from the TXD Preview to the Editor, and than save it backto the IMG it came from.

 

But once I have some of the preview bugs worked out, than I might add some more features.

 

Edit: Matter of fact, I think I'm going to add a option, so you can automictly resize every images by a percent (1-200%).

Edited by ThaKilla

Share this post


Link to post
Share on other sites
[NX] Joao.pt

Hey see this i have a ATI Radeon 9550 and i have this bug

user posted image

 

Can i resolve this?

Share this post


Link to post
Share on other sites
JernejL

 

user posted image

 

This is exactly why i use software compression / decompression in my TXD Workshop - it is reliable and flexible and IT WORKS.

 

 

From the time I started editing Vice City I have had a dream to be able to edit TXD files using my own code. While GTAVC-VisualCode is long gone, I have not given up my dream.

 

So you say you don't like other's program code, BUT do you think is it rational to build another txd editor or you just have way too much time?

 

Share this post


Link to post
Share on other sites
BenMillard

Maybe fixing the bugs in GTASA Ultimate Editor and developing a more modern interface for it would be a better place to direct your coding talents, TK?

Share this post


Link to post
Share on other sites
blitz1008
Maybe fixing the bugs in GTASA Ultimate Editor and developing a more modern interface for it would be a better place to direct your coding talents, TK?

agreed

Share this post


Link to post
Share on other sites
ThaKilla

Delfi:

 

This is exactly why i use software compression / decompression in my TXD Workshop - it is reliable and flexible and IT WORKS.

 

I just tried that idea.

Wehn setting the textures data bytes to the directX texture, I was showing it as a 32-bit texture so I changed it to 16-bit texture and it was still wrong.

 

But I think the real problem is that the Video Card is actually throwing my vertex points (3d Coords) out the window and using its own (in the case where it shows up solid green, I think its streching the box to its own numbers)

 

Everything else works and is handled by DirectX (except for saving/adding raw alpha channel pictures, thats all my code biggrin.gif)

 

But thanks for the suggestion

 

[NX] Joao.pt:

 

Can i resolve this?

 

Im working on, it I just dont have the hardware that this mess up on, any help would be appreactied.

 

 

Here is a breif of the precesses I use when showing the TXD preview:

Read the TXD (bulids the structure with all the TXD info, and data, inluding its mipmaps)

InitDX (checking for the presents of hardware vertex buffer, cause I thought that might have been it)

Convert the TXDs format to DXT1 (just changed to test Delfi's idea)

set the points for my 3d panel (4 points drawn with trianglefan)

start the render loop

 

Its nothing comlicated and its very standard directx code.

Also I have it so it uses texture Coords (UV) to place it on the box instead of cameraspace.

Share this post


Link to post
Share on other sites
DexX

 

MipMaps will not work on cars, peds, weapons. (SA just dosn't support them, and why would you mipmap a dynamic object anyway)

dunno about peds and weapons, but mipmaps are automatically generated in the game, for cars. the effect is noticable on large textures, and i tend to use 512 and 1024 textures for vehicles.

 

Also, Steve M produced a "Txd Builder" for vice and gta3, and he named it "TXD Builder". To avoid confusion, you might re-name your app? i can change the topic title if you think of something else.

 

Check your DirectX SDK for "DxTex.exe", which does alot of what you are, but without the .txd support. you can find it in:

your dx sdk directory\Utilities\Bin\x86 and the source to it in \Utilities\Source\dxtex

Share this post


Link to post
Share on other sites
JernejL

 

Delfi:

 

This is exactly why i use software compression / decompression in my TXD Workshop - it is reliable and flexible and IT WORKS.

 

I just tried that idea.

Wehn setting the textures data bytes to the directX texture, I was showing it as a 32-bit texture so I changed it to 16-bit texture and it was still wrong.

 

But I think the real problem is that the Video Card is actually throwing my vertex points (3d Coords) out the window and using its own (in the case where it shows up solid green, I think its streching the box to its own numbers)

 

Everything else works and is handled by DirectX (except for saving/adding raw alpha channel pictures, thats all my code biggrin.gif)

 

But thanks for the suggestion

 

[NX] Joao.pt:

 

Can i resolve this?

 

Im working on, it I just dont have the hardware that this mess up on, any help would be appreactied.

 

 

Here is a breif of the precesses I use when showing the TXD preview:

Read the TXD (bulids the structure with all the TXD info, and data, inluding its mipmaps)

InitDX (checking for the presents of hardware vertex buffer, cause I thought that might have been it)

Convert the TXDs format to DXT1 (just changed to test Delfi's idea)

set the points for my 3d panel (4 points drawn with trianglefan)

start the render loop

 

Its nothing comlicated and its very standard directx code.

Also I have it so it uses texture Coords (UV) to place it on the box instead of cameraspace.

 

 

You misunderstood my hint (NOT IDEA!), why do you use directx rendering context? how's the idle cpu usage, hello ?!? i don't use neither directx or opengl to compress or decompress, and thats how i avoided all those troubles you have right now!

 

DXTn images are ALWAYS 16 bit, it is just the decompressor that can do a little interpolation to make a better looking 32 bit texture but that will get lost again after compression so your program would for every load / save degrade all image quality.

 

Also, i suggest you take the cerbera's advice seriously.

Edited by Delfi

Share this post


Link to post
Share on other sites
ThaKilla

Thanks for the help, Guys.

 

I got it working. Also this is not intened as a stand-alone editor, it is to be intergrated in to GTASA-Ultimate Editor. I just striped it our for testing purposes.

 

So with that said what I'm going to allow is being able to edit TXDs from the IMG Editor, or any og GTASA-UE's TXD preview windows. And when your done with your changes, than you can simply save it back to the IMG file, or discard the cahnges.

 

One of the nicest uses I found was the ability to shrink car textures down to the 256-512 range, for us poor souls running on out-dated hardware. (It helps out alot.)

 

Also I have done away with my render loop all together (Directx Still handles creating the graphic, its just not used to display it.)

 

The reason why Im using directx is the Data Structure for the TXD files is exacly the same, so with a few lines of code I can convert 32bit to 16bit, add/view mipmaps, resize, pretty much anything people have expected from a TXD Editor.

 

The only thing I have to worr about is the TXDs Headers (and adding alpha to preexisting pictures.) A side note on the te Alpha support, I made it so the alpha channel will resize with the imported picture.

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.