Offtopic: Into Commodore 64 (6502) coding, pixeling or music?
Xentax is looking for new members for the C64 activities!
Just drop us a message at forum@xentax.com and join the Scene Team!

Forum rules: Click here

Textures of Beta Diablo 3, ".tex" files converter needed :)

Get your graphics formats figures out here! Got details for others? Post here!
User avatar
zardalu
veteran
Posts: 93
Joined: Sat Sep 13, 2008 3:13 pm
Has thanked: 3 times
Been thanked: 12 times
Contact:

Re: Textures of Beta Diablo 3, ".tex" files converter needed

Post by zardalu » Sun May 20, 2012 5:26 am

Thanks windfury, that works!

User avatar
TaylorMouse
ultra-veteran
ultra-veteran
Posts: 335
Joined: Mon Sep 26, 2011 12:51 pm
Has thanked: 11 times
Been thanked: 79 times

Re: Textures of Beta Diablo 3, ".tex" files converter needed

Post by TaylorMouse » Sun May 20, 2012 11:35 am

Oke, nice solution, but I don't want to change each tex file manually,
is there a way to do this, all at once?

More on the question, is there ANY one that gets to compile the code from the D3TexConv_v0.9 source code??

Cause I can't, I'm more of a C# person, no clue how to compile this in C++ in Visual Studio 2010 :cry:

Thnx
T.

User avatar
zardalu
veteran
Posts: 93
Joined: Sat Sep 13, 2008 3:13 pm
Has thanked: 3 times
Been thanked: 12 times
Contact:

Re: Textures of Beta Diablo 3, ".tex" files converter needed

Post by zardalu » Sun May 20, 2012 1:25 pm

Sadly, I'm not a programmer, but thanks to windfury I did come up a ridiculously circuitous method that works for me:
I use XVI32 Hex editor. Make sure you back up your files as using a hex editor can royally screw them. Not my fault if this happens, use at your own risk.

1. I make the following script for XVI32 in Notepad:

ADR 0
REPLACE EF BE AD DE 2D BY EF BE AD DE 2B

and save it in my extracted Diablo 3 textures folder as texture.xsc. It doesn't really matter where you save it, so long as you get the path right in your batch file.

2. I make the following batch file and save it in my extracted Diablo 3 textures folder (which in this example for me is C:\GAMEDATA\DIABLOIII\WORK\TEST\). Of course, you will have to update your paths to XVI32.exe and texture.xsc:

@for /f "tokens=*" %%a in ('dir /b *.tex') do ( "E:\APPLICATIONS\HEX EDITOR XVI32\xvi32_2.51\xvi32.exe" %%a /S="C:\GAMEDATA\DIABLOIII\WORK\TEST\texture.xsc" )

3. I run the batch file and watch the magic.
EDIT: Took me about 40 minutes to do all of the files. Effective...but not efficient. Also, it doesn't like spaces in the .tex file name. There are only a few, but add an underscore or something or you'll have to watch the whole thing.

4. I use D3TexConv_v0.9 to convert the files. So far they all seem to work.

Good luck!

User avatar
TaylorMouse
ultra-veteran
ultra-veteran
Posts: 335
Joined: Mon Sep 26, 2011 12:51 pm
Has thanked: 11 times
Been thanked: 79 times

Re: Textures of Beta Diablo 3, ".tex" files converter needed

Post by TaylorMouse » Sun May 20, 2012 3:06 pm

Zardalu thnx man

in the mean time I came up with some c# code :)

Code: Select all

           // change th 5th byte to something else
            string file = @"2DInventoryBelts.tex";

            using(BinaryReader br = new BinaryReader(File.Open(file, FileMode.Open)))
            {
                byte[] header = br.ReadBytes(4);
                int nbrBytes = (int)br.BaseStream.Length;

                byte change = br.ReadByte(); // is 45, change to 43

                using (BinaryWriter bw = new BinaryWriter(File.Create(file.Replace(".tex","CON.tex"))))
                {
                    byte newByte = (byte)43;

                    bw.Write(header);
                    bw.Write(newByte);
                    bw.Write(br.ReadBytes(nbrBytes-5));


                    bw.Close();
                }


                br.Close();
            }

I put a looping around it so it does this for all the tex at the same time and I added a Process.Start(...) so it immediatly converts it to DDS.

Cheers

T.

Orvid
ultra-n00b
Posts: 2
Joined: Fri Feb 17, 2012 7:20 pm
Been thanked: 1 time

Re: Textures of Beta Diablo 3, ".tex" files converter needed

Post by Orvid » Mon May 21, 2012 1:43 am

Who says you need to re-compile it? Open the .exe in a hex editor and change the byte at offset 0x1487 from 2B to 2D.

dilbertgod
ultra-n00b
Posts: 1
Joined: Thu May 24, 2012 5:36 am

Re: Textures of Beta Diablo 3, ".tex" files converter needed

Post by dilbertgod » Thu May 24, 2012 5:38 am

Is it possible to convert an altered .dds / .txt file back into a diablo3 .tex file, or has a converter not been released for such a thing?

Necrolis
ultra-n00b
Posts: 7
Joined: Wed Sep 14, 2011 9:06 pm

Re: Textures of Beta Diablo 3, ".tex" files converter needed

Post by Necrolis » Wed May 30, 2012 11:38 am

dilbertgod wrote:Is it possible to convert an altered .dds / .txt file back into a diablo3 .tex file, or has a converter not been released for such a thing?
there is no converter that I know of, I was planning to make one, but unfortunately I've been totally swamped with work and university (hence why the tool also hasn't been updated to remove the 0x2D check, which is incorrect, as its the SNO version).
TaylorMouse wrote:Oke, nice solution, but I don't want to change each tex file manually,
is there a way to do this, all at once?

More on the question, is there ANY one that gets to compile the code from the D3TexConv_v0.9 source code??

Cause I can't, I'm more of a C# person, no clue how to compile this in C++ in Visual Studio 2010 :cry:
Its actually written for code::blocks, here is an updated version + source: D3TexConv 0.9b.
it removes the retarded version check, plus now all files it creates will be outputted to a folder called D3TexConv in the same folder as the file it just converted.

User avatar
TaylorMouse
ultra-veteran
ultra-veteran
Posts: 335
Joined: Mon Sep 26, 2011 12:51 pm
Has thanked: 11 times
Been thanked: 79 times

Re: Textures of Beta Diablo 3, ".tex" files converter needed

Post by TaylorMouse » Mon Jun 04, 2012 5:31 pm

Anyone figured out the bones on the models yet?

Or did I passed over it somewhere?

T.

youseesee3
ultra-n00b
Posts: 1
Joined: Sat Jun 09, 2012 2:07 pm

Re: Textures of Beta Diablo 3, ".tex" files converter needed

Post by youseesee3 » Sat Jun 09, 2012 2:09 pm

working on it:

kalmiya
beginner
Posts: 22
Joined: Sun Mar 23, 2014 5:23 pm
Location: The Neverlands
Has thanked: 1 time
Been thanked: 9 times
Contact:

Re: Textures of Beta Diablo 3, ".tex" files converter needed

Post by kalmiya » Thu Oct 11, 2018 11:09 pm

The current version of diablo3 (2.6.1 / 2018) has some textures in a new format.
The D3TexConv tool isn't able to convert format 0x2B (=43) for example a2dun_zolt_floor_design_B_autoNM.tex.
Does anyone have an idea what an *autoNM file stores - or how to get them to convert ?

I mean, a first guess would be NormalMap but those are already stored in *_norm files.

episoder
veteran
Posts: 145
Joined: Fri Oct 16, 2015 8:05 pm
Has thanked: 3 times
Been thanked: 67 times

Re: Textures of Beta Diablo 3, ".tex" files converter needed

Post by episoder » Fri Oct 12, 2018 3:06 am

what's this love for the dead beef? upload a sample then. done that other one already. i might just add to it.

kalmiya
beginner
Posts: 22
Joined: Sun Mar 23, 2014 5:23 pm
Location: The Neverlands
Has thanked: 1 time
Been thanked: 9 times
Contact:

Re: Textures of Beta Diablo 3, ".tex" files converter needed

Post by kalmiya » Fri Oct 12, 2018 7:10 am

Spare time project which I picked up again for fun. Back in 2014 or so had an importer working and was able to get keyframes and decided to finish it up a bit and get the code for interpolation working. Wanted to see if the fileformat of the meshes/animations changed so grabbed the current version, and noticed the new textureformat, so yeah... here's a link with some sample files https://www.dropbox.com/s/3lt4qzcop2w1o ... M.zip?dl=0

I'll check out your post and adjust D3TexConv to see if anything else is missing.

Many url's with developer info on D3 are dead now, unfortunately.
So cool that someone is still active, didn't expect that.
Last edited by kalmiya on Fri Oct 12, 2018 8:06 pm, edited 1 time in total.

episoder
veteran
Posts: 145
Joined: Fri Oct 16, 2015 8:05 pm
Has thanked: 3 times
Been thanked: 67 times

Re: Textures of Beta Diablo 3, ".tex" files converter needed

Post by episoder » Fri Oct 12, 2018 3:42 pm

i'm not exactly active on this d3 thing. just picked up the file puzzle on zenhax. and well... those samples seem to be bc6h format. i've never seen the pattern really, but i can spot half float data. will update when i got it. i won't update the d3texconv tho. i can't read this decode code. seems nonsense to me. done it my way. easy. gotta rewrite the bms to output into the dx10 dds format tho. :)

edit: i was wrong. nothing half about it. just DXTn normal maps. :]
You do not have the required permissions to view the files attached to this post.

kalmiya
beginner
Posts: 22
Joined: Sun Mar 23, 2014 5:23 pm
Location: The Neverlands
Has thanked: 1 time
Been thanked: 9 times
Contact:

Re: Textures of Beta Diablo 3, ".tex" files converter needed

Post by kalmiya » Fri Oct 12, 2018 7:43 pm

Oh nicey, thanks!

Didn't know bms, good to know for future use.
Attached the old D3TexConv-tool revived and updated to a sparkly fresh v0.91...
You do not have the required permissions to view the files attached to this post.

Post Reply