Hello everyone ,
i saved a obj file to j3o file. like this :
protected static void saveOptimizedModel(Spatial reducedModel, String modelPath) {
BinaryExporter exporter = BinaryExporter.getInstance();
String pathWithoutExtension = modelPath.substring(0,modelPath.lastIndexOf("."));
File file = new File(pathWithoutExtension.concat("_OPTIMIZED.j3o"));
try {
exporter.save(reducedModel, file);
} catch (IOException ex) {
Logger.getLogger(LoadModelTest.class.getName()).log(Level.SEVERE,
"Error: Failed to save optimized spatial!", ex);
}
}
And when i load this new j3o file with the assetManager I get this image:
but i want this:
I think the material file from the obj file will not be saved in j3o.
I get this error:
The material parameter is not defined: null. Ignoring..
Can someone help?
thanks!