I am new to JME and the whole world of game creation. I was in the process of using JME to make a school project when I encountered my first problem. I used OgreMaxExporter with 3dsmax to export a animated model which i am going to use with my game. I used this guide (https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:external:3dsmax) to export a model with two animations to a mesh.xml file. But when i call the model and its animation in the HelloAnimation.java tutorial to test it in game, I get an
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
com.jme3.asset.AssetLoadException: An exception has occured while loading asset: troll_run.mesh.xml
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:285)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:369)
at com.jme3.scene.plugins.ogre.SceneLoader.parseEntity(SceneLoader.java:302)
at com.jme3.scene.plugins.ogre.SceneLoader.startElement(SceneLoader.java:388)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:506)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:376)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2717)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
at com.jme3.scene.plugins.ogre.SceneLoader.load(SceneLoader.java:530)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:283)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:369)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:373)
at AnimationsTester.simpleInitApp(AnimationsTester.java:29)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:225)
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:722)
Caused by: java.io.IOException: Error while parsing Ogre3D mesh.xml
at com.jme3.scene.plugins.ogre.MeshLoader.load(MeshLoader.java:897)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:283)
… 23 more
Caused by: org.xml.sax.SAXException: Expected an integer, got ‘float2’
at com.jme3.util.xml.SAXUtil.parseInt(SAXUtil.java:61)
at com.jme3.scene.plugins.ogre.MeshLoader.startVertexBuffer(MeshLoader.java:429)
at com.jme3.scene.plugins.ogre.MeshLoader.startElement(MeshLoader.java:643)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:506)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:376)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2717)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
at com.jme3.scene.plugins.ogre.MeshLoader.load(MeshLoader.java:888)
… 24 more
Ok just tried a couple other different models and it seems like Jmonkey throws the .mesh.xml error for any model. Even the model in the tutorial throws the issue. I am starting to think the issue is related to a problem betwen OgreMax Exporter and JME. I tried changing the OgreMax Exporter from v1.7 to v1,8 and got the same results. This is extremely frustrating.
Hi. Thank you so much for replying. Which file exactly did u want me to import to blender? the mesh.xml? Do i need an ogreimporter for blender to do that?
I don’t seem to be able to import the .mesh.xml into blender. For some reason the ogre importer plugin is not showing up in my blender add-ons. Any other way i can tackle this?
It seem you’re running against RC2. There has been some changes in the loader since then.
Could you please upload one of the failing model so I can test if it work against last SVN?
Thank you everyone for you help. I was able to fix it. Apparently it was an issue with the xml files that OgreMax created. When I exported the animated model as a binary file then used OgreConverter to convert the mesh and skeleton to .mesh.xml and .skeleton.xml it worked fine in JMonkey. No idea what is wrong with the xml files created by OgreMax. Once again thank you guys.
I ran into the same problem when using the OgreMaxExporter. I was unable to convert the mesh.xml into .j3o.
It seems that this is the clue: “Expected an integer, got ‘float2′”. When I took a look at the mesh.xml, the texCoord-vertexbuffer looked like this:
I got the same problem and like red51 said: remove the float in “texture_coord_dimensions_0=”float2” and it works again (I’m working on a nightly build from 15.09.2013