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

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
E_Van
Gnoblar
Posts: 2
Joined: Mon Jun 10, 2019 4:57 pm
x 1

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

Post 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.
paroj
OGRE Team Member
OGRE Team Member
Posts: 1995
Joined: Sun Mar 30, 2014 2:51 pm
x 1075
Contact:

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

Post 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
E_Van
Gnoblar
Posts: 2
Joined: Mon Jun 10, 2019 4:57 pm
x 1

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

Post 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?
paroj
OGRE Team Member
OGRE Team Member
Posts: 1995
Joined: Sun Mar 30, 2014 2:51 pm
x 1075
Contact:

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

Post by paroj »

no idea, did not try it myself yet
Post Reply