haruse31 Posted Saturday at 08:07 AM Posted Saturday at 08:07 AM can anybody help me with reversing a skeleton file what to look for in hex and how to identify the values i should look for to understand structure of the rig file
Engineers shak-otay Posted Saturday at 09:03 AM Engineers Posted Saturday at 09:03 AM That's not explained in one post because it requires 2nd level knowledge, imho, after having done the basic stuff for reversing meshes. If you've done so already: for the skeleton you could try use Durik's skelfinder, I'd suggest to read the two posts here.
haruse31 Posted Saturday at 09:55 AM Author Posted Saturday at 09:55 AM 51 minutes ago, shak-otay said: That's not explained in one post because it requires 2nd level knowledge, imho, after having done the basic stuff for reversing meshes. If you've done so already: for the skeleton you could try use Durik's skelfinder, I'd suggest to read the two posts here. How to use this tool ?
Engineers shak-otay Posted Saturday at 10:26 AM Engineers Posted Saturday at 10:26 AM (edited) edit 3: ok, the tool SkelFinder on Durik's Github page and the script (tool_SkelFinder.py) are different things. Sorry for the confusion. Maybe there was a tutorial on xentax, don't remember, so the best way, imho, is learning by doing: link1 link2 link3 Of course you'll need to read/understand the whole threads behind these links, more or less. (If you don't want to start now I strongly suggest to download the samples in each starting post because links may expire when you hesitate too long...) edit 2: for AXE please do a forum search. Edited Saturday at 11:08 AM by shak-otay
haruse31 Posted Saturday at 10:47 AM Author Posted Saturday at 10:47 AM (edited) 21 minutes ago, shak-otay said: Maybe there was a tutorial on xentax, don't remember, so the best way, imho, is learning by doing: link1 link2 link3 Of course you'll need to read/understand the whole threads behind these links, more or less. (If you don't want to start now I strongly suggest to download the samples in each starting post because links may expire when you hesitate too long...) edit: ok, seems I missed the most important info, using skelfinder with Noesis, wait a moment Is there any available tutorials for AXE too ? Also, thank you very much Edited Saturday at 10:48 AM by haruse31
haruse31 Posted Saturday at 11:01 AM Author Posted Saturday at 11:01 AM 34 minutes ago, shak-otay said: Maybe there was a tutorial on xentax, don't remember, so the best way, imho, is learning by doing: link1 link2 link3 Of course you'll need to read/understand the whole threads behind these links, more or less. (If you don't want to start now I strongly suggest to download the samples in each starting post because links may expire when you hesitate too long...) edit: ok, seems I missed the most important info, using skelfinder with Noesis, wait a moment Name of the script is tool_SkelFinder.py (see Github page of Durik256) After having copied it to Noesis\plugins\python\ in Noesis, Tools check menue point Display Plugin Tools click line Skel Finder and this window should pop up: edit 2: for AXE please do a forum search. Could you please give me a link for the plugin tool_SkelFinder.py as I can't find it on Durik256's GitHub
Engineers shak-otay Posted Saturday at 11:06 AM Engineers Posted Saturday at 11:06 AM 4 minutes ago, haruse31 said: Could you please give me a link for the plugin tool_SkelFinder.py as I can't find it on Durik256's GitHub Guess, the script is outdated. Use the tool on Github as it's the one which Durik used in the above mentioned 3 links.
haruse31 Posted Saturday at 12:43 PM Author Posted Saturday at 12:43 PM (edited) 1 hour ago, shak-otay said: Guess, the script is outdated. Use the tool on Github as it's the one which Durik used in the above mentioned 3 links. Sorry to bother, I identified bone count and the marker FF FF FF FF at the end of a block, but still I get no good results, only errors. Can you help please? How to identify rotation matrix Edited Saturday at 12:46 PM by haruse31
Engineers shak-otay Posted Saturday at 01:07 PM Engineers Posted Saturday at 01:07 PM 22 minutes ago, haruse31 said: Sorry to bother, I identified bone count and the marker FF FF FF FF at the end of a block, but still I get no good results, only errors. Can you help please? Which sample? Quote How to identify rotation matrix I assume you know what "floats" are and know their hex representation?
haruse31 Posted Saturday at 01:13 PM Author Posted Saturday at 01:13 PM (edited) 7 minutes ago, shak-otay said: Which sample? I assume you know what "floats" are and know their hex representation? Okay I found this in hex, bone count is 0x5C at offset 0x8, i guess these "00 00 80 3F" is rotation matrix ? There's this "FF FF FF FF" marker too Edited Saturday at 01:16 PM by haruse31
Engineers shak-otay Posted Saturday at 01:40 PM Engineers Posted Saturday at 01:40 PM Might be the start of the rotation matrix, dunno, I need to know which sample it is.
haruse31 Posted Saturday at 01:47 PM Author Posted Saturday at 01:47 PM 6 minutes ago, shak-otay said: Might be the start of the rotation matrix, dunno, I need to know which sample it is. s1_wolverineskeleton_s1_wolverine000.component0.zip
Engineers shak-otay Posted Saturday at 02:19 PM Engineers Posted Saturday at 02:19 PM Thanks! Problems: the FFFF isn't part of a bone indices block. And on a quick glance I don't see the bones' (parenting) IDs blocks. There's no bone names. Is there a mesh file for the wolverine?
haruse31 Posted Saturday at 02:26 PM Author Posted Saturday at 02:26 PM 4 minutes ago, shak-otay said: Thanks! Problems: the FFFF isn't part of a bone indices block. And on a quick glance I don't see the bones' (parenting) IDs blocks. There's no bone names. Is there a mesh file for the wolverine? Yes, but as far as I know it doesn't have bones. Here it is. Component 0 has header, mesh declarations, FVF Declarations Component 1 has vertex buffer and index buffer s1_wolverine000.component0.zip Do you want me to provide more details? I have full structure of the model file and an import script for Blender
Engineers shak-otay Posted Saturday at 02:37 PM Engineers Posted Saturday at 02:37 PM A blender outliner screenshot where all the wolverine sub meshes/elements are displayed would be nice. The full structure would be helpful, too, to assure that there's no skeleton related data "hidden" somewhere.
haruse31 Posted Saturday at 02:42 PM Author Posted Saturday at 02:42 PM (edited) 52 minutes ago, shak-otay said: A blender outliner screenshot where all the wolverine sub meshes/elements are displayed would be nice. The full structure would be helpful, too, to assure that there's no skeleton related data "hidden" somewhere. Quote mesh count: 0xc (2 in case of wolverine) bmin: 0x24 bmax: 0x30 mesh table start: 0x50 (mesh count * 8 bytes) (16 in case of wolverine) then alignment to 16-byte boundary MeshDecl_1 starts at 0x60 skips 32 bytes (0x20) reaches 0x80 reads 14 unsigned ints (56 bytes, 0x38 bytes) count3 (bone palette count) , count 6 (vertex count), count 10(index count) after reading 56 bytes reads bone palette which is (count 3* 2) bytes (count3 is 25 in case of wolverine mesh 1) bone palette = 25 * 2 bytes = 50 then alignment to 4-byte boundary afterwards read stride, mag1, and mag2 (3*4 = 12 bytes) FVF_Declarations 1 read fvf delcarations [8 bytes each] until terminator sentinel (FF 00 00 00 11 00 00 00) then alignment to 16-byte boundary MeshDecl_2 starts at 0x140 skips 32 bytes (0x20) reaches 0x160 reads 14 unsigned ints (56 bytes, 0x38 bytes) count3 (bone palette count) , count 6 (vertex count), count 10(index count) after reading 56 bytes reads bone palette which is count 3 * 2 bytes (count3 is 46 in case of wolverine mesh 2) bone palette = 46 * 2 bytes = 92 afterwards read stride, mag1, and mag2 (3*4 = 12 bytes) FVF_Declarations 2 read fvf declarations [8 bytes each] until terminator sentinel (FF 00 00 00 11 00 00 00) then alignment to 16-byte boundary Edit 1: Yes read bone palette is part of the script but i am not sure what they are actually and if they get read or not by the script Edit 2: Added Importer Script SMWOS_MESH_Importer (2) (3).py Edited Saturday at 03:30 PM by haruse31 1
Engineers h3x3r Posted Saturday at 02:51 PM Engineers Posted Saturday at 02:51 PM (edited) Where did you get bone count? Quote Problems: the FFFF isn't part of a bone indices block. This is most probably bone id and in most cases it is a root. But I may be wrong... This is my guess-work... //------------------------------------------------ //--- 010 Editor v14.0 Binary Template // // File: // Authors: // Version: // Purpose: // Category: // File Mask: // ID Bytes: // History: //------------------------------------------------ LittleEndian();OutputPaneClear(); uint16 Unknown_0; uint16 Unknown_1; uint32 Unknown_2; uint32 BoneCount; uint32 Unknown_3; struct { float Unknown_0[16]; struct { float Mat00,Mat01,Mat02,Mat03, Mat10,Mat11,Mat12,Mat13, Mat20,Mat21,Mat22,Mat23, Mat30,Mat31,Mat32,Mat33; }Matrix4x4; uint16 Unknown_1; uint16 Unknown_2; uint32 Unknown_3; uint32 Unknown_4; uint32 Unknown_5; }BoneInfo[BoneCount]<optimize=false>; Edited Saturday at 03:22 PM by h3x3r
Engineers shak-otay Posted Saturday at 03:10 PM Engineers Posted Saturday at 03:10 PM (edited) @haruse31: thanks. But you should expand the outliner to the details, of course. Are there vertex groups? In the structure it reads "reads bone palette". Is this part of the script? So yes, the script would be helpful, since I get bogus with hex2obj: (seems I need to subtract an offset when x coordinates exceeds some value, so I need the averages but for performance reasons I calculated them only for VertexBlock_VShort_UVs_Word() ) Edited Saturday at 04:58 PM by shak-otay
huckleberrypie Posted Saturday at 03:31 PM Posted Saturday at 03:31 PM 20 minutes ago, shak-otay said: @haruse31: thanks. But you should expand the outliner to the details, of course. Are there vertex groups? In the structure it reads "reads bone palette". Is this part of the script? So yes, the script would be helpful, since I get bogus with hex2obj: Red herring info on the offsets/counts/etc?
Engineers shak-otay Posted Saturday at 07:11 PM Engineers Posted Saturday at 07:11 PM (edited) ok, the script from mariokart64n reads two bone palettes from the ..0.MESH file. That's the bone IDS I wrote of. So one palette for each mesh, highest bone IDs are 86 and67. Some ids are missing, some appear in both palettes. Strange. There's several RAW FVF tuples. FVF usually means "flexible vertex format", afaik (so should not be related to bone ids?) edit: sadly the bone palettes (which I thought to be bone ID hierarchy tables) in the ..0.mesh file were totally misleading. All IDs can be found in the .SKEL file instead. Edited Monday at 09:51 PM by shak-otay
haruse31 Posted Sunday at 10:47 AM Author Posted Sunday at 10:47 AM (edited) 15 hours ago, shak-otay said: ok, the script from mariokart64n reads two bone palettes from the ..0.MESH file. That's the bone IDS I wrote of. So one palette for each mesh, highest bone IDs are 86 and67. Some ids are missing, some appear in both palettes. Strange. There's several RAW FVF tuples. FVF usually means "flexible vertex format", afaik (so should not be related to bone ids?) Okay, so someone helped me and figured out the skeleton. Here's a Noesis script fmt_spidermanskel.py Edited Sunday at 10:48 AM by haruse31 1
Engineers shak-otay Posted Sunday at 11:23 AM Engineers Posted Sunday at 11:23 AM I assume it's from Durik256. For a tutorial it's required to change it like so, imho, to make understandable where the parentIDs come from: parentID = bs.readInt(); print(i, parentID) joints.append(NoeBone(i, "joint_"+ str(i), jMat, None, parentID))
haruse31 Posted Sunday at 11:29 AM Author Posted Sunday at 11:29 AM 4 minutes ago, shak-otay said: I assume it's from Durik256. For a tutorial it's required to change it like so, imho, to make understandable where the parentIDs come from: parentID = bs.readInt(); print(i, parentID) joints.append(NoeBone(i, "joint_"+ str(i), jMat, None, parentID)) It is from Joschka. By the way, could you please give me a brief explanation of the structure based on the Noesis script? I'm trying to fully understand it so I can make a Blender import script. 1
Engineers shak-otay Posted Sunday at 12:16 PM Engineers Posted Sunday at 12:16 PM (edited) 52 minutes ago, haruse31 said: It is from Joschka. Joschka from former Xentax? Great to see he's still active. Somewhere. Quote By the way, could you please give me a brief explanation of the structure based on the Noesis script? I'm trying to fully understand it so I can make a Blender import script. I'm not too familiar with Noesis details. But since it's a very short script it should be doable. I'd insert a print line like so to get the addresses of the bone matrices. bs.readBytes(0x40) print(i, "addr mat", hex(bs.tell())) Basically it's 92 bones (or "joints") with their matrices (rotation and position). You'll need to handle a "matrix 4x4 to a matrix 4x3 transformation" including inversion. From Noesis you could export the skeleton to .smd to see the bones' structure (last number in line is parenting bone id, first bone has no parent, thus -1) : nodes 0 "joint_0" -1 1 "joint_1" 0 2 "joint_2" 1 ... edit: I strongly recommend to start with the positions only and care for the rotations in a second step. Edited Sunday at 12:23 PM by shak-otay 1
AexaDev Posted Monday at 11:26 AM Posted Monday at 11:26 AM 23 hours ago, shak-otay said: Joschka from former Xentax? Great to see he's still active. Somewhere. I'm not too familiar with Noesis details. But since it's a very short script it should be doable. I'd insert a print line like so to get the addresses of the bone matrices. bs.readBytes(0x40) print(i, "addr mat", hex(bs.tell())) Basically it's 92 bones (or "joints") with their matrices (rotation and position). You'll need to handle a "matrix 4x4 to a matrix 4x3 transformation" including inversion. From Noesis you could export the skeleton to .smd to see the bones' structure (last number in line is parenting bone id, first bone has no parent, thus -1) : nodes 0 "joint_0" -1 1 "joint_1" 0 2 "joint_2" 1 ... edit: I strongly recommend to start with the positions only and care for the rotations in a second step. Hi i come from the same place as him, its a discord server 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now