Ogre XML Exporter Issues

Im following this guide for ogre xml http://thomas.trocha.com/wp/?page_id=235 When I export the meshes and scene exactly like he asks and move it into my project I try importing it with the same code he uses.  The files have all the correct names but nothing happens…  I try using the objects he exported and it works fine.  Anyone else have any issues with this?  Or know of a fix?

I suppose some of your models have material/texture settings that cannot be converted, so the exporter skips these objects.

Try setting the basic material to all objects and then export again and see if the objects get transferred then.

Send me/upload the files I'll try them out.

Hmm,… when you are in blender, and you move the bone in pose-mode the box is also moving?

I rember I had issues when I exported an object but attached not every vertex to the bone.

Actually you could try following: after creating the bone. Select in Object-Mode the Box and then the Bone-> ctrl-p ->Armature->Create from BoneHeat  Actually this is much easier in this case (but when I wrote the tutorial I didn't know about that).

But as momoko_fan said, provide the blend-file and we might have a look…

Sorry for taking so long to reply… Ive had alot going on lately so I pushed this project to the side but the blender file Im using is the same one he supplies the download is here http://thomas.trocha.com/wp/wp-content/uploads/2009/04/ogresceneexport.blend

Hmm… I tried this again on a computer running Ubunu, same issue came up.  Either the exporter is broken or his instructions are wrong… anyone able to get this to work?

Can't export it as well. So either the exporter is broken or the instructions are wrong. (I'm sure it worked once)

Hmm does anyone know if the wiki version works? http://www.jmonkeyengine.com/wiki/doku.php/blender_ogrexml_tutorial 

I'm quite sure that if you would follow both tutorials it would lead you to the goal.

Actually I don't know why the provided blend is not working. Acutally I think it is

not a good blend-file cause there are no Animation-Frames for some reason.

When this tutorial was created ogre-import wasn't part of jME but of radakan

but that has nothing to do with the exporter.

I tested ogre -export with a new test and it works fine. I have attached a zip with a test

and a corresponding .blend file. So you see the exporter is working.

Very quick description how to do it:

->Add cube. Select cube(right-click).

->shit+s->cursor to selection

->add armature

->select cube AND (with shift-pressed) armature (order is important)

->parent ( ctrl-p) -> make parent to armature -> create from bone heat

->select armature

->change to Pose-Mode (instead of object-mode)

->select the bone (if not already selected)

->create frame ( i-key ) -> loc/rot

->move to another frame ( alt+mousewheel or in edit-mode on the Panels overview or in ActionEditor)

->move/rotate bone

->create another frame ( i-key ) -> loc/rot

->change to object-mode

->select armature and mesh

->File->Export->ogre-mesh (press add in Skeleton if action is not shown)

->choose export directory (the file is named after the Object-Name e.g. Cube.ogre.xml)

->if you want you can rename the Scene.material filename


That's it for the export (hopefully)

On jME side do following:

import java.net.URL;

import com.jme.app.SimpleGame;
import com.jme.scene.Node;
import com.jmex.model.ogrexml.MaterialLoader;
import com.jmex.model.ogrexml.OgreLoader;
import com.jmex.model.ogrexml.anim.MeshAnimationController;

public class OgreTest extends SimpleGame{
   public static void main(String[] args)
      new OgreTest().start();

   protected void simpleInitGame() {
      // replace this with your files
      Node n = getOgreMesh("test/res/Plane.mesh.xml", "test/res/Scene.material");
      // that will throw nullpointer-exception if no animation is added!!
      MeshAnimationController animC = (MeshAnimationController)n.getController(0);
      // replace Action with the Animationname you want to play

   public static Node getOgreMesh(String mesh,String mat)
        OgreLoader loader = new OgreLoader();
        MaterialLoader matLoader = new MaterialLoader();
        try {
            URL matURL = OgreTest.class.getClassLoader().getResource(mat);
            URL meshURL = OgreTest.class.getClassLoader().getResource(mesh);
            if (matURL != null){
                if (matLoader.getMaterials().size() > 0)
            Node model = (Node) loader.loadModel(meshURL);
            return model;
        catch (Exception e)
           return null;

So,...hope helps.

Good luck, ToM

Thanks for the help I appreciate it

ttrocha, the model load fine but it doesn