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

[XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post questions about game models here, or help out others!
User avatar
zaykho
mega-veteran
mega-veteran
Posts: 217
Joined: Fri Dec 03, 2010 1:20 pm
Location: France
Has thanked: 158 times
Been thanked: 52 times

[XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by zaykho »

Hi everybody !

Can someone help me to make theses 3d models importable in a 3d software (like 3ds, blender or anything...)
or a converter to .obj format please ?

Thank's in advance.

Here some sample (choose the weapon sample or item sample for quick test, since its a very small object):


EDIT:

OTOGI 2 folders:
http://www.mediafire.com/?iyc334ek03xac
---------------------------------------------------------------
1) The Full Item Folder [OK]
2) The Full Player Folder [OK](weapons are in the character folder)
3) The Full Hair Folder [OK]
4) The Full Chr Folder [OK](I think monsters must be in it, or in map folder ?)
5) The Full Map Folder n°1 [OK]
6) The Full Map Folder n°2 [OK]


OTOGI 1 folders: http://www.mediafire.com/?3g7c9at2negsa
---------------------------------------------------------------
1) The Full Item Folder [OK]
2) The Full Player Folder [OK](weapons are in the character folder)
4) The Full Chr Folder [OK](I think monsters must be in it, or in map folder ?)
5) The Full Map Folder [OK]




----------------------------------------------
I'm trying to learn how to reverse 3d model too, but I want to rip/convert/import a lot of model of various game: PGR2, Murakumo, OTOGI 1&2, XGRA, Wipeout HD, Quantum Redshift..... etc....

So a bit of help is required :p
----------------------------------------------

ImageImageImageImage
Last edited by zaykho on Tue Aug 21, 2012 1:55 am, edited 12 times in total.
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by finale00 »

Haven't figured it out, but here is some progress.
I've labeled 3 unknown structs, two of them I have figured out the pattern, but one of them seems pretty random.

https://www.dropbox.com/sh/7stlpd4qvkq3 ... gi2_mdl.py

int = int32
If an offset is 0, just ignore it

Code: Select all

struct File {
   int filesize
   char[4] "MDL "
   short[2] unk
   int meshType?
   int ?
   int ?
   int count1
   int numIdx
   int numVerts1 # 60 byte vertex
   int numVerts2 # 64 byte vertex
   int numVerts3 # 72 byte vertex
   int count4
   int count3
   int numMat
   int numTex
   int unk1 Ofs
   int face Ofs
   int vert1 Ofs
   int vert2 Ofs
   int vert3 Ofs
   int vert4 Ofs
   int unk3 Ofs
   int matOfs
   int texOfs
  
   Unk1[count1] ??
   Unk2[??] ?? variable
   Unk3[count3] ??
   Material[numMat] mat structs
   Texture[numTex] tex Names
   Faces
   Vertex60
   Vertex64
   Vertex72
   Unk4
}

struct Unk1 {
    144 bytes
}

struct Unk2 {
    ?
}

struct Unk3 {
   32 bytes
}

struct Unk4 {
   432 bytes
}

struct Material {
    128 bytes
}

struct Texture {
   null-terminated string
}

struct Vertex60 {
   float[3] vx, vy, vz
   16 bytes
   float[2] tu, tv
   float[3] nx, ny, nz
   float[3] ?? 
}

struct Faces { # there are up to 4 index buffers, one for each vertex buffer
   short[numIdx] indices
}

struct Vertex64 {

}

struct Vertex72{

}
Image

Image

Image
Last edited by finale00 on Tue Aug 21, 2012 6:11 am, edited 9 times in total.
User avatar
zaykho
mega-veteran
mega-veteran
Posts: 217
Joined: Fri Dec 03, 2010 1:20 pm
Location: France
Has thanked: 158 times
Been thanked: 52 times

Re: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by zaykho »

Which game is this? Or are they both the same format?
All the sample files come from OTOGI 2, I think this game have exactly the same format that OTOGI 1 have,
simply because the project OTOGI 2 has started immediately after the end of OTOGI 1 (even before is out for commercialization) .

#Source come from a Developer Diary in OXM (official xbox magazine).


For the game itself, OTOGI 1 & 2 are being developed by fromsoftware (Murakumo, Dark Soul, Armored Core etc....),
I suppose this game was developed by the same team who have worked in Murakumo.....

I searching now some info in the FIRST demo of this game, since I remember that the first demo of the OTOGI 1 was very very different from the 2nd demo and the final game too.

Maybe, I will found more info in the format used or even some tools. (I have found some audio converter tools in the track folder of the demo game of PGR2{project gotham racing 2}, and even the name of their work directory xD)
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by finale00 »

Upload more samples. Maps aren't important.

Need weapons items, some more characters, and other types of models.
If there are buildings and stuff that would be cool too. Architecture is always nice to have.

The character models have multiple index buffers for some reason and their vertex structs are 72 bytes and I can't figure out how to parse it since there's only one file that is of that format.
Last edited by finale00 on Tue Aug 21, 2012 12:00 am, edited 2 times in total.
User avatar
zaykho
mega-veteran
mega-veteran
Posts: 217
Joined: Fri Dec 03, 2010 1:20 pm
Location: France
Has thanked: 158 times
Been thanked: 52 times

Re: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by zaykho »

WOW !!! EXCELLENT !!!!

Thank you so much !!! :p

For the random stuff its because I think I need to upload the entire character folder, because in the parent folder its seems to have some "config" data linked to the model.

I'm uploading right now, I will edit this post when it will be ready.
User avatar
zaykho
mega-veteran
mega-veteran
Posts: 217
Joined: Fri Dec 03, 2010 1:20 pm
Location: France
Has thanked: 158 times
Been thanked: 52 times

Re: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by zaykho »

Ok I have Uploaded:

OTOGI 2
--------------------------------
1) The Full Item Folder [OK]
2) The Full Character Folder [OK](weapons are in the character folder)
3) The Full Hair Folder [OK]
3) The Full Chr Folder [OK](I think monsters must ben it, or in map folder ?)

I'm ripping now the OTOGI 1 Disc on my xbox

---------------------------------
http://www.mediafire.com/?iyc334ek03xac
------------------------------------

Here the Tree folder of the game

ROOT FOLDER
--------------------------

Image

PLAYER FOLDER
--------------------------

Image
User avatar
zaykho
mega-veteran
mega-veteran
Posts: 217
Joined: Fri Dec 03, 2010 1:20 pm
Location: France
Has thanked: 158 times
Been thanked: 52 times

Re: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by zaykho »

I have uploaded my HTML 3D viewer, (can easily make 3d model visible in any web browser supporting WEBGL).

I make some DOA sample on it, but my goal is to make a html xnalara/gmod like for web. :p

This is why I want to rip all object from my favorite games.

So Thanks a lot for your help finale00.

And if you accept, I will be able tomorrow to make a html page where all people can load anytime, anywhere, some of OTOGI 3d model :p (with credits of courses)
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by finale00 »

I just write the scripts. I don't really care what people do with them.
But if they go to jail for breaking their country's laws they better not complain that I'm responsible lol
User avatar
zaykho
mega-veteran
mega-veteran
Posts: 217
Joined: Fri Dec 03, 2010 1:20 pm
Location: France
Has thanked: 158 times
Been thanked: 52 times

Re: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by zaykho »

I just write the scripts. I don't really care what people do with them.
But if they go to jail for breaking their country's laws they better not complain that I'm responsible lol
Lol yes, I fully assume :p

I know that a lot of people doesn't have laws problems with XNaLara, so I think a simple 3Dweb poser model will not a be a " copyright crime ".
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by finale00 »

I think it really boils down to whether someone's going to take action or not.

I found a way to brute force the unk2 struct since it seems to be multiples of 16, but...it doesn't really work in general.
Last edited by finale00 on Tue Aug 21, 2012 1:29 am, edited 1 time in total.
User avatar
zaykho
mega-veteran
mega-veteran
Posts: 217
Joined: Fri Dec 03, 2010 1:20 pm
Location: France
Has thanked: 158 times
Been thanked: 52 times

Re: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by zaykho »

I think it really boils down to whether someone's going to take action or not.
Yes, I someone's take action against me (like Tecmo :x ?) I will be obligated to take down, but if not........
In any case, that unk2 struct I labeled is going to get in the way of pretty much every model until it's resolved.
Would be nice to fill in some of those values in the header.
Yes, I finish to upload everything important and then I will get into it, you have done the hardest work (or all the work :p)
so it will be more easy now.

I found a way to brute force the unk2 struct since it seems to be multiples of 16, but...it doesn't really work in general.
I'm working on. :p
Last edited by zaykho on Tue Aug 21, 2012 2:39 am, edited 1 time in total.
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by finale00 »

dat files are just models and textures stored together with an offset table at the top.

Code: Select all

int filesize
int model_offset
int ofs into model?
int ofs into model?
int numTex
int[3] zeroes?
Each texture entry is 12 bytes long

Code: Select all

short[2] ?
int tex_offset
int ?
After that it's just null-terminated tex names, padded to 16 bytes

Then you just go through the file table and start parsing your models and loading the textures.
The textures are stored in sequence so if you don't know how to calculate the size of the DDS file (I don't) you just have to take the difference between the offset of the current texture and the next texture.
User avatar
zaykho
mega-veteran
mega-veteran
Posts: 217
Joined: Fri Dec 03, 2010 1:20 pm
Location: France
Has thanked: 158 times
Been thanked: 52 times

Re: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by zaykho »

Ok, so these .Dat files must be all monsters and Bosses.

I will try to help in this progress, even if really new in 3d model reversing, I have worked a lot on .xbe (xbox executable) hack and rip.....
:p


EDIT:

Yes you are right about "Unk2", I got the weapon worked with a 96 bytes.
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by finale00 »

Here's an unpacker for the map objects.
They're in the obj folder, extensions 000, 001, ...

The format is simple, but I can't seem to get it to work properly in quickbms.
The files are stored across multiple files (conveniently named as such), and there is a short in the file table that tells you which file it's in.

Anyways for now I just unpack the first file and leave the others for later.

Code: Select all

# Otogi 2 DIV Unpack (.000, .001)
# Script for QuickBMS

# doesn't seem to work as I thought it would
#open FDDE "000" 0
#open FDDE "001" 1

idstring "DIV\x00"
get unk long
get unk long
get filesize long # total of 000, 001, 002, ...
get FILES long
goto 64

for i = 0 < FILES
  get entry_num short
  get FILENUM short
  
  get OFFSET long
  get SIZE long
  get NAME_OFS long
  savepos CURR
  
  goto NAME_OFS
  get NAME string
  
  if FILENUM == 0
    goto OFFSET
    log NAME OFFSET SIZE
    goto CURR
  else
    break #we just need to read from the other file
  endif
  
next i
Possible to just write an importer to load up the entire file but...really makes no difference to me it's just more work.

Image
User avatar
zaykho
mega-veteran
mega-veteran
Posts: 217
Joined: Fri Dec 03, 2010 1:20 pm
Location: France
Has thanked: 158 times
Been thanked: 52 times

Re: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by zaykho »

Thank you for all your work !
Possible to just write an importer to load up the entire file but...really makes no difference to me it's just more work.
Well it's not a prob for me, I have spend 2 days for recompiling all maps from DOAX (the doax exporter export all objects, one by one....)

The map of OTOGI are very huge and beautiful, so if I need to import file by file, object by object or whatever, its not a prob :p

I will write here a table of all unk2 data for all objects in few minutes.
Post Reply