XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Tue Oct 23, 2018 11:36 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 ... 4, 5, 6, 7, 8
Author Message
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Sun May 20, 2012 5:26 am 
Offline
veteran
User avatar

Joined: Sat Sep 13, 2008 3:13 pm
Posts: 93
Has thanked: 3 times
Have thanks: 12 times














You can make the ads go away by registering

Thanks windfury, that works!


Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Sun May 20, 2012 11:35 am 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Mon Sep 26, 2011 12:51 pm
Posts: 364
Has thanked: 13 times
Have thanks: 122 times
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.

_________________
My Game Dev Blog
My Starcraft II Mod files and scripts


Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Sun May 20, 2012 1:25 pm 
Offline
veteran
User avatar

Joined: Sat Sep 13, 2008 3:13 pm
Posts: 93
Has thanked: 3 times
Have thanks: 12 times
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!


Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Sun May 20, 2012 3:06 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Mon Sep 26, 2011 12:51 pm
Posts: 364
Has thanked: 13 times
Have thanks: 122 times
Zardalu thnx man

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

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

_________________
My Game Dev Blog
My Starcraft II Mod files and scripts


Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Mon May 21, 2012 1:43 am 
Offline
ultra-n00b

Joined: Fri Feb 17, 2012 7:20 pm
Posts: 2
Has thanked: 0 time
Have thanks: 1 time
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.


Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Thu May 24, 2012 5:38 am 
Offline
ultra-n00b

Joined: Thu May 24, 2012 5:36 am
Posts: 1
Has thanked: 0 time
Have thanks: 0 time
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?


Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Wed May 30, 2012 11:38 am 
Offline
ultra-n00b

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


Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Mon Jun 04, 2012 5:31 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Mon Sep 26, 2011 12:51 pm
Posts: 364
Has thanked: 13 times
Have thanks: 122 times
Anyone figured out the bones on the models yet?

Or did I passed over it somewhere?

T.

_________________
My Game Dev Blog
My Starcraft II Mod files and scripts


Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Sat Jun 09, 2012 2:09 pm 
Offline
ultra-n00b

Joined: Sat Jun 09, 2012 2:07 pm
Posts: 1
Has thanked: 0 time
Have thanks: 0 time
working on it:


Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Thu Oct 11, 2018 11:09 pm 
Offline
beginner

Joined: Sun Mar 23, 2014 5:23 pm
Posts: 22
Location: The Neverlands
Has thanked: 1 time
Have thanks: 9 times
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.


Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Fri Oct 12, 2018 3:06 am 
Offline
veteran

Joined: Fri Oct 16, 2015 8:05 pm
Posts: 131
Has thanked: 2 times
Have thanks: 68 times
what's this love for the dead beef? upload a sample then. done that other one already. i might just add to it.


Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Fri Oct 12, 2018 7:10 am 
Offline
beginner

Joined: Sun Mar 23, 2014 5:23 pm
Posts: 22
Location: The Neverlands
Has thanked: 1 time
Have thanks: 9 times
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.

Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Fri Oct 12, 2018 3:42 pm 
Offline
veteran

Joined: Fri Oct 16, 2015 8:05 pm
Posts: 131
Has thanked: 2 times
Have thanks: 68 times
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. :]


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: Textures of Beta Diablo 3, ".tex" files converter needed
PostPosted: Fri Oct 12, 2018 7:43 pm 
Offline
beginner

Joined: Sun Mar 23, 2014 5:23 pm
Posts: 22
Location: The Neverlands
Has thanked: 1 time
Have thanks: 9 times
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...


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 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