Problem loading obj file

Hello i try to load an obj file.

it should look like this

but it looks like that.

This is my code :

Spatial model=assetManager.loadModel(“Models/dummy/head.obj”);

Material mat_default = new Material(

assetManager, “Common/MatDefs/Misc/ShowNormals.j3md”);



What can i do?

Thanks in advance.

Why does everybody use the ShowNormals.j3md with obj models, is this in some wiki doc or what? Afaik obj models only work properly with models made of triangles, make sure thats the case (I think you can also “triangulize” the model with some setting in the obj exporter in blender).

The material is applied in TestObjLoading, people copying the code from that test will not see obj models loaded correctly then.

The OBJ loader only supports triangles and quads, if you have polygons they wont be imported so the models will not look correct