ArrayIndexOutOfBounceException while loading mesh.xml file

Hey guys,

As you can see in the Title an error occures when I try to load my mesh.xml file. I am using the same Code( as its used in the tutorial except the file path(changed to “Walking/Walking.mesh.xml”) in line 35.

But I also get the following error:
Schwerwiegend: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.ArrayIndexOutOfBoundsException: 4
at com.jme3.scene.plugins.ogre.MaterialLoader.readTextureUnit(
at com.jme3.scene.plugins.ogre.MaterialLoader.readPassStatement(
at com.jme3.scene.plugins.ogre.MaterialLoader.readPass(
at com.jme3.scene.plugins.ogre.MaterialLoader.readTechnique(
at com.jme3.scene.plugins.ogre.MaterialLoader.readMaterialStatement(
at com.jme3.scene.plugins.ogre.MaterialLoader.readMaterial(
at com.jme3.scene.plugins.ogre.MaterialLoader.load(
at com.jme3.scene.plugins.ogre.MaterialLoader.load(
at com.jme3.asset.DesktopAssetManager.loadAsset(
at com.jme3.scene.plugins.ogre.MeshLoader.load(
at com.jme3.asset.DesktopAssetManager.loadAsset(
at com.jme3.asset.DesktopAssetManager.loadModel(
at com.jme3.asset.DesktopAssetManager.loadModel(
at mygame.HelloAnimation.simpleInitApp(
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(

The error only occures when I load the material File (Walking.material). It is in the same folder btw. I tried to load only the mesh.xml file and it worked but because of the missing material it was all red and I really dont know what to do…

I couldn’t spot that „Walking.material“ in the example. I guess you do it wrong, but hard to judge if we can not see the code which throws this exception…
Or I missed it?!

EDIT: Ok I saw it, so you load another model with a material or the like. Still don’t get it, better post your broken code here. And please please please use code blocks there is a sticky post on top which explains it => How to type code blocks

I am using the same Code as its used in the HelloAnimation Tutorial from jme3 as I wrote in my question

I simply changed the Path and yes the files I try to load are my own files. They are Created with FuseCC and imported to Blender where I exported them with the OgreExporter to a mesh and scene

Then something is wrong with that file.

Can I load .mtl files? I get the Problem that the engines thinks that the type of the file is “” instead of “.mtl”

So I imported my animated Model in Blender and exported as mesh and scene but I get a Diffuse/Gloss/Normal/Specular/Opacity picture for every part of it. So I have a Body/Top etc part. I tried to combine them to one object but in the end I have one mesh.xml file but different images for different parts. So I would have more than one diffuse texture etc…

You can select the checkbox in ogre export to combine materials into one. You will still have a separate mesh for each texture that you can use to assign different materials to. If you don’t want the separate meshes, bake your textures and use that image in a new material/texture that you assign to the model and you will only have the one mesh.

Yes I have one single mesh but still seperated Textures…

Ok, and?