dibe91 wrote:if I can ask you something, I start to see how to do this kind of script would be interested in some games!
could you rephrase that sentence, please?
You mean how to create such a script?
Well, start analysing, get the 3D data file's structure(s). Getting faceindices and vertices is the simplest part in most cases.
You need an address map like such:
---------- 1 0 2
seek set 0x14fa + 0x8, Face Start @ 0x1502
Vertex/weights Start @ 0x1616 (68)
"Vertex End @ 0x1946"
"after uvs, 20 Bytes End @ 0x1e96"
---------- 2 0 2
seek set 0x14fa + 0xde4, Face Start @ 0x22de
Vertex/weights Start @ 0x2836 (348)
"Vertex End @ 0x3886"
"after uvs, 20 Bytes End @ 0x53b6"
---------- 3 0 2
seek set 0x14fa + 0x5484, Face Start @ 0x697e
Vertex/weights Start @ 0x6e52 (343)
"Vertex End @ 0x7e66"
"after uvs, 20 Bytes End @ 0x9932"
[...]
If the vertices, weights and matrices use floats then it's no so hard, getting harder with half floats and you're lost with shorts (words), more or less.
Anyway, here's an exploded mesh, using random positions in despair
construct_meleea_exploded.jpg
(
Bone_CG_PinkyToe_L block should start at 0xEA5, sry)
btw, you could help finding the bones' parent ids and their positions:
in the lower part of the picture there's the bone ids marked (rectangle), a bone block could have additional 7 more bytes (00 08 000000 04 00).
After "0F 01" 8 bytes to follow, might be a quaternion.
I've logged the bonenames and marked the above mentioned by '8' (seven more bytes) and it doesn't make sense to me (not a 'flag' for child bones, obviously):
(Bone_CG_Ankle_R not in list)
1. Bone_CG_Back_L (9)
2. Bone_CG_Back_R (8)
3. Bone_CG_BigToe_L (8)
4. Bone_CG_Chest_L (9)
5. Bone_CG_Chest_R (9)
6. Bone_CG_ChestPlate (8)
7. Bone_CG_Collar (8)
8. Bone_CG_ElbowPad_R (8)
9. Bone_CG_Finger_Index1_L (8)
10. Bone_CG_Finger_Index1_R (8)
11. Bone_CG_Finger_Index2_L (8)
12. Bone_CG_Finger_Index2_R (8)
13. Bone_CG_Finger_Middle1_L (8)
14. Bone_CG_Finger_Middle1_R (8)
15. Bone_CG_Finger_Middle2_L (8)
16. Bone_CG_Finger_Middle2_R (8)
17. Bone_CG_Finger_Pinky1_L (8)
18. Bone_CG_Finger_Pinky1_R (8)
19. Bone_CG_Finger_Pinky2_L (8)
20. Bone_CG_Finger_Pinky2_R (8)
21. Bone_CG_Finger_Thumb1_L (8)
22. Bone_CG_Finger_Thumb1_R (8)
23. Bone_CG_Finger_Thumb2_L (8)
24. Bone_CG_Finger_Thumb2_R (8)
25. Bone_CG_Foot_L (9)
26. Bone_CG_Foot_R (9)
27. Bone_CG_ForeArm_L (9)
28. Bone_CG_ForeArm_R (9)
29. Bone_CG_Hand_L (8)
30. Bone_CG_Hand_R (8)
31. Bone_CG_HandPlate_L (8)
32. Bone_CG_HandPlate_R (8)
33. Bone_CG_Head (8)
34. Bone_CG_Heel_L (9)
35. Bone_CG_JunkPlate (8)
36. Bone_CG_KneeCap_R (8)
37. Bone_CG_KneePad_L (8)
38. Bone_CG_MidToe_L (8)
39. Bone_CG_Pelvis_L (8)
40. Bone_CG_Pelvis_R (9)
41. Bone_CG_PinkyToe_L (8)
42. Bone_CG_ShoulderPad_L (9)
43. Bone_CG_ShoulderPad_R (9)
44. Bone_CG_Spine1 (9)
45. Bone_CG_Thigh_L (9)
46. Bone_CG_Thigh_R (9)
47. Bone_CG_ThighPad_R (8)
48. Bone_CG_UpperArm_L (9)
49. Bone_CG_UpperArm_R (9)
What the heck - why don't we have
Toe_R here?
---------
These values from o3d looked like quaternions (they are for rotations only, iirc)
but
a^2 -b^2 -c^2 -d^2=-1 doesn't apply:
-0.435469 0.605304 0.232124 0.317423
1. Bone_CG_Back_L
-0.431318 0.602161 0.444411 0.456832
2. Bone_CG_Back_R
0.650075 -0.161931 0.852443 0.975555
4. Bone_CG_Chest_L
0.654225 -0.162633 0.564714 0.859584
5. Bone_CG_Chest_R