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

DirectX binary format

Post questions about game models here, or help out others!
User avatar
alera
advanced
Posts: 71
Joined: Fri Oct 06, 2006 2:33 am
Has thanked: 14 times
Been thanked: 5 times

Post by alera »

Xela, I would try to analyse the file but rapid share says it has been deleted,
would you reupload it?
Xela
VIP member
VIP member
Posts: 225
Joined: Sun Jul 31, 2005 4:12 am
Been thanked: 1 time

Post by Xela »

Hi, thatnks for interest . Here is new link.
http://rapidshare.de/files/37258731/mdls.zip.html

And added help perhaps....
I have acquired a plug in to export 3ds to X format in three versions:
text, binary and compressed binary. So now we could have perhaps something to compare with what is packed in the file. Just remember that in the file there are several (26) models bunched together . But thats easy - the road map what is where on the begining of the file.

Let me know if we need to generate some X models for comparison which I will do anyway.
User avatar
alera
advanced
Posts: 71
Joined: Fri Oct 06, 2006 2:33 am
Has thanked: 14 times
Been thanked: 5 times

Post by alera »

this file has a "big endian" byte order, is it from a game cube game?

note: I know nothing of the X file format and that microsoft sdk is way too big

edit: do you know how the models in the file look like? that would me help alot
Xela
VIP member
VIP member
Posts: 225
Joined: Sun Jul 31, 2005 4:12 am
Been thanked: 1 time

Post by Xela »

No it is not Xbox file . It is for PC tank simulation Steel Beasts.

The file I enclosed for download is a bin or pack file containing several models.

1st is the 4 byte header with above number 26 indicating how many models the file contains
1a 00 00 00
then there is 26 position listing of where the files are in (Little Endian order) :
1st dword has the seq # of model
2nd has the starting offset
3rd the length of the file
here:
09 00 00 00 3c 01 00 00 e6 1b 00 00
0a 00 00 00 22 1d 00 00 1a 2f 00 00
02 00 00 00 3c 4c 00 00 2c e8 00 00
06 00 00 00 68 34 01 00 bd ee 00 00
08 00 00 00 25 23 02 00 04 e3 00 00
04 00 00 00 29 06 03 00 86 d0 00 00
0e 00 00 00 af d6 03 00 f8 81 00 00
03 00 00 00 a7 58 04 00 ea dd 00 00
0d 00 00 00 91 36 05 00 30 3b 01 00
10 00 00 00 c1 71 06 00 1d 3b 00 00
11 00 00 00 de ac 06 00 e5 16 00 00
12 00 00 00 c3 c3 06 00 68 47 00 00
13 00 00 00 2b 0b 07 00 d2 67 00 00
0f 00 00 00 fd 72 07 00 99 64 00 00
14 00 00 00 96 d7 07 00 f5 46 00 00
07 00 00 00 8b 1e 08 00 5c e5 00 00
05 00 00 00 e7 03 09 00 37 c6 00 00
01 00 00 00 1e ca 09 00 c0 fd 00 00
0b 00 00 00 de c7 0a 00 d4 24 01 00
0c 00 00 00 b2 ec 0b 00 db 9f 01 00
15 00 00 00 8d 8c 0d 00 7e f7 00 00
16 00 00 00 0b 84 0e 00 f2 4f 01 00
17 00 00 00 fd d3 0f 00 39 d6 00 00
18 00 00 00 36 aa 10 00 d3 05 01 00
19 00 00 00 09 b0 11 00 de ce 00 00
1a 00 00 00 e7 7e 12 00 5a 23 01 00
So the first model is #9 and starting at offset 316 dec and is having length of 7142 bytes.

Let us go there - first model is called Barn1 and is simple shape of a most basic house with slanted both ways roof.
Each file starts like this" xof 0302bin 0032". They are binary but not as I believe compressed. The structure of the file is 2 part : undamagad and damaged.

Only this far I know. :(

My objective is to find the way to edit those files in binary form and if not possible seek the way to substitute them with new models made and moded by user.
User avatar
alera
advanced
Posts: 71
Joined: Fri Oct 06, 2006 2:33 am
Has thanked: 14 times
Been thanked: 5 times

Post by alera »

Xela wrote:No it is not Xbox file . It is for PC tank simulation Steel Beasts.

The file I enclosed for download is a bin or pack file containing several models.

1st is the 4 byte header with above number 26 indicating how many models the file contains
1a 00 00 00
then there is 26 position listing of where the files are in (Little Endian order) :
1st dword has the seq # of model
2nd has the starting offset
3rd the length of the file
here:
09 00 00 00 3c 01 00 00 e6 1b 00 00
0a 00 00 00 22 1d 00 00 1a 2f 00 00
02 00 00 00 3c 4c 00 00 2c e8 00 00
06 00 00 00 68 34 01 00 bd ee 00 00
08 00 00 00 25 23 02 00 04 e3 00 00
04 00 00 00 29 06 03 00 86 d0 00 00
0e 00 00 00 af d6 03 00 f8 81 00 00
03 00 00 00 a7 58 04 00 ea dd 00 00
0d 00 00 00 91 36 05 00 30 3b 01 00
10 00 00 00 c1 71 06 00 1d 3b 00 00
11 00 00 00 de ac 06 00 e5 16 00 00
12 00 00 00 c3 c3 06 00 68 47 00 00
13 00 00 00 2b 0b 07 00 d2 67 00 00
0f 00 00 00 fd 72 07 00 99 64 00 00
14 00 00 00 96 d7 07 00 f5 46 00 00
07 00 00 00 8b 1e 08 00 5c e5 00 00
05 00 00 00 e7 03 09 00 37 c6 00 00
01 00 00 00 1e ca 09 00 c0 fd 00 00
0b 00 00 00 de c7 0a 00 d4 24 01 00
0c 00 00 00 b2 ec 0b 00 db 9f 01 00
15 00 00 00 8d 8c 0d 00 7e f7 00 00
16 00 00 00 0b 84 0e 00 f2 4f 01 00
17 00 00 00 fd d3 0f 00 39 d6 00 00
18 00 00 00 36 aa 10 00 d3 05 01 00
19 00 00 00 09 b0 11 00 de ce 00 00
1a 00 00 00 e7 7e 12 00 5a 23 01 00
So the first model is #9 and starting at offset 316 dec and is having length of 7142 bytes.
Yes I got that much already :)
but I'm trying to find some sort of flag that will tell me the order of the bytes
Xela wrote: Let us go there - first model is called Barn1 and is simple shape of a most basic house with slanted both ways roof.
Each file starts like this" xof 0302bin 0032". They are binary but not as I believe compressed. The structure of the file is 2 part : undamagad and damaged.

Only this far I know. :(

My objective is to find the way to edit those files in binary form and if not possible seek the way to substitute them with new models made and moded by user.
Problem is that without knowing the header I can't open all the data for the
model wihtout much work.

I already have something that could be a barn with a slanted roof but untill I figure out the header I can't trust the data(just vertecies atm)

do you have a picture of the barn? I want to know if I'm not seeing things :P

Edit: I just found a page with the specifications of the X file format :)
Xela
VIP member
VIP member
Posts: 225
Joined: Sun Jul 31, 2005 4:12 am
Been thanked: 1 time

Post by Xela »

Here is the picture. It is very basic and simplistic 3D and graphics, however, the simulation is deep as the ocean. :)
Also the next model barn2 is even simplier model without that top roof on the chimney or vent.

Image

Can *.X binary 3D files be translated to text format ? I could not honestly find too much about it. The only stuff I found is listed and linked in previous posts on top.
Xela
VIP member
VIP member
Posts: 225
Joined: Sun Jul 31, 2005 4:12 am
Been thanked: 1 time

Post by Xela »

Anything new here? How your visualisation of shape conforms the reality?
I could perhaps build this form and convert to *.X text binary and binary compressed. Just to see what could be further done with them.

Anyone knows what is the meaning of "frames" for *.X format?

I remember one program for Operation Flash Point (OFP) which was "debinarizator" (if thats the word :wink: ) for their models. Got to look somwhere for it.
User avatar
alera
advanced
Posts: 71
Joined: Fri Oct 06, 2006 2:33 am
Has thanked: 14 times
Been thanked: 5 times

Post by alera »

Xela wrote:Anything new here? How your visualisation of shape conforms the reality?
progress! Xela progress!

problem was the data was offset by one byte so it's not big endian

Xela wrote: Anyone knows what is the meaning of "frames" for *.X format?
Frames are keyframes I guess, it is a way of stop motion animation*
the computer interpolates within frames to make it look smooth

*put a model in one position, take picture, move model - take picture
etc etc

- btw, do you know how the playstation 2 displays paletters? I this pictures and I can't get the palette right.. I use an unsigned byte for counting and all yet the color is like offset by one.. I don't get it

- grr its raining and the last TEN days there has always been an electricity
outrage every day.. I hate it
You do not have the required permissions to view the files attached to this post.
Xela
VIP member
VIP member
Posts: 225
Joined: Sun Jul 31, 2005 4:12 am
Been thanked: 1 time

Post by Xela »

I see that the shape is definetely conforming the model so you are on the right track.
It is not Playstaion though , but PC game. Palette of the model is ??? the material is textured material. The texture name is Barn1.bmp.

I wonder what happened to the destroyed part of this house?. As you can see on my shot on the very bottom of the buiding is what you can all "pancaked" house. On the Hex display of the binary file I see clearly where the "good" model ends and "destroyed" begins. The are in the same file from what I can see.

Can you perhaps control vertex locations and position with Hex Editor. I would surely would love to exchange this model for something more elaborate and insert that into mrf file , but for now even simple modification would do too.

Good work :!:
User avatar
alera
advanced
Posts: 71
Joined: Fri Oct 06, 2006 2:33 am
Has thanked: 14 times
Been thanked: 5 times

Post by alera »

alera wrote:this file has a "big endian" byte order, is it from a game cube game?
Xela wrote:No it is not Xbox file . It is for PC tank simulation Steel Beasts.
and here I was thinking this was an xbox game...
Xela wrote:I see that the shape is definetely conforming the model so you are on the right track.
It is not Playstaion though , but PC game. Palette of the model is ??? the material is textured material. The texture name is Barn1.bmp.
that was king of off topic, I was refering to the palette of biohazard.Makai kingdom.
Xela wrote:I wonder what happened to the destroyed part of this house?. As you can see on my shot on the very bottom of the buiding is what you can all "pancaked" house. On the Hex display of the binary file I see clearly where the "good" model ends and "destroyed" begins. The are in the same file from what I can see.
I downloaded the demo to see if could locate the barn.
I didn't know how to stop the tank and understood what the "flat barn" was all about and that is why I didn't load it
Xela wrote: Can you perhaps control vertex locations and position with Hex Editor. I would surely would love to exchange this model for something more elaborate and insert that into mrf file , but for now even simple modification would do too.
you can technicaly edit it in hex, the only thing you need to do is swap x and y when you dump your floats into a file... but that is complicated if you ask me

after "barn" there is 0A00 this ends the string, six bytes from here lies the
number of vertecies 8400 0000, an integer(32bits) right now it's 138, your going ot need to replace this to match the new vertecies or better yet, don't change the quantity of vertecies and just mod them right as they are on the file

vertex = float x, y ,z; repeats 138 times
CCC2 67C2 1433 4642 23BB 76C2 this is the first vertex of the barn

........ oh... you ment me >.>... I could and was going to but hte demo seems to have a protection against this

in what format can you export your new model? in order to code and importer I need to know both formats
Xela
VIP member
VIP member
Posts: 225
Joined: Sun Jul 31, 2005 4:12 am
Been thanked: 1 time

Post by Xela »

Beautifull finds, thank you for help.
I can export in any format . In *.X too , but .3ds or .ASC would be good too. Perhaps *. X would be the most compatible. For that I use PandaX Exporter plugin for 3dStudioMax.

That 84 00 00 00 integer is 132 but we are talking the same thing. I see string of floats. So for now I can do that simple float value changes in order to reshape the model. Great :!:
User avatar
alera
advanced
Posts: 71
Joined: Fri Oct 06, 2006 2:33 am
Has thanked: 14 times
Been thanked: 5 times

Post by alera »

oh great you have 3dsmax :)
Xela wrote:I can export in any format . In *.X too , but .3ds or .ASC would be good too. Perhaps *. X would be the most compatible. For that I use PandaX Exporter plugin for 3dStudioMax.
ASE!

it should be one of the standard exports for 3dsmax

My ASE importer isn't fully functinal right now, it only reads vertex array, indices and normals(not UV) but adding the rest should be no problem
Xela
VIP member
VIP member
Posts: 225
Joined: Sun Jul 31, 2005 4:12 am
Been thanked: 1 time

Post by Xela »

I have 3dsMax all right , and all perhaps possible 3D converters there are there. But since I do not really care so much about importing the models as much as I am after the procedure to substitute *.X models with new ones and perhaps adding new models to mrf.
That is my ultimate target and goal!
User avatar
alera
advanced
Posts: 71
Joined: Fri Oct 06, 2006 2:33 am
Has thanked: 14 times
Been thanked: 5 times

Post by alera »

Yes :) but remember that you need to know the correct scale and position of the model :) hence, you need the original as reference :P


btw.. did yo ever try cutting one of the models in the archive and save it to it's own file? does the importer still not work?
Xela wrote:I have 3dsMax all right , and all perhaps possible 3D converters there are there. But since I do not really care so much about importing the models as much as I am after the procedure to substitute *.X models with new ones and perhaps adding new models to mrf.
as I understand, to add new models you are going to need to "call" this new models in a map file, other wise they just take up space :P
Xela
VIP member
VIP member
Posts: 225
Joined: Sun Jul 31, 2005 4:12 am
Been thanked: 1 time

Post by Xela »

btw.. did yo ever try cutting one of the models in the archive and save it to it's own file? does the importer still not work?
It is in fact only exporter and not importer. As strange as it may sound I frankly I do not know any importer for *.X in binary form. Does anyone ?

As far as "calling models on the "map" you are right. They all have code vname and that is how they are called from mrf file to the terrain map. I am researching this apect and have some preliminary findings.

So for now , the time being, just simple substitution of model in mrf should be OK too. Let us say instead of barn we place something else. Even just changing the shape of the bran to accomodate geographical changes ... an igloo for example :wink: would be welcomed.

I think that I should do just that. Make the spredsheet list of files , their starting offsets and length.
Then make and add new X binary model in max and export it. Place new file in mrf by pasting. Change the offsets and see if it works.
Should it not :?:
Post Reply