IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

This section is for obtaining help on creating and releasing tools

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


Pages: (5) 1 [2] 3 4 ... Last »  ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 [REL] ViceTXD Update

 Add new textures etc...
 
DexX  
Posted: Friday, Sep 12 2003, 03:35
Quote Post


Black Hat
Group Icon
Group: Retired Staff
Joined: May 16, 2002

Member Award




heh, atleast you don't ignore the bugs. Do you (spooky) or anyone else know what the flags do? ive noticed texture with an alpha channel have flag 9 and 11 checked. "normal" textures, have flag 10 and 11. Some cutscene objects have flag 16 set and the txd's that contain tommy's extra skins also have flag 16 marked. Some of the 8-bit textures use flag 14.
Flag 10 is consistently checked off in all the ones ive checked, except those with an alpha channel.
Ive tested a few other combinations, some of which froze the game.

Speaking of which, spooky, i created an entirely new txd with your program, and when i tested it ingame, it froze the game on loading. it was a duplicate of a txd i knew worked, so something went wrong somewhere. I went to File > New and named it, then made 3 new textures, one with alpha channel support, and sized / named them appropriately. Are there any tips or suggestions you might have?

This post has been edited by ashdexx on Friday, Sep 12 2003, 03:36
PM
  Top
 

 
MPD  
Posted: Friday, Sep 12 2003, 09:42
Quote Post


Punk-ass Bitch
Group Icon
Group: Members
Joined: Aug 1, 2003

XXXXX



@Spooky. thanks. i needed that. colgate.gif
Users WebsitePMMSN
  Top
 

 
Spooky  
Posted: Friday, Sep 12 2003, 10:35
Quote Post


Prince of the Yolkfolk
Group Icon
Group: Retired Staff
Joined: Jan 13, 2002

uk.gif

Member Award




QUOTE (ashdexx @ Sep 12 2003, 03:35)
Speaking of which, spooky, i created an entirely new txd with your program, and when i tested it ingame, it froze the game on loading. it was a duplicate of a txd i knew worked, so something went wrong somewhere. I went to File > New and named it, then made 3 new textures, one with alpha channel support, and sized / named them appropriately. Are there any tips or suggestions you might have?

Which TXD did you reproduce? I've remade quite a few TXDs from gta3.img: radars, skins, buildings etc, keeping the flags as they were and had no problems sad.gif.
Users WebsitePM
  Top
 

 
DexX  
Posted: Friday, Sep 12 2003, 18:24
Quote Post


Black Hat
Group Icon
Group: Retired Staff
Joined: May 16, 2002

Member Award




the txd i based it off was a custom txd that i had originally made with steve's txd builder. anyway, on seeing that the one i reproduced didnt work, i promptly deleted it and put the old one back in my game. however if it happens again, ill zip it and send it to you if ya want.
PM
  Top
 

 
JernejL  
Posted: Friday, Sep 12 2003, 18:42
Quote Post


Big Homie
Group Icon
Group: Retired Staff
Joined: Mar 11, 2002

se.gif

Member Award




QUOTE (ashdexx @ Sep 12 2003, 04:35)
heh, atleast you don't ignore the bugs. Do you (spooky) or anyone else know what the flags do? ive noticed texture with an alpha channel have flag 9 and 11 checked. "normal" textures, have flag 10 and 11. Some cutscene objects have flag 16 set and the txd's that contain tommy's extra skins also have flag 16 marked. Some of the 8-bit textures use flag 14.
Flag 10 is consistently checked off in all the ones ive checked, except those with an alpha channel.
Ive tested a few other combinations, some of which froze the game.

Speaking of which, spooky, i created an entirely new txd with your program, and when i tested it ingame, it froze the game on loading. it was a duplicate of a txd i knew worked, so something went wrong somewhere. I went to File > New and named it, then made 3 new textures, one with alpha channel support, and sized / named them appropriately. Are there any tips or suggestions you might have?

"Some cutscene objects have flag 16 set and the txd's that contain tommy's extra skins also have flag 16 marked. "

i think you just found the "detail texturing" flag that would enable extremely quality
rendeering of textures in gtavc!

example: *can't find a example image of how this looks but was used in battlefield: 1741 game
the textures realy looked amazingly better!


if the flag is what i think it is then this is good news for car makers especialy!

maybe the flag can be chrome or differently shaded etc...

This post has been edited by Delfi on Friday, Sep 12 2003, 18:46
Users WebsitePMMSN
  Top
 

 
DexX  
Posted: Sunday, Sep 14 2003, 01:56
Quote Post


Black Hat
Group Icon
Group: Retired Staff
Joined: May 16, 2002

Member Award




i tried flag 16 on a couple cars, and didnt notice any effect. whatever it does, IF it works on cars too, the effect is not obvious. maybe it only effects certain things...?

more testing is in order. Btw, what exactly do you mean by, "high quality rendering" ? if its cutscenes your talking about, i notice they do look better, but thats usually because of more detailed models, i didn't think the textures also had special attributes too.......hmm........
PM
  Top
 

 
steve-m  
Posted: Sunday, Sep 14 2003, 16:49
Quote Post



Group Icon
Group: Members
Joined: Jul 26, 2002

gr.gif

Member Award




Great work Spooky, but:

- The second DWORD value in the TXD file is the size of the whole file minus 12, but in a test file I created it was a VERY huge number (wrong of course).

- The (empty) extension section (3) after the texture data section (1) is missing, but I guess it isn't needed anyway.

- When adding a new texture, could you make your tool automaticly get the dimensions of the texture and the texture/alpha name from the file name (without extension), so the user doesn't need to enter it everytime?

- What is that flag you are talking about? The DWORD before texture name? I just found three different values yet: 4353, 4354 and 4358. The hex look like this: 0x00001101, 0x00001102, 0x00001106. Only the first byte seems to change. Haven't done tests with that yet.

QUOTE
maybe the flag can be chrome or differently shaded etc...
Unlikely... dontgetit.gif

Steve
Users WebsitePM
  Top
 

 
JernejL  
Posted: Sunday, Sep 14 2003, 17:10
Quote Post


Big Homie
Group Icon
Group: Retired Staff
Joined: Mar 11, 2002

se.gif

Member Award




gah! we need a special "TXD Tech" topic for this kind of stuff,
talking here just scares people...
Users WebsitePMMSN
  Top
 

 
steve-m  
Posted: Sunday, Sep 14 2003, 18:44
Quote Post



Group Icon
Group: Members
Joined: Jul 26, 2002

gr.gif

Member Award




QUOTE (Delfi @ Sep 14 2003, 19:10)
gah! we need a special "TXD Tech" topic for this kind of stuff,
talking here just scares people...

hehe, true biggrin.gif

But can I still get answers? tounge.gif

This post has been edited by ST.MU on Sunday, Sep 14 2003, 18:44
Users WebsitePM
  Top
 

 
Spooky  
Posted: Sunday, Sep 14 2003, 19:13
Quote Post


Prince of the Yolkfolk
Group Icon
Group: Retired Staff
Joined: Jan 13, 2002

uk.gif

Member Award




QUOTE (ST.MU @ Sep 14 2003, 16:49)
Great work Spooky, but:

- The second DWORD value in the TXD file is the size of the whole file minus 12, but in a test file I created it was a VERY huge number (wrong of course).

- The (empty) extension section (3) after the texture data section (1) is missing, but I guess it isn't needed anyway.

- When adding a new texture, could you make your tool automaticly get the dimensions of the texture and the texture/alpha name from the file name (without extension), so the user doesn't need to enter it everytime?

- What is that flag you are talking about? The DWORD before texture name? I just found three different values yet: 4353, 4354 and 4358. The hex look like this: 0x00001101, 0x00001102, 0x00001106. Only the first byte seems to change. Haven't done tests with that yet.

QUOTE
maybe the flag can be chrome or differently shaded etc...
Unlikely... dontgetit.gif

Steve

- I've just noticed a bug in my code there, the second dword is always 4, no matter what, but i guess Vice doesnt use it as the TXDs seem to work fine. I think you're refering to the 3rd dword, which Delfi informed me is the "gametype"... with "268697599" being ViceCity.

- I wasn't even aware of this extra data section wow.gif I've not come across a texture that doesn't start right after the texture before's data + mipmap data.

[Edit]
Oops, missed your third item smile.gif
[/Edit]

- Adding it now biggrin.gif

- The flags are in the dword right after the alpha name.
Users WebsitePM
  Top
 

 
Spooky  
Posted: Sunday, Sep 14 2003, 19:48
Quote Post


Prince of the Yolkfolk
Group Icon
Group: Retired Staff
Joined: Jan 13, 2002

uk.gif

Member Award




I've updated it and it's available at the same url...

Download: Setup.exe (491kb)
Users WebsitePM
  Top
 

 
steve-m  
Posted: Sunday, Sep 14 2003, 20:43
Quote Post



Group Icon
Group: Members
Joined: Jul 26, 2002

gr.gif

Member Award




QUOTE (Spooky @ Sep 14 2003, 21:13)
I think you're refering to the 3rd dword, which Delfi informed me is the "gametype"... with "268697599" being ViceCity.

No, first dword is section type, second section size and third the version id of the renderware file. TXD files have the same basic format as DFF files and consist of sections with different purpose. See KCows dff documentation for more infos. Every section has a 12 byte section header, containing type, size and ver id.
The version id is
0x0800FFFF for GTA3,
0x0C02FFFF for VC PS2 and
0x1003FFFF for VC PC
(in the most cases).

The (usual) txd format looks like this:
CODE
(22) Texture Dictionary
|
+-+ (1) Data
| |--> Number of Textures (dword)
|
+-+ (21) Texture No. 1
| |-+ (1) Data
| | |--> (all the texture information and the image itself)
| |
| +-- (3) Extension (always empty - size=0) --> MISSING
|
+-+ (21) Texture No. 2
| |-- ... (same as above)
|
+-+ (21) Texture No. 3
  |-- ...

(The number in brackets stands for the section type - dword)

QUOTE (Spooky @ Sep 14 2003, 21:13)
- The flags are in the dword right after the alpha name.

These are just the alpha flags and (hopefully) depend on the image type:
CODE
8bit without alpha: 9728
8bit with alpha: 9472

32bit without alpha: 1536
32bit with alpha: 1280

DXT1 without alpha: 512
DXT1 with alpha: 256
DXT3 with alpha: 768

(Just the second byte of the dword changes, that's why all values are divisible by 256)

So does anyone know, what the dword flag between constant dword 8 and texture name means? Although it could be different for every single texture, it is always the same within the whole TXD AFAIK.
Both flag and ver id can be changed in my TXD Builder (see options), if anyone likes to test.

Anything unclear? tounge2.gif

[EDIT] Spooky, although leaving out the empty extension section isn't wrong and using the wrong section size doesn't seem to cause an error, most of the old TXD editors, viewers and installers only know the "standard" format and won't get along with other formats, even if they are theoretically correct.

[EDIT 2] Sorry for filling your topic with this crap, haven't seen Delfi started a new one.

Steve

This post has been edited by ST.MU on Sunday, Sep 14 2003, 21:22
Users WebsitePM
  Top
 

 
Spooky  
Posted: Sunday, Sep 14 2003, 21:21
Quote Post


Prince of the Yolkfolk
Group Icon
Group: Retired Staff
Joined: Jan 13, 2002

uk.gif

Member Award




QUOTE (ST.MU @ Sep 14 2003, 20:43)
QUOTE (Spooky @ Sep 14 2003, 21:13)
I think you're refering to the 3rd dword, which Delfi informed me is the "gametype"... with "268697599" being ViceCity.

No, first dword is section type, second section size and third the version id of the renderware file.
I know, but you said when adding new textures/creating a new txd it had a high number where the size should be, but because of the bug, it was never high, it was always 4... which is why I thought you were mistaken smile.gif.

QUOTE (ST.MU @ Sep 14 2003, 20:43)
The (usual) txd format looks like this:
CODE
(22) Texture Dictionary
+-+ (1) Data
| |-- Number of Textures (dword)
|
+-+ (21) Texture No. 1
| |-+ (1) Data
| | |-- (all the texture information and the image itself)
| |
| +-- (3) Extension (always empty - size=0) --> MISSING
|
+-+ (21) Texture No. 2
|  |-- ... (same as above)
|
+-+ (21) Texture No. 3
   |-- ...
If the extension section is empty/missing in every texture, how do you know it exists?

QUOTE (ST.MU @ Sep 14 2003, 20:43)
QUOTE (Spooky @ Sep 14 2003, 21:13)
- The flags are in the dword right after the alpha name.

These are just the alpha flags and (hopefully) depend on the image type:
CODE
8bit without alpha: 9728
8bit with alpha: 9472

32bit without alpha: 1536
32bit with alpha: 1280

DXT1 without alpha: 512
DXT1 with alpha: 256
DXT3 with alpha: 768

(Just the second byte of the dword changes, that's why all values are divisible by 256)
I thought the same but some textures stray from this key... for example some player/npc skins are DXT1 without alpha and the flags are 33280... which led me to believe it's 16 individual 1-bit flags.

QUOTE (ST.MU @ Sep 14 2003, 20:43)
So does anyone know, what the dword flag between constant dword 8 and texture name means?
I didn't know this, but Delfi told me it's todo with the texture pixel format...
CODE
special: Longword;               // 4354= 16bit
                                // 4358= 8bpp
                                // 4354= 32bpp
Users WebsitePM
  Top
 

 
steve-m  
Posted: Sunday, Sep 14 2003, 21:52
Quote Post



Group Icon
Group: Members
Joined: Jul 26, 2002

gr.gif

Member Award




QUOTE (Spooky @ Sep 14 2003, 23:21)
I know, but you said when adding new textures/creating a new txd it had a high number where the size should be, but because of the bug, it was never high, it was always 4... which is why I thought you were mistaken smile.gif.
It's like that: The number was very high (4294967288), when you look at it as dword/cardinal/whatever (+). But when you look at it as integer (+/-) it is -8, that means you took the 4 and subtracted the 12 byte headersize, so it became negative! Both of us are right! smile.gif

QUOTE (Spooky @ Sep 14 2003, 23:21)
If the extension section is empty/missing in every texture, how do you know it exists?
The extension section is empty because the 12 byte section header is there, saying the section has a size of 0 byte, so it contains no data/other sections. And the missing was related to YOUR txd file, because there isn't even this section header.
This is a section header:
CODE
type TSectionHeader = record
 sectype,  // A number defining the type of section
 size,  // The size of the section, the 12 byte of this header not included
 verID: cardinal;  // The file format version ID, the same for every header in one file
end;
So when I write "(22) Texture Dictionary", it means "This is a 12 byte header with sectype=22".
In txd files only data sections contain data, the others contain other sections again, as you can see in my graph.

QUOTE (Spooky @ Sep 14 2003, 23:21)
I didn't know this, but Delfi told me it's todo with the texture pixel format...
CODE
special: Longword;               // 4354= 16bit
                                // 4358= 8bpp
                                // 4354= 32bpp
This can't be right, because this flag is usually the same for every texture in one txd archive, and these can be different formats of course. We still need to find out the sense of this.

Steve
Users WebsitePM
  Top
 

 
Spooky  
Posted: Monday, Sep 15 2003, 04:19
Quote Post


Prince of the Yolkfolk
Group Icon
Group: Retired Staff
Joined: Jan 13, 2002

uk.gif

Member Award




ViceTXD updated! - 1.5b biggrin.gif

I've re-wrote alot of the code as well as general fixes/additions, expect a few bugs :s.

Download: Setup.exe (491kb)

---

Steve, I've sorted the extension section wink.gif.
Users WebsitePM
  Top
 

 
JernejL  
Posted: Monday, Sep 15 2003, 10:20
Quote Post


Big Homie
Group Icon
Group: Retired Staff
Joined: Mar 11, 2002

se.gif

Member Award




come on you two!
go to the new txd format discussions topic about this sh*t!
and spooky - moderator, move these last tech posts there ok?
Users WebsitePMMSN
  Top
 

 
Spooky  
Posted: Monday, Sep 15 2003, 14:28
Quote Post


Prince of the Yolkfolk
Group Icon
Group: Retired Staff
Joined: Jan 13, 2002

uk.gif

Member Award




I can only move whole threads, not posts :s. I'll just order everyone to move there! tounge.gif
Users WebsitePM
  Top
 

 
ZanderZ  
Posted: Tuesday, Sep 16 2003, 08:57
Quote Post


GTA modder & tool writer
Group Icon
Group: Members
Joined: Sep 8, 2002

nl.gif

XXXXX



I just downloaded the Citroën 2CV at www.philsfiles.de and I opened the huge txd file in ViceTXD. There were only 3 8bit textures, of max. size 128x128. Yet the txd file was over 1 mb!
Then I opened the txd in TXD Workshop and I could see there were 8 more 512x512 textures!
How come ViceTXD doesn't show these?
Users WebsitePM
  Top
 

 
Spooky  
Posted: Tuesday, Sep 16 2003, 12:15
Quote Post


Prince of the Yolkfolk
Group Icon
Group: Retired Staff
Joined: Jan 13, 2002

uk.gif

Member Award




The texture count in the main file header must be screwed... ViceTXD scans through the file for textures untill it reaches <texture count>, then it exits the function.

I've updated ViceTXD just for you wink.gif, it'll now read all textures and let you know about the error, and also let you fix it if you want to.

Download: Setup.exe (491kb)
Users WebsitePM
  Top
 

 
steve-m  
Posted: Tuesday, Sep 16 2003, 14:40
Quote Post



Group Icon
Group: Members
Joined: Jul 26, 2002

gr.gif

Member Award




The txd could have been made with TXD Gold, because I guess there was a bug that doesn't "physically" delete textures, just changes the number in the header.
Users WebsitePM
  Top
 

 

0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)

0 Members:

Pages: (5) 1 [2] 3 4 ... Last »

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG