Hi All,
I noticed that when trying to load some .obj models, an IndexOutOfBoundsException gets thrown and the model fails to load.
Could it be related to a model’s polygon count? i.e. That JME only supports models below a certain poly threshold?
java.lang.IndexOutOfBoundsException: Index: 2899, Size: 2899
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at com.jme3.scene.plugins.OBJLoader.readFace(OBJLoader.java:230)
at com.jme3.scene.plugins.OBJLoader.readLine(OBJLoader.java:331)
at com.jme3.scene.plugins.OBJLoader.load(OBJLoader.java:516)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:224)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:346)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:356)
at ui.jmonkey.spatials.Vessel.constructHull(Vessel.java:182)
at ui.jmonkey.spatials.Vessel.access$000(Vessel.java:49)
at ui.jmonkey.spatials.Vessel$1.call(Vessel.java:131)
at com.jme3.app.AppTask.invoke(AppTask.java:141)
at com.jme3.app.Application.update(Application.java:439)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:194)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:144)
at com.jme3.system.lwjgl.LwjglCanvas.runLoop(LwjglCanvas.java:226)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:198)
at java.lang.Thread.run(Thread.java:680)
More like non-triangle faces, strange materials and the likes in the model causing this.
OK, thanks. Is there any export mode in Blender that you would recommend?
ogre xml?
I mean why are you using obj are there any good reasons, because if not I would say ogrexml is far supirior in any way
If you can, please post the OBJ file that causes the exception.
@Empire Phoenix: Yup, OgreXML always works indeed. I was just wondering why some .obj files didn’t work