Page 8 of 8

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

Posted: Sun May 20, 2012 5:26 am
by zardalu
Thanks windfury, that works!

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

Posted: Sun May 20, 2012 11:35 am
by TaylorMouse
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.

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

Posted: Sun May 20, 2012 1:25 pm
by zardalu
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!

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

Posted: Sun May 20, 2012 3:06 pm
by TaylorMouse
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.

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

Posted: Mon May 21, 2012 1:43 am
by Orvid
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.

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

Posted: Thu May 24, 2012 5:38 am
by dilbertgod
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?

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

Posted: Wed May 30, 2012 11:38 am
by Necrolis
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.

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

Posted: Mon Jun 04, 2012 5:31 pm
by TaylorMouse
Anyone figured out the bones on the models yet?

Or did I passed over it somewhere?

T.

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

Posted: Sat Jun 09, 2012 2:09 pm
by youseesee3
working on it:

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

Posted: Thu Oct 11, 2018 11:09 pm
by kalmiya
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.

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

Posted: Fri Oct 12, 2018 3:06 am
by episoder
what's this love for the dead beef? upload a sample then. done that other one already. i might just add to it.

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

Posted: Fri Oct 12, 2018 7:10 am
by kalmiya
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.

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

Posted: Fri Oct 12, 2018 3:42 pm
by episoder
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. :]

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

Posted: Fri Oct 12, 2018 7:43 pm
by kalmiya
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...