Unable to load model properly any of .obj, .mash.xml or .blend

I am new to JME3 and learning it. I’hv downloaded free model “http://nextwavemultimedia.com/html/uploads/chevrolet_camaro.zip” from internet and tried loading .blend file. it gives NullPointerException. than I exported it to ogre from blender 2.7. it created ‘Mesh.001.mesh.xml’ to ‘Mesh.029.mesh.xml’ files and ‘Material.001.material’ to ‘Material.006.material’ files and some other /material, .jpg and .png files. When I loaded xxx.mesh.xml. it was loading model but in inverted form and no material loaded. than I exported it to .obj format. this time model and mtl file loded successfully but some of parts of model was missing.

I tried to troubleshoot didn’t found anything helpful. As a new member I am not able to attach screenshot.

See code I used for.
.blend

assetManager.registerLoader(BlenderModelLoader.class, “blend”);
mymodel = assetManager.loadModel(
“Textures/MyModel/chevrolet_camaro/car_yellow.blend”);

.mesh.xml

rootNode.attachChild(assetManager.loadModel(“Textures/MyModel/chevrolet_camaro/Mesh.00.mesh.xml”));
rootNode.attachChild(assetManager.loadModel(“Textures/MyModel/chevrolet_camaro/Mesh.001.mesh.xml”));

.obj

mymodel = assetManager.loadModel(
“Textures/MyModel/chevrolet_camaro/car_yellow.obj”);

Please advice me.

Please post the full exepection + maybee the console log of the application

SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.NullPointerException
at com.jme3.scene.plugins.blender.constraints.SimulationNode.(SimulationNode.java:105)
at com.jme3.scene.plugins.blender.constraints.SimulationNode.(SimulationNode.java:78)
at com.jme3.scene.plugins.blender.constraints.ConstraintHelper.bakeConstraints(ConstraintHelper.java:199)
at com.jme3.scene.plugins.blender.BlenderModelLoader.load(BlenderModelLoader.java:82)
at com.jme3.scene.plugins.blender.BlenderModelLoader.load(BlenderModelLoader.java:52)
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.LoadModel3.initBox(LoadModel3.java:97)
at mygame.LoadModel3.simpleInitApp(LoadModel3.java:47)
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)

You should unify all blender’s mesh and export in ogre.
Also check this page: http://wiki.jmonkeyengine.org/doku.php/jme3:external:blender and try to create a model from scratch.I don’t think you can pretend to create a game with just free models from internet so you’ll have to learn modelling soon :smile:

You are using the SDK yes?
Cause it looks like that were already some changes in the current git version.

Anyway from the stacktrace it looks like that model has some constraints the loader in that version cannot process sucesfully.

i just tested it against the git version of the blender loader, and in fact it does load sucessfully there.
(So you can just use a placeholder or so till 3.1 is released in a few month)
However it is also inverted as you described, so i guess the blend file itself has some problems.

the exported model in ogre format and .obj was inverted. I verified the file in blender 2.7, one texture reused or linked to multiple mesh, I think it supposed to be problem. While loading ogre model in JME, it constantly logging that material file is missing. I think the issue is with ogre-JME is blender exports single material shared between multiple mesh, while JMD ogre loader expecting separate material file for each mesh.xml.

Thanks for advice. I am software engineer by profession and currently I am learning game development as hobby. I am getting very limited time to invest in hobby. I’ll love to be graphics artist but it’ll take time. :smile:

Thanks I am able to load and run my vehicle model. There was issue with blender project.

1 Like