Join also our Discord channel! Click here.

Dead or Alive series formats and tools

Post questions about game models here, or help out others!
mariokart64n
ultra-veteran
ultra-veteran
Posts: 546
Joined: Sun Jun 05, 2005 12:00 pm
Location: Ontario, Canada
Has thanked: 31 times
Been thanked: 182 times

Re: Dead or Alive series formats and tools

Post by mariokart64n » Sun Jan 08, 2012 8:22 pm

you can distisngish a DOAU OBJ block from a DOA3 OBJ block from the version number

DOA3
00 4F 42 4A 00 00 00 00 00 00 00 00 00 .OBJ.........

DOAU
00 4F 42 4A 00 00 00 00 00 04 00 00 00 .OBJ.........
Maxscript and other finished work I've done can be found on my DeviantArt account

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: 300 times

Re: Dead or Alive series formats and tools

Post by finale00 » Sun Jan 08, 2012 8:36 pm

Alright got it.

I also found the DOAU stages with the odd obj header.

Code: Select all

char chunk[4] "OBJ "
int32 vertType
int32 meshType
int32
float ?[4]
int32 zero[4]
int32 numVerts
int32 vertOfs
int32 numIdx
int32 idxOfs
...
Don't know where those 4 zeroes come from.

gjinka
Banned
Posts: 95
Joined: Sun Apr 10, 2011 5:30 pm
Been thanked: 15 times

Re: Dead or Alive series formats and tools

Post by gjinka » Sun Jan 08, 2012 9:05 pm

This is what mariokart's doc says:

Code: Select all

Unsigned Int	4	BlockID	"OBJ "
Unsigned Int	4	VertexType	Changes Size of Vertex Definition
Unsigned Int	4	UKN001	May Be Block Version? always 0x04
Unsigned Int	4	IndexCount	How many Faces are In our Index Buffer
Float	4	UKN002	X position?
Float	4	UKN003	Y Position?
Float	4	UKN004	Z Position?
Float	4	UKN005	W Vector?
Unsigned Int	4	VertexCount	Number of Vertices in Vertex Buffer
Unsigned Int	4	VertexBuff	Offset from Start of XPR to Vertex Buffer
Unsigned Int	4	IndexCount	Number of Faces In Index Buffer
Unsigned Int	4	IndexBuff	Offset from Start of XPR to Index Buffer
Unsigned Int	112	UKN006	?? Padding, data all 0x00
Doesn't seem too different, you just start vertexCount 4 bytes later, that doesn't change the fact that everyhting is zero here, both vertex/index offsets and counts.

I'm pretty sure this is from DOAU. Because I just dumped it.

mariokart64n
ultra-veteran
ultra-veteran
Posts: 546
Joined: Sun Jun 05, 2005 12:00 pm
Location: Ontario, Canada
Has thanked: 31 times
Been thanked: 182 times

Re: Dead or Alive series formats and tools

Post by mariokart64n » Sun Jan 08, 2012 9:06 pm

yeah the stages xprs are different, they crash my importer :(
Maxscript and other finished work I've done can be found on my DeviantArt account

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: 300 times

Re: Dead or Alive series formats and tools

Post by finale00 » Sun Jan 08, 2012 9:24 pm

Doesn't seem too different, you just start vertexCount 4 bytes later, that doesn't change the fact that everyhting is zero here, both vertex/index offsets and counts.
You should see the vertex and index counts/offsets easily.
Aside from changes in what data is present depending on some flag or value, those 4 values will still appear together. You just need to add some conditions.

If you scroll past the materials and see an index buffer then you know there are indices.

But even when I say that, I can't plot all of the vertices for some reason lol

gjinka
Banned
Posts: 95
Joined: Sun Apr 10, 2011 5:30 pm
Been thanked: 15 times

Re: Dead or Alive series formats and tools

Post by gjinka » Sun Jan 08, 2012 9:29 pm

I didnt notice there was a new page when I posted lol.

It looks like my files are DOA3!?
But how on earth did I get that afs to DOAU folder. Just to be sure, it's from a file
'datadvd.afs', 372,344 MB in size. Is it not from DOAU?

I guess my issues could be caused by that, lol?

b0ny
mega-veteran
mega-veteran
Posts: 239
Joined: Sat May 22, 2010 10:10 am
Has thanked: 22 times
Been thanked: 118 times

Re: Dead or Alive series formats and tools

Post by b0ny » Sun Jan 08, 2012 9:50 pm

Image
buffer1 = vertex type 1
buffer2 = vertex type 2
buffer3 = vertex type 3
buffer4 = vertex type 4

each vertex type can be affected by the vertex weight
mariokart64n wrote:yeah the stages xprs are different, they crash my importer :(
ok guys show me the stage you're talking about because i parsed "all" xpr's and everything were ok :ninja:

mariokart64n
ultra-veteran
ultra-veteran
Posts: 546
Joined: Sun Jun 05, 2005 12:00 pm
Location: Ontario, Canada
Has thanked: 31 times
Been thanked: 182 times

Re: Dead or Alive series formats and tools

Post by mariokart64n » Sun Jan 08, 2012 9:56 pm

I'll have a look in a while, I'm trying to find out why the P8 textures I extracted don't work :(

@gjinka
DOAU contains DOA3 files, so you have to put a check into place to check the version

the DOA3 files are there as a bonus. if you owned both games, DOAU would add content into DOA3 for you.
not only that DOAU also contains a remake of DOA1, using DOA3 files
Maxscript and other finished work I've done can be found on my DeviantArt account

gjinka
Banned
Posts: 95
Joined: Sun Apr 10, 2011 5:30 pm
Been thanked: 15 times

Re: Dead or Alive series formats and tools

Post by gjinka » Sun Jan 08, 2012 10:04 pm

Well that's unexpected.
I guess the needed files arre in 'datahdd2.afs'. But aya00 seems to be encrypted. Anyone how a compiled xprbreaker or similar?

mariokart64n
ultra-veteran
ultra-veteran
Posts: 546
Joined: Sun Jun 05, 2005 12:00 pm
Location: Ontario, Canada
Has thanked: 31 times
Been thanked: 182 times

Re: Dead or Alive series formats and tools

Post by mariokart64n » Sun Jan 08, 2012 10:15 pm

just use greedxplorer, right click a model in gx and extract with cat
Maxscript and other finished work I've done can be found on my DeviantArt account

b0ny
mega-veteran
mega-veteran
Posts: 239
Joined: Sat May 22, 2010 10:10 am
Has thanked: 22 times
Been thanked: 118 times

Re: Dead or Alive series formats and tools

Post by b0ny » Sun Jan 08, 2012 11:50 pm

mariokart64n wrote:I'll have a look in a while, I'm trying to find out why the P8 textures I extracted don't work :(
i now that g8b8 and argb are swizzled. also each dds mipmap contains some additional info, like size.
main.7z
still didn't fixed the wrists problem, also i found that some doa3 joints do have something like a vertex weight, which is hanging the doau, and when i set that value to the default one the joints don't fit. still wondering how in doa3 the model looks normal and in doa2 textures on two sided meshes become swapped by some reason.
You do not have the required permissions to view the files attached to this post.

mariokart64n
ultra-veteran
ultra-veteran
Posts: 546
Joined: Sun Jun 05, 2005 12:00 pm
Location: Ontario, Canada
Has thanked: 31 times
Been thanked: 182 times

Re: Dead or Alive series formats and tools

Post by mariokart64n » Mon Jan 09, 2012 12:18 am

do you have a compiled version of the tool?

if its just the wrists, then I don't think it'll be too hard to fix.

EDIT
I don't think theres a way to recreate the skeleton from the CAT or the XPR files :-(
spent alot of time searching the xbe too.. and the BIN and MOT files.

until we stumble across the where abouts of the skeletons. I'm going to start rebuilding all the skeletons and hardcode them for now.

EDIT2
I had a better look at the DOAU materials, its weird how they've setup materials.
usually you setup a list of materials, then link your mesh objects to it.

however what they did in doau is defined new materials for every single mesh object in the XPR.. in the end you end up with 50+ materials.
totally inefficient and sloppy, because it results in alot of duplicated materials

anyway the CAT file, which controls the XPR also contains a list of materials and it forces them over the XPR.

and this is really dumb what they did... they set a RGBA value on each mesh in the XPR
if the ARGB value is in the cat, then that mesh object in the XPR will assume the material settings from the cat

but the cat doesn't contain texture assignment, just your spec values for example.. :\ kinda stupid?


anyway I'll explain the XPR and CAT material structures, keep in mind the only thing that links the XPR materials to the CAT is the "ARGB Colour".
XPR Material structure (Loop structure until first 4 bytes = 0)
[BYTE] Opacity Flag // 0 = off | 1 = on
[BYTE] UNKNOWN
[BYTE] UNKNOWN
[BYTE] enable flag? // 0x80 = Enabled
[LONG] Size of Material Block + 8bytes from above read
[LONG] UNKNOWN, Always 0?
[LONG] UNKNOWN, Effects Transparency Layers // 0,1,8?
[FLOAT32{4}] ?? Positioning Info??
[FLOAT32{4}] Diffuse Colour
[FLOAT32{4}] Ambient Colour
[FLOAT32{4}] Specular Colour
[FLOAT32{4}] Emissive Colour
[FLOAT32] Specular Power
[LONG] Number of Textures
[LONG] UNKNOWN, Always 3? if changed to 0 disables material link from CAT
[BYTE{4}] ARGB Colour

>>> Loop for Number of Textures
[LONG] Texture Index to Assign
[LONG] UNKNOWN, Always 0?
[LONG] UNKNOWN, Maybe an Index
[BYTE] UNKNOWN, always 0
[BYTE] UNKNOWN, if texture is present value is 4
[BYTE] UNKNOWN, always 0
[BYTE] UNKNOWN, if texture is reflection texture value is 1
<<< Loop Ends

[LONG] UNKNOWN, Always 0x20?
[LONG] Starting Face Index to begin Material On
[LONG] Number of Faces to Assign Material to
[LONG] UNKNOWN, always 2? someone elsed notes this as a culling flag?



CAT Material structure (Loop structure until first byte = -1)
[BYTE] UNKNOWN, always 3?
[BYTE] UNKNOWN, 1 or 3?
[BYTE] UNKNOWN, always 0?
[BYTE] UNKNOWN, always 0?
[BYTE{4}] ARGB Colour
[SHORT] UNKNOWN
[SHORT] UNKNOWN
[FLOAT32{4}] Diffuse Colour
[FLOAT32{4}] Ambient Colour
[FLOAT32{4}] Specular Colour
[FLOAT32{4}] Emissive Colour
[FLOAT32] Specular Power

Maxscript and other finished work I've done can be found on my DeviantArt account

gjinka
Banned
Posts: 95
Joined: Sun Apr 10, 2011 5:30 pm
Been thanked: 15 times

Re: Dead or Alive series formats and tools

Post by gjinka » Mon Jan 09, 2012 9:32 am

OK, it seems to parse correctly now.
For now I'll skip the materials and textures.

I tested on the characters and there are two kinds of vertex types: 0 and 1. mariokart documented '1'. Which one is '0'? All I know it's 36 bytes long.
Also the values don't seem right. The vertex count can be shorter than the lenght of a single vertex entry. is the OBJ entry different between stage and character models or something? Does it start at the 9th dword? By "it" I mean vertexcount, vertexoffset, indexcount, indexoffset.

b0ny
mega-veteran
mega-veteran
Posts: 239
Joined: Sat May 22, 2010 10:10 am
Has thanked: 22 times
Been thanked: 118 times

Re: Dead or Alive series formats and tools

Post by b0ny » Mon Jan 09, 2012 11:23 am

mariokart64n wrote:do you have a compiled version of the tool?
http://rghost.ru/35813449
mariokart64n wrote:if its just the wrists, then I don't think it'll be too hard to fix.
not only the wrists, imho there are a lot of problems. i spent a lot of time trying to fix the wrists...
mariokart64n wrote: EDIT
I don't think theres a way to recreate the skeleton from the CAT or the XPR files :-(
spent alot of time searching the xbe too.. and the BIN and MOT files.

until we stumble across the where abouts of the skeletons. I'm going to start rebuilding all the skeletons and hardcode them for now.
as i said before skeletons(and a lot of other information) are built in the executable, - i found them for doau and doa3. why do you need them so hard, i can dump them for you.
search this hex sequence in doau, doa3 or doao executable "00 00 00 00 EC 51 38 3E 2E 90 A0 3B 00 00 00 00", this is the first 4 floats in kasumis skeleton.
mariokart64n wrote:keep in mind the only thing that links the XPR materials to the CAT is the "ARGB Colour".
great finding
mariokart64n wrote: XPR Material structure (Loop structure until first 4 bytes = 0)
[BYTE] Opacity Flag // 0 = off | 1 = on (for doa3 = {1,0}, for doau = {1,2,3,5,7,?})
[BYTE] UNKNOWN
[BYTE] UNKNOWN
[BYTE] enable flag? // 0x80 = Enabled[/color] 0x90 ?
[LONG] Size of Material Block + 8bytes from above read
[LONG] UNKNOWN, Always 0?
[LONG] UNKNOWN, Effects Transparency Layers // 0,1,8? cooling flag? = {0,1,4,5,8,9,c,d}
[FLOAT32{4}] ?? Positioning Info??
[FLOAT32{4}] Diffuse Colour
[FLOAT32{4}] Ambient Colour
[FLOAT32{4}] Specular Colour
[FLOAT32{4}] Emissive Colour
[FLOAT32] Specular Power
[LONG] Number of Textures
[LONG] UNKNOWN, Always 3? if changed to 0 disables material link from CAT 1 = don't use specular power?
[BYTE{4}] ARGB Colour
...
[LONG] UNKNOWN, Always 0x20? [WORD] size of one vertex, [WORD] vertex buffer ID
[LONG] Starting Face Index to begin Material On
[LONG] Number of Faces to Assign Material to
[LONG] UNKNOWN, always 2? someone elsed notes this as a culling flag?
gjinka wrote:OK, it seems to parse correctly now.
is the OBJ entry different between stage and character models or something? Does it start at the 9th dword? By "it" I mean vertexcount, vertexoffset, indexcount, indexoffset.
look again in here viewtopic.php?p=64883#p64883

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: 300 times

Re: Dead or Alive series formats and tools

Post by finale00 » Mon Jan 09, 2012 1:43 pm

Hmm so those zeroes are in fact referring to different vertex buffers and vertex types.
That would make sense then.

Post Reply