Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Diablo IV (.tex) textures

Get your graphics formats figures out here! Got details for others? Post here!
User avatar
IstiGI
ultra-n00b
Posts: 6
Joined: Mon Nov 16, 2015 4:10 pm
Has thanked: 1 time
Been thanked: 1 time

Diablo IV (.tex) textures

Post by IstiGI »

Hi guys!

So I was lucky to be invited in D4 closed beta and managed to unpack some texture files from the game. Years ago there was .tex to .dds converter for Diablo 3, but it doesn't work with D4 obviously.

Any help? :roll:
https://drive.google.com/file/d/1Ddei7P ... share_link
https://drive.google.com/file/d/1s5NL7A ... share_link
https://drive.google.com/file/d/1dyAgLn ... share_link
roswell
advanced
Posts: 62
Joined: Tue Apr 02, 2019 1:00 am
Has thanked: 6 times
Been thanked: 13 times

Re: Diablo IV (.tex) textures

Post by roswell »

Diablo 4 is new to me. Can we see some model data?

Are all texture files this large? 28MB? It seems unusually large for a single texture.
User avatar
IstiGI
ultra-n00b
Posts: 6
Joined: Mon Nov 16, 2015 4:10 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Diablo IV (.tex) textures

Post by IstiGI »

Not all of them this large. I thought it would be more convenient to add the largest ones as an example Image

And those are 2D interface textures

EDIT. Did some research and it seems that there are separate texture files and meta data for it
https://drive.google.com/file/d/1cw7E5q ... share_link - meta data
https://drive.google.com/file/d/1vMIC_V ... share_link - texture
roswell
advanced
Posts: 62
Joined: Tue Apr 02, 2019 1:00 am
Has thanked: 6 times
Been thanked: 13 times

Re: Diablo IV (.tex) textures

Post by roswell »

IstiGI wrote: Sun Dec 04, 2022 9:35 am Not all of them this large. I thought it would be more convenient to add the largest ones as an example
Not really, the smallest files are best. The less data to look at, the better. And not just one file, we need several, for comparisons.
User avatar
IstiGI
ultra-n00b
Posts: 6
Joined: Mon Nov 16, 2015 4:10 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Diablo IV (.tex) textures

Post by IstiGI »

Ok. Here are few more examples with smaller size
https://drive.google.com/file/d/1K9sPs1 ... share_link
roswell
advanced
Posts: 62
Joined: Tue Apr 02, 2019 1:00 am
Has thanked: 6 times
Been thanked: 13 times

Re: Diablo IV (.tex) textures

Post by roswell »

Payload texture:
Looks like pure texture data, most likely in some compressed format.

Meta data:
0x18 (DWORD), possibly texture format.
0x28 (DWORDs), width, height of texture. Not always powers of 2, but always a multiple of 4.

Rest of meta data probably meaningless until someone figures out what texture format(s) are being used.
rman1234
ultra-n00b
Posts: 4
Joined: Fri Jul 02, 2021 7:51 pm
Has thanked: 2 times

Re: Diablo IV (.tex) textures

Post by rman1234 »

I'm also trying to see if I figure out how to extract the subfiles on each of these textures. I could find the metadata to get the format (usually BC1 or BC3) and the width/height, but some metadata also points to the texture rectangles to extract/crop specific subtextures.

Example of an extracted texture + the corresponding tex meta file:
https://anonymfile.com/VpmOx/skills1-2.png
https://anonymfile.com/6NQD0/skills1.tex
https://anonymfile.com/AWEAP/colours1.png
https://anonymfile.com/Lap6a/colours1.tex

I can't figure out what coordinates to crop to get the subtextures, they have names on the .tex and some values there, but I can't find how they are supposed to be cropped (left, right, sizes...). Any idea on how to assemble the coordinates for cropping from the meta .tex files?
Spiritovod
mega-veteran
mega-veteran
Posts: 181
Joined: Sun Oct 10, 2010 9:44 pm
Has thanked: 35 times
Been thanked: 162 times

Re: Diablo IV (.tex) textures

Post by Spiritovod »

@rman1234: Metadata is divided into 100 bytes per block for a sub-texture, where last 32 bytes are normalized float coordinates for two points of rectangle, which probably works like UVs for texture (x+y pairs from top left). Though I'm not sure about why there are two sets there, for rectangle textures they are identical or close to that, which looks rather like designer fault.
rman1234
ultra-n00b
Posts: 4
Joined: Fri Jul 02, 2021 7:51 pm
Has thanked: 2 times

Re: Diablo IV (.tex) textures

Post by rman1234 »

That is what I was missing! The normalized texture coordinates, thanks so much @Spiritovod :)
Rushster
n00b
Posts: 10
Joined: Sat May 08, 2021 2:55 pm
Has thanked: 2 times

Re: Diablo IV (.tex) textures

Post by Rushster »

Did you manage to figure this out? I am trying to get a look at these now but not sure where to start and what to use to get these working.
Thidnen
ultra-n00b
Posts: 1
Joined: Fri Feb 10, 2023 4:00 pm

Re: Diablo IV (.tex) textures

Post by Thidnen »

IstiGI wrote: Tue Dec 06, 2022 1:15 pm Ok. Here are few more examples with smaller size
https://drive.google.com/file/d/1K9sPs1 ... share_linkpapa's pizzeria
Thanks for these example
Rushster
n00b
Posts: 10
Joined: Sat May 08, 2021 2:55 pm
Has thanked: 2 times

Re: Diablo IV (.tex) textures

Post by Rushster »

So I have tried using Rawtex to get the .tex files to show but so far all coming out looking like garbage. Tried numerous settings on both the larger and smaller files but so far no cigar.

Has anyone had success getting these files converted and out to PNG?
Rushster
n00b
Posts: 10
Joined: Sat May 08, 2021 2:55 pm
Has thanked: 2 times

Re: Diablo IV (.tex) textures

Post by Rushster »

Still looking to get these texture files out to at least DDS. Has anyone got any help or pointers? I have tried numerous tools but to no avail so far :(
nic77
ultra-n00b
Posts: 2
Joined: Fri Aug 13, 2021 1:22 am

Re: Diablo IV (.tex) textures

Post by nic77 »

Has anyone been able to convert them to .dds? Im tryting to do it with the beta files but as the previous user said even after using many tools I haven't been able to
BoyC
beginner
Posts: 36
Joined: Wed Jul 05, 2006 9:24 pm
Been thanked: 2 times

Re: Diablo IV (.tex) textures

Post by BoyC »

nic77 wrote: Tue Mar 21, 2023 3:24 pm Has anyone been able to convert them to .dds? Im tryting to do it with the beta files but as the previous user said even after using many tools I haven't been able to
The raw texture data seems to be in bog standard DXGI_FORMAT_BC3_UNORM_SRGB: https://imgur.com/a/m0YLwHg
Post Reply