Bayonetta XBox360
Posted: Mon Jan 18, 2010 9:38 pm
Here is the file i'm using to try to figure out the file format:
http://www.sendspace.com/file/52vq2a
so, what i have so far:
the first 4 bytes at 0x0 seems to be the idstring '\0BMW' that is 'WMB\0' if we convert to little-endian.
In the hex editor, we can easily spot a 32 bytes pattern at offset 0x80.
The 0x80 value is found a offset 0x18 so it could indicate the begining of a structure.
if we examine the file, we can see that at offset 0x3D40 the pattern is changing and there's no more the 32 bytes pattern.
The 0x3D40 value can be found at offset 0x1C so that could be the offset of another structure.
I do some math on those offset: 0x3D40 - 0x80 = 0x3CC0
I divide this result by 0x20 (32 bytes in hex) and I obtain 0x1E6.
This number can be found at offset 0x0C
I think this confirm that at offset 0x80 begin a datablock of 0x1E6 (486) 32bytes structures
let's assume that this is vertices data and render those 486 structures using the first 12 bytes as 3 floats, probably x, y and z coordinates.
It isn't really beautilful on this static image but it looks like a street lamp, so I guess i've found the vertices coordinates in that 32 bytes structures.
That's all i got for the moment, the other fields of the header, vertex structure or other datablock in the file have still no meaning for me.
I checked if there's several time the same vertex coordinates in the vertex list and found that a lot of vertices are duplicated 2, 3 or 4 times. Dunno why, perhaps for degenerate triangles.
I'm now searching how to render the tringles out of this but wasn't able to find anything yet.
Near the end of the file there's several datablock with a lot of numbers under the 486 vertex count so it could be indices.
Any info or hints are welcome
i'll keep you posted.
ps: redirect me if this is the wrong section for this kind of stuff.
http://www.sendspace.com/file/52vq2a
so, what i have so far:
the first 4 bytes at 0x0 seems to be the idstring '\0BMW' that is 'WMB\0' if we convert to little-endian.
In the hex editor, we can easily spot a 32 bytes pattern at offset 0x80.
The 0x80 value is found a offset 0x18 so it could indicate the begining of a structure.
if we examine the file, we can see that at offset 0x3D40 the pattern is changing and there's no more the 32 bytes pattern.
The 0x3D40 value can be found at offset 0x1C so that could be the offset of another structure.
I do some math on those offset: 0x3D40 - 0x80 = 0x3CC0
I divide this result by 0x20 (32 bytes in hex) and I obtain 0x1E6.
This number can be found at offset 0x0C
I think this confirm that at offset 0x80 begin a datablock of 0x1E6 (486) 32bytes structures
let's assume that this is vertices data and render those 486 structures using the first 12 bytes as 3 floats, probably x, y and z coordinates.
It isn't really beautilful on this static image but it looks like a street lamp, so I guess i've found the vertices coordinates in that 32 bytes structures.
That's all i got for the moment, the other fields of the header, vertex structure or other datablock in the file have still no meaning for me.
I checked if there's several time the same vertex coordinates in the vertex list and found that a lot of vertices are duplicated 2, 3 or 4 times. Dunno why, perhaps for degenerate triangles.
I'm now searching how to render the tringles out of this but wasn't able to find anything yet.
Near the end of the file there's several datablock with a lot of numbers under the 486 vertex count so it could be indices.
Any info or hints are welcome
i'll keep you posted.
ps: redirect me if this is the wrong section for this kind of stuff.