Quantcast

Jump to content

» «
Photo

[REL] TXD Builder

10 replies to this topic
ThaKilla
  • ThaKilla

    I'm not wack, im all wacked-out!

  • Members
  • Joined: 17 Sep 2004

#1

Posted 10 November 2005 - 08:30 PM Edited by REspawn, 14 February 2007 - 02:34 PM.

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.

commando
  • commando

    Gta-NY Leader

  • Members
  • Joined: 18 Nov 2003

#2

Posted 10 November 2005 - 08:35 PM

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?

ThaKilla
  • ThaKilla

    I'm not wack, im all wacked-out!

  • Members
  • Joined: 17 Sep 2004

#3

Posted 10 November 2005 - 08:42 PM Edited by ThaKilla, 12 November 2005 - 06:41 AM.

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

[NX] Joao.pt
  • [NX] Joao.pt

    Snitch

  • Members
  • Joined: 26 May 2005

#4

Posted 12 November 2005 - 03:32 PM

Hey see this i have a ATI Radeon 9550 and i have this bug
user posted image

Can i resolve this?

JernejL
  • JernejL

    Big Homie

  • Members
  • Joined: 11 Mar 2002

#5

Posted 12 November 2005 - 04:44 PM

QUOTE
user posted image


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

QUOTE (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.


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?

BenMillard
  • BenMillard

    aka Cerbera

  • Members
  • Joined: 22 Jun 2002

#6

Posted 12 November 2005 - 04:48 PM

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?

blitz1008
  • blitz1008

    Player Hater

  • Members
  • Joined: 31 Oct 2005

#7

Posted 12 November 2005 - 06:55 PM

QUOTE (Cerbera @ Nov 12 2005, 16:48)
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

ThaKilla
  • ThaKilla

    I'm not wack, im all wacked-out!

  • Members
  • Joined: 17 Sep 2004

#8

Posted 12 November 2005 - 11:54 PM

Delfi:
QUOTE
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:
QUOTE

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.

DexX
  • DexX

    Black Hat

  • Feroci Racing
  • Joined: 16 May 2002

#9

Posted 13 November 2005 - 12:12 AM

QUOTE
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

JernejL
  • JernejL

    Big Homie

  • Members
  • Joined: 11 Mar 2002

#10

Posted 13 November 2005 - 01:44 PM Edited by Delfi, 13 November 2005 - 01:45 PM.

QUOTE (ThaKilla @ Nov 13 2005, 00:54)
Delfi:
QUOTE
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:
QUOTE

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.

ThaKilla
  • ThaKilla

    I'm not wack, im all wacked-out!

  • Members
  • Joined: 17 Sep 2004

#11

Posted 14 November 2005 - 03:52 PM

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.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users