Hello, i am experiencing some difficulties loading my obj files, exported from blender 2.59 in jmp alpha 4. when i use this code:
Spatial tree = assetManager.loadModel(“Models/objs/Tree.obj”);
Material mat = new Material(assetManager, “Materials/Tree.mtl”);
tree.setMaterial(mat);
rootNode.attachChild(tree);
The game closes upon startup, however when i take out the material:
Spatial tree = assetManager.loadModel(“Models/objs/Tree.obj”);
rootNode.attachChild(tree);
It runs… Thanks guys
The material file will be automatically loaded, you don’t have to load it separately. The last code you posted will load the model properly.
And put the mtl file in the same folder as the obj
ok thanks