Important information: this site is currently scheduled to go offline indefinitely by end of the year.
Textures of Beta Diablo 3, ".tex" files converter needed :)
Re: Textures of Beta Diablo 3, ".tex" files converter needed
Hmm OK. Well can anyone help with the 2D tex files which store the tga stuff?
Re: Textures of Beta Diablo 3, ".tex" files converter needed
..Back on topic, others and myself have been working on .tex. See here.
The pixel formats are run through a table to get the corresponding D3DFORMAT. For example, PF 4 is D3DFMT_A1R5G5B5.
Working on the pixel formats at the moment. I'll have DXT# working hopefully by the end of the day.
EDIT: Also: as with PF9 (DXT1), the components for the data are often separated.
EDIT: Someone has handled everything except for cubemaps; expect a tool soon. The spec will be updated once I am able to see the code.
The pixel formats are run through a table to get the corresponding D3DFORMAT. For example, PF 4 is D3DFMT_A1R5G5B5.
Working on the pixel formats at the moment. I'll have DXT# working hopefully by the end of the day.
EDIT: Also: as with PF9 (DXT1), the components for the data are often separated.
EDIT: Someone has handled everything except for cubemaps; expect a tool soon. The spec will be updated once I am able to see the code.
Re: Textures of Beta Diablo 3, ".tex" files converter needed
Got all the data extracted but need to make them into images now. Grr.. taking longer than I want!
edit: got guests around so I have to bail. for a few hours Anyone good at converting the binaries into actual images?
edit: got guests around so I have to bail. for a few hours Anyone good at converting the binaries into actual images?
Re: Textures of Beta Diablo 3, ".tex" files converter needed
Sure just slap a tga header before the data. 18 bytes:MrRawr wrote:Got all the data extracted but need to make them into images now. Grr.. taking longer than I want!
edit: got guests around so I have to bail. for a few hours Anyone good at converting the binaries into actual images?
Code: Select all
typedef struct
{
byte identsize; // size of ID field that follows 18 byte header (0 usually)
byte colourmaptype; // type of colour map 0=none, 1=has palette
byte imagetype; // type of image 0=none,1=indexed,2=rgb,3=grey,+8=rle packed
short colourmapstart; // first colour map entry in palette
short colourmaplength; // number of colours in palette
byte colourmapbits; // number of bits per palette entry 15,16,24,32
short xstart; // image x origin
short ystart; // image y origin
short width; // image width in pixels
short height; // image height in pixels
byte bits; // image bits per pixel 8,16,24,32
byte descriptor; // image descriptor bits (vh flip bits)
// pixel data follows header
} TGA_HEADER
Re: Textures of Beta Diablo 3, ".tex" files converter needed
enjoy (and give some feedback too!): http://diablo3dev.com/w/D3TexConv
Re: Textures of Beta Diablo 3, ".tex" files converter needed
Excellent tool!
You said you needed to know which files have mipmaps and which do not based upon the value at offset 44. Here are all of the files in which offset 44 does not have a 1:
Output to PNG would be excellent.
EDIT:
The program crashes on these files:
2DInventoryCharms.tex
2DInventoryHammers.tex
2DInventoryMightyWeapon_2H.tex
2DInventoryPvPItem.tex
2DMapTower.tex
2DUIDebug.tex
2DUIEndScreen.tex
There are more, but that's all I'll list now.
You said you needed to know which files have mipmaps and which do not based upon the value at offset 44. Here are all of the files in which offset 44 does not have a 1:
Code: Select all
Value at offset 44 - name of tex file
0x6 - arcaneTorrent_irrad.tex
0x6 - bronze_irradiance.tex
0x6 - CharacterSelect_IrradianceMap.tex
0x6 - dead_irradiance.tex
0x6 - Demon_Irradiance.tex
0x6 - ElmentalArrow_SkullIrradiance.tex
0x6 - Ghost_irrad.tex
0x6 - gold_irradiance.tex
0x6 - healthOrb_irradiance.tex
0x6 - HellIrradiance.tex
0x6 - Holy_irrad.tex
0x6 - iceShard_irradiance.tex
0x6 - irradiance.tex
0x6 - irradiance_dialogue.tex
0x6 - manaOrb_irradiance.tex
0x6 - neutral_unlit_irradiance.tex
0x6 - Selection_Hostile_Irradiance.tex
0x6 - Selection_Irradiance.tex
0x6 - silver_irradiance.tex
0x6 - trOutIrrad.tex
EDIT:
The program crashes on these files:
2DInventoryCharms.tex
2DInventoryHammers.tex
2DInventoryMightyWeapon_2H.tex
2DInventoryPvPItem.tex
2DMapTower.tex
2DUIDebug.tex
2DUIEndScreen.tex
There are more, but that's all I'll list now.
Re: Textures of Beta Diablo 3, ".tex" files converter needed
I tested it, some textures extracted successfully, but these texture, I guess it doesn't have an display iconenjoy (and give some feedback too!): http://diablo3dev.com/w/D3TexConv
_01sun.tex
_2DBusy_Hourglass.tex
_2DMapCryptDungeon.tex
_2DUI_Bnet_CampaignSearching.tex
_a1dun_Cath_chest.tex
_a2dun_Zolt_Dust_Spike.tex
And the rest files, maybe the main texture which are diffuse, specular, normal maps are failed
_a1dun_caves_Boulders_A_diff.tex
_a1dun_Leoric_Dirt_01.tex
_a2Dun_Cave_Flooded_E_01_worldMask.tex
_Barb_F_Hair_diff.tex
_DH_F_CLS_HVY_norm_base_A_diff.tex
_DH_F_CLS_HVY_norm_base_A_spec.tex
_Fetish_skeleton_A_diff.tex
_Helm_DHF_nightmare_base_02a_spec.tex
Re: Textures of Beta Diablo 3, ".tex" files converter needed
Thanks for the feedback guys , I'll get onto fixing it now
EDIT:
Crash on DXT1 files is solved (was me using the wrong size var -.-).
EDIT2:
Got mip mapped decoding in, gonna upload a new version now
made my original mip decoding code faster, but it seems D3 stores
zero sized miplevel, so the mip count is not to be fully trusted!
EDIT3: version 0.7 is live: http://diablo3dev.com/w/D3TexConv
I'll get round to more output formats when the core is doneFiel wrote: Output to PNG would be excellent.
EDIT:
Crash on DXT1 files is solved (was me using the wrong size var -.-).
they extract & view fine here, maybe your viewer is not up to scratch? (I'm using the MS DirectX Texture Viewer)npd2006 wrote: I tested it, some textures extracted successfully, but these texture, I guess it doesn't have an display icon
EDIT2:
Got mip mapped decoding in, gonna upload a new version now
made my original mip decoding code faster, but it seems D3 stores
zero sized miplevel, so the mip count is not to be fully trusted!
EDIT3: version 0.7 is live: http://diablo3dev.com/w/D3TexConv
Last edited by Necrolis on Thu Sep 15, 2011 8:36 am, edited 1 time in total.
Re: Textures of Beta Diablo 3, ".tex" files converter needed
Thanks for the heads up. I made the change in the source code and it's working beautifully.Necrolis wrote:EDIT:
Crash on DXT1 files is solved (was me using the wrong size var -.-).
The DDS viewing works fine for me on those files. I think he needs a better DDS viewer.Necrolis wrote:they extract & view fine here, maybe your viewer is not up to scratch? (I'm using the MS DirectX Texture Viewer)
Also, even after that source code change, there are still some files causing the program to crash:
arrow_poison.tex
BossWindow_middle.tex
Portal_Lightrays.tex
shoulderPads_barbF_nightmare_base_02a_TintMask.tex
shoulderPads_monkF_nightmare_base_01A_TintMask.tex
twoHandedSword_norm_unique_08_spec.tex
Re: Textures of Beta Diablo 3, ".tex" files converter needed
version 0.7 no longer crashes on those files, however, some (like BossWindow_middle.tex) aren't DXTn files, so I need to add DDS header writinf for those quickFiel wrote: Also, even after that source code change, there are still some files causing the program to crash:
arrow_poison.tex
BossWindow_middle.tex
Portal_Lightrays.tex
shoulderPads_barbF_nightmare_base_02a_TintMask.tex
shoulderPads_monkF_nightmare_base_01A_TintMask.tex
twoHandedSword_norm_unique_08_spec.tex
EDIT: v0.8 is out, will decode A8R8G8B8 files, just note D3 has some non-square, non-power-of-2 textures in this format (BossWindow_middle.tex), which will explode on some viewers (like MS's one)
Re: Textures of Beta Diablo 3, ".tex" files converter needed
I upgraded to 0.8 and I'm still crashing on all of the same files. I really do like the improved atlases.Necrolis wrote:version 0.7 no longer crashes on those files, however, some (like BossWindow_middle.tex) aren't DXTn files, so I need to add DDS header writinf for those quickFiel wrote: Also, even after that source code change, there are still some files causing the program to crash:
arrow_poison.tex
BossWindow_middle.tex
Portal_Lightrays.tex
shoulderPads_barbF_nightmare_base_02a_TintMask.tex
shoulderPads_monkF_nightmare_base_01A_TintMask.tex
twoHandedSword_norm_unique_08_spec.tex
EDIT: v0.8 is out, will decode A8R8G8B8 files, just note D3 has some non-square, non-power-of-2 textures in this format (BossWindow_middle.tex), which will explode on some viewers (like MS's one)
Re: Textures of Beta Diablo 3, ".tex" files converter needed
odd(I know the first two files work fine now...), I'll do a more indepth look when I get back from uni later. one thing though, is the crash an assertion or just the program freezing with an access violation?Fiel wrote:I upgraded to 0.8 and I'm still crashing on all of the same files. I really do like the improved atlases.
Re: Textures of Beta Diablo 3, ".tex" files converter needed
It throws two exceptions every time. First exception is a Buffer Overflow Exception, and then it's Appcrash. I'll run it through MSVC++ to see what's up.Necrolis wrote:odd(I know the first two files work fine now...), I'll do a more indepth look when I get back from uni later. one thing though, is the crash an assertion or just the program freezing with an access violation?
EDIT: Ran it through the MSVC++ debugger and it exited without any exceptions. wtf...
EDIT #2: My error. The program is fine. It was a problem with the script I use that feeds d3texconv with all the files. I tried to feed it a file that didn't exist.
EDIT #3: Good news everyone! I just fed this program every single tex file and they all passed without any crashes.