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

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

Get your graphics formats figures out here! Got details for others? Post here!
BoyC
beginner
Posts: 36
Joined: Wed Jul 05, 2006 9:24 pm
Been thanked: 2 times

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

Post by BoyC »

I think what you labelled as normals might actually be blendweights for the bones per vertex and the normals binormals and tangents are stored 1 byte per axis in the vertex declaration.

EDIT:
Actually seems to be 3 sets of blendweights per vertex, 8 bytes each. First byte is the bone ID, still working on the rest.
BoyC
beginner
Posts: 36
Joined: Wed Jul 05, 2006 9:24 pm
Been thanked: 2 times

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

Post by BoyC »

EDIT: Moved to the appropriate thread
Last edited by BoyC on Tue Sep 13, 2011 8:37 pm, edited 1 time in total.
npd2006
beginner
Posts: 35
Joined: Tue Sep 13, 2011 9:15 am
Been thanked: 1 time

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

Post by npd2006 »

Hello, I and newbie to this. Please show me how to use these script. I have 010 editor but don't know how to use. Please help me. Thank you very much!
BoyC
beginner
Posts: 36
Joined: Wed Jul 05, 2006 9:24 pm
Been thanked: 2 times

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

Post by BoyC »

EDIT: Moved to the appropriate thread
Last edited by BoyC on Tue Sep 13, 2011 8:37 pm, edited 1 time in total.
npd2006
beginner
Posts: 35
Joined: Tue Sep 13, 2011 9:15 am
Been thanked: 1 time

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

Post by npd2006 »

Thank you BoyC but I still get some trouble:
1. When I open file .phm and use your script as template, I press F5 to Run and it said *ERROR Line 28: Template passed end of file at variable 'unk2'.

2. I have no idea about "copy/paste the output into a .obj file (skip the first line)"
I tried to copy it to notepad and save as .obj but it made nothing.

I already have Deep Exploration and 3DS max waiting for import model and texture to it :-)
Looking forward to your reply, BoyC !
afrokid
n00b
Posts: 10
Joined: Mon Jul 11, 2011 10:20 am

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

Post by afrokid »

Comment Removed.
Last edited by afrokid on Wed Sep 14, 2011 3:10 am, edited 1 time in total.
BoyC
beginner
Posts: 36
Joined: Wed Jul 05, 2006 9:24 pm
Been thanked: 2 times

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

Post by BoyC »

This script is for parsing the appearance (.app) files ;)
MrRawr
beginner
Posts: 25
Joined: Tue Sep 13, 2011 6:37 pm

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

Post by MrRawr »

Hey guys, I'm new here but not new to 101 editor (I actually have a brought version!)

I've made progress on all the diablo files (which I'm willing to share ofc!) but I'm not very good with graphics. I don't want the 3d models (way above my station) but the icons would be cool!

Can anyone help?

p.s I can help with some of the header file. @ 16[10h] you have the int BlizzardInternalFileNumber I believe :D and the 4h value is the file version (100% sure, at least it is for the other datafiles, not 100% about the .tex)

So if anyone could help me that would be awesome!

Here's a tempalte to get strings I made. It's really rough and prob over-complex but just to give something before requesting ^,^

Code: Select all

//--------------------------------------
//--- 010 Editor v3.0.1 Binary Template
//
// Author: MrRawr
// Revision: 1.0
// Purpose: Extract Most strings from Diablo3 text files
//--------------------------------------
local string title = "Items";
//local int fileHeader = FileNew();
local int fileItems = FileNew();
char type[4];
int version;
char empty[8];
int BlizzardFileNumber;
char empty2[8];
int dunno1;
int dunno2;
int dunno3;
int dunno4;
FPrintf( fileItems, "version,%i\n", version);
typedef struct {
    int stringPosition;
    int stringLength;
    int terminator;
    int blank;
} StringData;
local int searchHeader = 1;
struct Item{
    //FPrintf( fileHeader, "item");
    local int notTerminated;
    local int notEmpty;
    do {
        StringData stringData;
        //FPrintf( fileHeader, ",%i,%i", stringData.stringPosition, stringData.stringLength);
        notTerminated = stringData.terminator;
        notEmpty = stringData.stringLength;
    } while ( notTerminated == 0 && notEmpty > 0 );
    if ( notTerminated == -1 ) {
        StringData stringFiller;
        if ( stringFiller.terminator > 0 ) {
            searchHeader = 0;
            FSkip(-8);
        } 
    }
    else {
        int blank;
        if ( notTerminated > 1 ) {
            searchHeader = 0;
            FSkip(-12);
        }
        else if ( blank > 0 ) {
            FSkip(-4);
        }
    }
    //FPrintf( fileHeader, "\n");
};

do {
    Item item;
} while ( searchHeader == 1 );

//2290

local int i;
local int y;
local int length;
local int infoSize;
local int temp;
struct ItemInfo {
    infoSize = 0;
    while ( exists(item[i].stringData[y]) ) {
        length = item[i].stringData[y].stringLength;
        if ( length > 0 ) {
            if ( y == 0 ) {
                char itemCode[length];
                infoSize += sizeof(itemCode);
                if ( (length%8) > 0 ) {
                    char itemCodeFiller[8-(length%8)];
                    infoSize += sizeof(itemCodeFiller);
                }
                FPrintf( fileItems, ",%s", itemCode);
            }
            else if ( y == 1 ) {
                char itemType[length];
                infoSize += sizeof(itemType);
                if ( (length%8) > 0 ) {
                    char itemTypeFiller[8-(length%8)];
                    infoSize += sizeof(itemTypeFiller);
                }
                FPrintf( fileItems, ",%s", itemType);
            }
            else if ( y == 2 ) {
                char itemName[length];
                infoSize += sizeof(itemName);
                if ( (length%8) > 0 ) {
                    char itemNameFiller[8-(length%8)];
                    infoSize += sizeof(itemNameFiller);
                }
                FPrintf( fileItems, ",%s",  itemName);
            }
        }
        y++;
    }
};
i = 0;
while( exists(item[i]) ) {
    y = 0;
    FPrintf( fileItems, "itemInfo");
    ItemInfo itemInfo;
    if ( infoSize > 0 ) {
        FSkip(8-(infoSize%8));
    }
    FPrintf( fileItems, "\n");
    i++;
}
afrokid
n00b
Posts: 10
Joined: Mon Jul 11, 2011 10:20 am

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

Post by afrokid »

Edit: Nvm found them
Last edited by afrokid on Tue Sep 13, 2011 7:21 pm, edited 1 time in total.
npd2006
beginner
Posts: 35
Joined: Tue Sep 13, 2011 9:15 am
Been thanked: 1 time

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

Post by npd2006 »

npd2006 wrote:Thank you BoyC but I still get some trouble:
1. When I open file .phm and use your script as template, I press F5 to Run and it said *ERROR Line 28: Template passed end of file at variable 'unk2'.

2. I have no idea about "copy/paste the output into a .obj file (skip the first line)"
I tried to copy it to notepad and save as .obj but it made nothing.

I already have Deep Exploration and 3DS max waiting for import model and texture to it :-)
Looking forward to your reply, BoyC !
BoyC please help me !!!
MrRawr
beginner
Posts: 25
Joined: Tue Sep 13, 2011 6:37 pm

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

Post by MrRawr »

you're running it on the wrong file :) some .tex are for icons. The template given to you is for the 3d model textures
npd2006
beginner
Posts: 35
Joined: Tue Sep 13, 2011 9:15 am
Been thanked: 1 time

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

Post by npd2006 »

MrRawr wrote:you're running it on the wrong file :) some .tex are for icons. The template given to you is for the 3d model textures
So, what kind of filetype should I use?
and how about the "copy/paste the output into a .obj file (skip the first line) ?" I don't get it.
MrRawr
beginner
Posts: 25
Joined: Tue Sep 13, 2011 6:37 pm

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

Post by MrRawr »

npd2006 wrote:
MrRawr wrote:you're running it on the wrong file :) some .tex are for icons. The template given to you is for the 3d model textures
So, what kind of filetype should I use?
and how about the "copy/paste the output into a .obj file (skip the first line) ?" I don't get it.
They're also .tex, but you need to have the right ones. Ones named 2DCrossbows or something will be icons ;)

I believe he's talking about c for the other bit. But I'm just a noob when it comes to this sorta stuff.
npd2006
beginner
Posts: 35
Joined: Tue Sep 13, 2011 9:15 am
Been thanked: 1 time

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

Post by npd2006 »

They're also .tex, but you need to have the right ones. Ones named 2DCrossbows or something will be icons ;)
I had already done extract the obj files. But I still have problem with the texture. I test file .tex with your template but most of it have this error *WARNING Line 104: Empty structure. and no output.
But thank you anyway :)
BoyC
beginner
Posts: 36
Joined: Wed Jul 05, 2006 9:24 pm
Been thanked: 2 times

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

Post by BoyC »

I think this thread has become a bit too confusing with .tex .phm and .app files all being discussed in it. From now on I'll be posting the .app model file research to the appropriate thread.
Post Reply