diff --git a/engine/src/core-plugins/com/jme3/scene/plugins/OBJLoader.java b/engine/src/core-plugins/com/jme3/scene/plugins/OBJLoader.java index f5a17cf61..998e28c86 100644 --- a/engine/src/core-plugins/com/jme3/scene/plugins/OBJLoader.java +++ b/engine/src/core-plugins/com/jme3/scene/plugins/OBJLoader.java @@ -45,6 +45,7 @@ import com.jme3.scene.Mesh.Mode; import com.jme3.scene.Node; import com.jme3.scene.Spatial; import com.jme3.scene.VertexBuffer; +import com.jme3.scene.VertexBuffer.Type; import com.jme3.scene.mesh.IndexBuffer; import com.jme3.scene.mesh.IndexIntBuffer; import com.jme3.scene.mesh.IndexShortBuffer; @@ -409,6 +410,12 @@ public final class OBJLoader implements AssetLoader { else geom.setQueueBucket(Bucket.Opaque); + if (material.getMaterialDef().getName().contains("Lighting") + || mesh.getFloatBuffer(Type.Normal) == null){ + logger.log(Level.WARNING, "OBJ mesh {0} doesn't contain normals! " + + "It might not display correctly", geom.getName()); + } + return geom; }