Hi everyone,
I've been trying out the OGRE Exporter add-on for Blender, and it halfway works: when I export the content, I get all the right files (mesh, skeleton, material, xml files, etc.).
However, when I look at the mesh with OgreMeshy (1.4), I see that all the bones are distorted and misplaced.
Right now I'm using a simple model for testing. Here's what it looks like in Blender:
And here's what I get in OgreMeshy:
That multicoloured dot in the middle is the armature. The distortion varies with the shape of the model's skeleton. On another model with a more human and more complex armature, the bones are just misplaced and somewhat shrunken.
Question: What steps are needed to correctly export the skeleton for use in an Ogre application?
A few notes:
- I'm using Blender 2.59 and the latest version of OGRE Exporter (0.5.4), which was apparently made for Blender 2.58. Realizing this, I tried using the same exporter with Blender 2.58 on another computer, with the same results.
- The mesh file is flawless, and can be used in an Ogre application, with its material, without any problems.
- There are directions for exporting the skeleton in io_export_ogreDotScene.py, which is the file for the add-on:
As I understand it, the "in and out frames" are the Strip Extents (Start Frame and End Frame). I've followed all these steps, to no avail.Quick Start:
1. select your armature and set a single keyframe on the object (loc,rot, or scl)
. note, this step is just a hack for creating an action so you can then create an NLA track.
. do not key in pose mode, unless you want to only export animation on the keyed bones.
2. open the NLA, and convert the action into an NLA strip
3. name the NLA strip(s)
4. set the in and out frames for each strip ( the strip name becomes the Ogre track name )
I've looked around the forum, and have found the same suggestions many times:
- make sure all the vertices are in at least one vertex group related to a bone (but less than four groups, which can cause animation problems);
- apply the model's changes to the object data (Ctrl + A > Location/Rotation/Scale);
- clear all transformations to the armature;
- check the armature's hierarchy and make sure the main bone is a parent to all other bones.
These are all things I've tried. No matter which version of Blender, OGRE Exporter, OgreMeshy or Ogre Command Line Tools I use, the results are always the same. This leads me to believe that I'm simply missing one crucial step, some property of the armature that I've overlooked. Wherever the problem is, I believe it creates a bad xml file which is used to create the .skeleton. I've changed some values in the xml and found that the changes were well applied when using it to create a new .skeleton file with OgreXMLConverter.exe. I also noticed that nowhere in the xml does it seem to take into account the position of the tail end of the bone. All three bones have their heads at position (0,0,0), so that's where they are in the skeleton.
Has anyone had this problem before?
Thank you.