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(https://jmonkeyengine.github.io/wiki/jme3/beginner/hello_animation.html) 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(MaterialLoader.java:196)
at com.jme3.scene.plugins.ogre.MaterialLoader.readPassStatement(MaterialLoader.java:246)
at com.jme3.scene.plugins.ogre.MaterialLoader.readPass(MaterialLoader.java:282)
at com.jme3.scene.plugins.ogre.MaterialLoader.readTechnique(MaterialLoader.java:298)
at com.jme3.scene.plugins.ogre.MaterialLoader.readMaterialStatement(MaterialLoader.java:304)
at com.jme3.scene.plugins.ogre.MaterialLoader.readMaterial(MaterialLoader.java:315)
at com.jme3.scene.plugins.ogre.MaterialLoader.load(MaterialLoader.java:451)
at com.jme3.scene.plugins.ogre.MaterialLoader.load(MaterialLoader.java:464)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:288)
at com.jme3.scene.plugins.ogre.MeshLoader.load(MeshLoader.java:864)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:288)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:374)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:378)
at mygame.HelloAnimation.simpleInitApp(HelloAnimation.java:35)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:226)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:207)
at java.lang.Thread.run(Thread.java:744)
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…