|
 |
|
|
|
|
|
GTA Modification Forums
[REL] ViceTXD Update Add new textures etc...
 |
|
 |
| |
DexX  |
|
Black Hat

Group: Retired Staff
Joined: May 16, 2002


|
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
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Spooky  |
|
Prince of the Yolkfolk

Group: Retired Staff
Joined: Jan 13, 2002



|
| 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 .
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
JernejL  |
|
Big Homie

Group: Retired Staff
Joined: Mar 11, 2002



|
| 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
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
steve-m  |
|

Group: Members
Joined: Jul 26, 2002



|
| 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 
But can I still get answers?
This post has been edited by ST.MU on Sunday, Sep 14 2003, 18:44
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Spooky  |
|
Prince of the Yolkfolk

Group: Retired Staff
Joined: Jan 13, 2002



|
| 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... 
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 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  [/Edit]
- Adding it now 
- The flags are in the dword right after the alpha name.
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
steve-m  |
|

Group: Members
Joined: Jul 26, 2002



|
| 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? 
[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
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Spooky  |
|
Prince of the Yolkfolk

Group: Retired Staff
Joined: Jan 13, 2002



|
| 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 .
| 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 |
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
steve-m  |
|

Group: Members
Joined: Jul 26, 2002



|
| 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 . | 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! 
| 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
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Pages:
(5) 1 [2] 3 4 ... Last »
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|
|
|
|