XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Wed Jan 16, 2019 4:54 pm

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 119 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Author Message
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Tue Sep 13, 2011 8:18 pm 
Offline
beginner

Joined: Tue Sep 13, 2011 6:37 pm
Posts: 25
Has thanked: 0 time
Have thanks: 0 time

Hmm OK. Well can anyone help with the 2D tex files which store the tga stuff?

You can make the ads go away by registering



Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Tue Sep 13, 2011 11:06 pm 
Offline
ultra-n00b

Joined: Sat May 14, 2011 12:56 pm
Posts: 3
Has thanked: 0 time
Have thanks: 0 time
..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.


Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Wed Sep 14, 2011 6:14 pm 
Offline
beginner

Joined: Tue Sep 13, 2011 9:15 am
Posts: 35
Has thanked: 0 time
Have thanks: 1 time
Any idea about the textures, MrRawr ?


Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Wed Sep 14, 2011 7:07 pm 
Offline
beginner

Joined: Tue Sep 13, 2011 6:37 pm
Posts: 25
Has thanked: 0 time
Have thanks: 0 time
getting there, give me 30 mins...


Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Wed Sep 14, 2011 7:53 pm 
Offline
beginner

Joined: Tue Sep 13, 2011 6:37 pm
Posts: 25
Has thanked: 0 time
Have thanks: 0 time
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?


Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Wed Sep 14, 2011 9:18 pm 
Offline
beginner

Joined: Wed Jul 05, 2006 9:24 pm
Posts: 34
Has thanked: 0 time
Have thanks: 2 times
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?


Sure just slap a tga header before the data. 18 bytes:
Code:
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


Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Wed Sep 14, 2011 9:26 pm 
Offline
ultra-n00b

Joined: Wed Sep 14, 2011 9:06 pm
Posts: 7
Has thanked: 0 time
Have thanks: 0 time
enjoy (and give some feedback too!): http://diablo3dev.com/w/D3TexConv


Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Wed Sep 14, 2011 10:32 pm 
Offline
advanced

Joined: Sun Dec 16, 2007 6:29 pm
Posts: 46
Has thanked: 2 times
Have thanks: 2 times
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:

Code:
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


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.


Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Thu Sep 15, 2011 4:21 am 
Offline
beginner

Joined: Tue Sep 13, 2011 9:15 am
Posts: 35
Has thanked: 0 time
Have thanks: 1 time
Quote:
enjoy (and give some feedback too!): http://diablo3dev.com/w/D3TexConv

I tested it, some textures extracted successfully, but these texture, I guess it doesn't have an display icon
_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


Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Thu Sep 15, 2011 6:34 am 
Offline
ultra-n00b

Joined: Wed Sep 14, 2011 9:06 pm
Posts: 7
Has thanked: 0 time
Have thanks: 0 time
Thanks for the feedback guys :D, I'll get onto fixing it now

Fiel wrote:
Output to PNG would be excellent.
I'll get round to more output formats when the core is done

EDIT:
Crash on DXT1 files is solved (was me using the wrong size var -.-).

npd2006 wrote:
I tested it, some textures extracted successfully, but these texture, I guess it doesn't have an display icon
they extract & view fine here, maybe your viewer is not up to scratch? (I'm using the MS DirectX Texture Viewer)

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.

Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Thu Sep 15, 2011 8:13 am 
Offline
advanced

Joined: Sun Dec 16, 2007 6:29 pm
Posts: 46
Has thanked: 2 times
Have thanks: 2 times
Necrolis wrote:
EDIT:
Crash on DXT1 files is solved (was me using the wrong size var -.-).


Thanks for the heads up. I made the change in the source code and it's working beautifully.

Necrolis wrote:
they extract & view fine here, maybe your viewer is not up to scratch? (I'm using the MS DirectX Texture Viewer)


The DDS viewing works fine for me on those files. I think he needs a better DDS 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


Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Thu Sep 15, 2011 8:53 am 
Offline
ultra-n00b

Joined: Wed Sep 14, 2011 9:06 pm
Posts: 7
Has thanked: 0 time
Have thanks: 0 time
Fiel 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
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 quick

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)


Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Thu Sep 15, 2011 10:08 am 
Offline
advanced

Joined: Sun Dec 16, 2007 6:29 pm
Posts: 46
Has thanked: 2 times
Have thanks: 2 times
Necrolis wrote:
Fiel 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
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 quick

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)


I upgraded to 0.8 and I'm still crashing on all of the same files. I really do like the improved atlases.


Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Thu Sep 15, 2011 10:20 am 
Offline
ultra-n00b

Joined: Wed Sep 14, 2011 9:06 pm
Posts: 7
Has thanked: 0 time
Have thanks: 0 time
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.
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?


Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Thu Sep 15, 2011 10:24 am 
Offline
advanced

Joined: Sun Dec 16, 2007 6:29 pm
Posts: 46
Has thanked: 2 times
Have thanks: 2 times
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?


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.

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.



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 119 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group