Wednesday, May 18, 2016

Offsets, offsets, keys to reverse


哈哈, 我對 gundam 的模型沒抵抗力. 有朋友傳了一些檔案給我研究, 說找不到蒙皮的骨骼關係.
花了數小時來研究整個格式. *_vertex 是資料檔, *_model 資訊檔.
而 *_model 的開頭是一段 offset. (64-bits)
0x30 ~ 0xA0 是 offset
0xA0 ~ 0xC8 是相對的內容數量
0xC8 ~ 0x120 也是 offset
而要找的蒙皮骨骼 offset 就在 0x88

I can't resist with gundam 3D models!
My friend ask me to figure the skinning problem of this game.
And here it is: *_vertex is data file, *_model is description/information file.
0x30 ~ 0xA0 are all 64-bits offsets
0xA0 ~ 0xC8 are their relative count
0xC8 ~ 0x120 another sets of offset
Skin-Bones table is pointed by offset 0x88.


struct BFMDLMESH {
 char[16] Chunk_ID
 short ?
 short Bone_Reference
 short Sub_Mesh_Block_Start
 short Sub_Mesh_Block_Count
 short Skin_Bone_Count
 short offset_Skin_Bone_Table
 short LOD
 short Bone_Reference2
 float[6] Bounding_box //format -x,x,-y,y,-z,z
 float Radius
 long Flag
}

struct BFMDLSUBMESH {
 char[16] Chunk_ID
 short ?
 short ?
 short ?
 short ?
 short FVF
 short ?
 short ?
 short ?
 float[6] Bounding_box
 short Face_Count
 short Vertex_Count
 short ?
 short ?
 short offset_Face_Block
 short offset_Vertex_Block
 short[4] Skin_Bone_Index
 long[16] offset_Vertex_Element
}

這是整個 _model 的 log. 有興趣自行研究的可以下來看看.
This is the full log of the file, anyone interested may found it useful.

4 comments:

godskin said...

hi u can amke tools
for aion .caf/.cgf suport animation

godskin said...

pls read Email i send

Fatduck Gaming said...

Send me email to: fatduck_uk@qq.com
my hotmail had a problem ATM.

Remember I can read Chinese and English only.
I can't help if you are in different language

Unknown said...

pls read email you have QQ ?