Page 1 of 1

The best way to import a bone structure to a .blend file

Posted: Mon Jun 10, 2019 5:24 pm
by E_Van
Hello all,

I am currently trying to develop some models for the game Torchlight 2. I've had some success with being able to convert a .mesh.xml to a .obj using a bunch of regular expressions magic, and have made new models from these originals. The issue I'm having right now is that I'd like to reuse the .skeleton animations of the original model for this mod, and that means rigging my model to the original's skeleton.

Two issues:
1. The object file format doesn't have any way to create bones. I have a solution for this (importing bone locations as verts, making bones from the verts), but the rotation of the bones will be incorrect. Then there's also the issue with end bones like fingers not having a vert to orientate the bone, but I could do some math on the rotation unit vector to get a direction.

2. The bigger issue is that it seems like the scales between the mesh.xml and skeleton.xml are off. One example: A vertex on the character's chin has a Z position of ~2.5, but the Z position in the skeleton.xml is 3.51 E-09, basically 0.

I've skimmed the wiki entry on the C++ code for the skeleton file type, but I don't see anything useful about the structure of the skeleton.xml file type. Does anyone happen to have any experience with ripping bones from a compiled ogre mesh? I'd rather not have to create my own skeleton and animations for something that was supposed to be a less than 12 hour simple mod.

Re: The best way to import a bone structure to a .blend file

Posted: Mon Jun 10, 2019 11:50 pm
by paroj
you can find an up-to-date version of the torchlight blender importer/ exporter here:
https://www.lofigames.com/phpBB3/downlo ... hp?id=7721

Re: The best way to import a bone structure to a .blend file

Posted: Tue Jun 11, 2019 2:06 am
by E_Van
Three hours of work on porting the mesh.xml to .obj by hand, and then I find out there's an importing tool specifically for Torchlight...

Well, I'm glad I at least finally sat down and learned how to use regex properly.

Thank you for the link. Is there any specific usage needed, or is it as simple as just importing the .mesh while it's in the proper file structure?

Re: The best way to import a bone structure to a .blend file

Posted: Tue Jun 11, 2019 1:00 pm
by paroj
no idea, did not try it myself yet