I’m having an issue loading any .scene files exported from blender.
Every time I go to load the scene into jme3, It throws a NullPointerException.
It is becoming infuriating.
Here is the basic code:
[java]
public void simpleInitApp() {
Spatial sp = assetManager.loadModel(“scenes/box.scene”);
DirectionalLight sun = new DirectionalLight();
sun.setDirection( new Vector3f( -1f, -0.7f, -0.0f ) );
rootNode.addLight(sun);
}
[/java]
All of the files are there, so it’s not NOT finding the file.
Any help would be greatly appreciated.
Code Revision
[java]
public void simpleInitApp() {
Spatial sp = assetManager.loadModel(“scenes/box.scene”);
DirectionalLight sun = new DirectionalLight();
sun.setDirection( new Vector3f( -1f, -0.7f, -0.0f ) );
rootNode.addLight(sun);
rootNode.attachChild(sp);
}
[/java]
As stated in the manual, scene and mesh.xml files are excluded in the release game, convert it to j3o before.
Thanks, norman.
I was making the mistake of simply exporting a textured sphere by itself as a (.scene) without exporting any materials or .xml meshes to go with it. Dumb mistake, but thank you for your help.