Stumbling on the tutorial

Hello,

I’m working on the tutorial and I am stuck on trying to load the unzipped contents of town.zip



This line of code:

[java]Spatial gameLevel = assetManager.loadModel("Scenes/town/main.scene");[/java]

I get this warning -


Feb 03, 2012 11:05:35 PM com.jme3.scene.plugins.ogre.SceneLoader load
WARNING: Cannot locate Scenes/town/main.material for scene Scenes/town/main.scene


And the following exception:

java.lang.IllegalStateException: No loader registered for type "meshxml.xml"
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:248)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:408)
at com.jme3.scene.plugins.ogre.SceneLoader.startElement(SceneLoader.java:327)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:506)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:353)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2715)
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:488)
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:449)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:273)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:408)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:418)
at com.sandro.shapeshift.HelloAssets.simpleInitApp(HelloAssets.java:31)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:231)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:129)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:205)
at java.lang.Thread.run(Thread.java:722)


Any ideas? Thank you!

Did you ever figure out what the problem was? I am seeing the exact same thing - and the tutorials were going so smoothly up to this point! Also, in the next section were we are to right-click the main.scene and convert the scene to binary, I get the error:



No material file found for main.scene

A file named main.material should be in the same folder.

Press OK to import mesh only.



Even if I press OK, I don’t see any j3o file created…



This really seems simple - what are we doing wrong?

The zip is invalid, simple as that. It contains old files with name hacks and whatnot.

I did this tutorial a week ago and it worked first time so I don’t know why it wouldn’t work for some people but would for me…

Just to add - from what I remember (which could well be wrong, I’ve done a lot of other stuff since then) the tutorial read the data from the .zip file directly, no need to extract it. I just put town.zip in the root of the jmetests folder and everything worked.

Thanks - what seems weird is that accessing the zip directly, as in the first step of the exercise and mentioned by zarch, works. I guess reading assets from the zip is more tolerant somehow.