Problem with loading Ogre files

I tried to load a converted ogre file into jme3, but I have no success. Whats the Problem?



Error Message:

INFO: Child (BitmapFont) attached to this node (Statistics View)

24.09.2007 00:01:13 com.jme3.scene.Node attachChild

INFO: Child (BitmapFont) attached to this node (Statistics View)

24.09.2007 00:01:13 com.jme3.scene.Node attachChild

INFO: Child (Statistics View) attached to this node (Gui Node)

24.09.2007 00:01:13 com.jme3.scene.plugins.ogre.MeshLoader startElement

WARNUNG: Unknown tag: materials. Ignoring.

24.09.2007 00:01:13 com.jme3.asset.DesktopAssetManager loadAsset

WARNUNG: Failed to load resource: data/mesh/creature/golemcracked/cracked_golem.mesh.xml

java.io.IOException: Error while parsing Ogre3D mesh.xml

at com.jme3.scene.plugins.ogre.MeshLoader.load(MeshLoader.java:719)

at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:175)

at GameApp.simpleInitApp(GameApp.java:60)

at com.xero.app.XeroApplication.initialize(XeroApplication.java:84)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:102)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:151)

at java.lang.Thread.run(Unknown Source)

Caused by: org.xml.sax.SAXException: Expected an integer

at com.jme3.util.xml.SAXUtil.parseInt(SAXUtil.java:27)

at com.jme3.scene.plugins.ogre.MeshLoader.startSharedGeom(MeshLoader.java:203)

at com.jme3.scene.plugins.ogre.MeshLoader.startElement(MeshLoader.java:517)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)

at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)

at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)

at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)

at com.jme3.scene.plugins.ogre.MeshLoader.load(MeshLoader.java:714)

… 6 more

24.09.2007 00:01:13 com.jme3.asset.DesktopAssetManager loadAsset

WARNUNG: Error occured while loading resource data/mesh/creature/golemcracked/cracked_golem.mesh.xml using MeshLoader

24.09.2007 00:01:13 com.jme3.app.Application handleError

SCHWERWIEGEND: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]

java.lang.NullPointerException

at com.jme3.asset.ModelKey.createClonedInstance(ModelKey.java:18)

at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:201)

at GameApp.simpleInitApp(GameApp.java:60)

at com.xero.app.XeroApplication.initialize(XeroApplication.java:84)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:102)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:151)

at java.lang.Thread.run(Unknown Source)





File:http://www.file-upload.net/download-2840904/cracked_golem.mesh.xml.html



Thanks for any idea!

It looks like there has been a problem loading the mesh.xml. First the material cannot be found, then IOException occurs while loading the mesh. It is probably a naming issue with the Blender exporter… the exporter requires the material file to have the same name as the Blender mesh being exported. Otherwise check that the link to the skeleton file in the mesh.xml file is correct. If you try to convert the mesh.xml file to a j3o file in the platform, do you get an error?

It is probably a naming issue with the Blender exporter… the exporter requires the material file to have the same name as the Blender mesh being exported.


I don't use Blender. I use the Milkshape Ogre-Converter and afterwards the XMLConverter. (All included inside OgreExporters-0.11.1). And I have no idea what you mean with naming issue. Its the first time I hear this. Can you explain?

The model has no material (tried it with and without, but get the same error message). I mean, whats the use of a material inside the model, if i reset it with jME as soon as I set the Material?


If you try to convert the mesh.xml file to a j3o file in the platform, do you get an error?

Don't know how to convert mesh.xml to j3o. Honest, I would like to concentrate only on one format. Ogre is enough for me.
DarkPhoenixX said:
I don't use Blender. I use the Milkshape Ogre-Converter and afterwards the XMLConverter. (All included inside OgreExporters-0.11.1). And I have no idea what you mean with naming issue. Its the first time I hear this. Can you explain?

The model has no material (tried it with and without, but get the same error message). I mean, whats the use of a material inside the model, if i reset it with jME as soon as I set the Material?

blender ogre exporter export the material in a scene.material file. This material can be used when reading the mesh.xml file in JME3, but it only support a simple texture. the file must be named nameOfYourMesh.material in order JME3 can recognize it.
I personally never use this, and create my own material with the lighting material definition, that supports normal maps, specular,...

DarkPhoenixX said:
Don't know how to convert mesh.xml to j3o. Honest, I would like to concentrate only on one format. Ogre is enough for me.

In JMP it's a double click on the mesh.xml file or right click "convert to j3o"

My converter gives me an option not to export the material. So I need this material file?

Thx, your explanation cleared a lot in my head.



What can I do if don’t want to use a material file? It has no use for me, except I have to create one for every mesh I have. Can I use any dummy material file? Since I can use setMaterial inside jME, nameOfYourMesh.material is a bit unhandy. With obj it’s possible

DarkPhoenixX said:
Don't know how to convert mesh.xml to j3o. Honest, I would like to concentrate only on one format. Ogre is enough for me.

None of the external formats can save all of jme3's options and importing and parsing/extending the scenegraph at the start of a game is unnecessary wait time for the user. Every pro game stores its assets in a native engine format and not in the export formats of the 3D editors.
Cheers,
Normen

P.S. Just name the material file the same as the scene file, it will just be one for the whole scene. You will need it, it stores the texture etc. info for your mesh.

The cracked_golem.mesh.xml file is an invalid Ogre3D mesh file.

Its possible you used a very outdated tool to generate it. OgreXMLConverter will fail to generate a proper model from it, which indicates it won’t work in Ogre3D either.



You should only use the latest tools and exporters available to generate Ogre3D mesh files.