Can’t get my model out of Blender


I’m very (< 1 week) new to jME3 and Blender. I’m working on a project where I have to visualize some human movement, so I’ve been going through the learning curve procedure to make a model in Blender, import it into jME3, and develop a visualization utility for our work based on manipulating that model.

I started with a BVH file. I imported this into Blender 2.57 to get the armature structure, and built a model around it. I can play my BVH through Blender and it looks fine. I made a crude UV texture in Blender as well. After I finished this, I discovered that the OgreXML exporter is only for Blender 2.49. Since the Blender 2.5 UI will be used in the future, I’d rather not go through two Blender learning curves and make my model over again, so I’m looking for ways to export the model I have. Here’s what I’ve tried, and how each approach fails for me:

-I installed blender2ogre, found on the ogre forums. When i try to export with this plugin, it crashes with a large stack trace that seems to original at an error that goes something like, ‘UnboundLocalError: Local variable ‘badverts’ referenced before assignment’. I don’t know how to continue from here with this approach.

-I installed Blender 2.49 just to see if it could load the 2.57 file. It loaded the mesh, but not the texture or animation. I have no idea how to get it to load the texture data. I installed the 2.49 Ogre exporter, highlighted my mesh, and tried to export. Many warnings along the lines of "Warning: Error in normalize! Face of mesh ‘Cube.002’ too small’, and then a handful of “Warning: Vertex with more than 4 bone assignments”. I do get a Cube.002.mesh.xml file generated by this, however, but jME3 just throws an IndexOutOfBoundsException when I try to load it.

-I used Blender 2.5 to export my model as a Wavefront OBJ. jME3 throws an exception when trying to load this:

[java]java.lang.IllegalStateException: No loader registered for type “”

at com.jme3.asset.DesktopAssetManager.loadAsset(

at com.jme3.asset.DesktopAssetManager.loadTexture(

at com.jme3.scene.plugins.MTLLoader.loadTexture(

at com.jme3.scene.plugins.MTLLoader.readLine(

at com.jme3.scene.plugins.MTLLoader.load(

at com.jme3.asset.DesktopAssetManager.loadAsset(

at com.jme3.asset.DesktopAssetManager.loadAsset(

at com.jme3.scene.plugins.OBJLoader.loadMtlLib(

at com.jme3.scene.plugins.OBJLoader.readLine(

at com.jme3.scene.plugins.OBJLoader.load(

at com.jme3.asset.DesktopAssetManager.loadAsset(

at com.jme3.asset.DesktopAssetManager.loadModel(

at com.jme3.asset.DesktopAssetManager.loadModel([/java]

…I don’t know how to help this, either.

-I installed JMP, and tried to see if there were import/export utilities there. JMP was initially able to create a new project, but the test cases all failed to compile. Found mention of this on these forums, so I let JMP update. For a brief period, the automatically generated test cases for jME3 were present in JMP and were able to run. Afterwards, however, it seemed to be producing corrupt projects, reading projects incorrectly, and/or was corrupting projects that already existed (i.e. the new project wizard will produce a whole bunch of files in a new directory, but JMP would either fail to recognize it as a project, or complain that it was corrupt). All the tutorial videos I’ve seen on JMP show the new project functionality working just fine, so this was a show-stopper for me. I haven’t been able to get JMP to recognize any projects, even after a reinstall, and even after deleting all the workspace data manually. I have jME3 working reliably in Eclipse, however.

From the looks of the jME3 API, it supports loading blender files and COLLADA files, too. I’ll try importing these next.

Is there a way out of this without having to start from square one, learn an obsolete UI, and redo all my work?


You can use the brand new blender importer for blender 2.57. For OgreXML, you have been warned from the beginning that only 2.49 is supported.

Heres a doc explaining how to set up animation properly in blender 2.49 so that it works in a game.

Yes, the OgreXML support pages all say clearly that 2.49 is the latest stable version… But I started learning at the jME3 tutorial pages, which simply mention that you should use Blender to make models. When I got far enough in the jME3 tutorials to import a model, I switched to learning Blender, and then when I had a Blender model, I started looking into OgreXML exporting. Depth-First learning was my mistake, I guess.

Also: Where is the BlenderLoader, or the BlenderModelLoader? They aren’t in the JME3 distribution I have, but they appear to have javadocs online. Which one should I use?

Correction: It looks like Blender 2.49 will load textures from a blender 2.57 file (when they are packed into the file). It doesn’t import the animation, but that’s fine-- I only need the armature structure, which seems to have been retained.

I’m still getting the same errors described above when trying to export from Blender 2.49. Can anyone help?


Read the document I posted

I gave in and redid all my work in Blender 2.49, according to the document you posted. It took a long time, but my model looks a lot better and it imports more or less perfectly now.

Thanks for the help!

1 Like