All geometries use the same material instance:
[java]blockMaterial = new Material(mainApplication.getAssetManager(), “Common/MatDefs/Light/Lighting.j3md”);
blockMaterial.setBoolean(“UseMaterialColors”, true);
blockMaterial.setColor(“Ambient”, new ColorRGBA(0.25f, 0.25f, 0.25f, 1));
blockMaterial.setColor(“Specular”, ColorRGBA.White);
blockMaterial.setColor(“Diffuse”, ColorRGBA.White);
blockMaterial.setFloat(“Shininess”, 5);[/java]
(Texture set via blockMaterial.setTexture(“DiffuseMap”, texture);)
There are no camera-specific changes like LOD. I’ll try to create a testcase, but I don’t know if I can track down the error^^
EDIT: It could be something related to the mesh. In a seperated testcase with a small blockterrain and just a DirectionalLight, some block surfaces are completely black. So maybe something related to normals? I’ll finish the testcase and post the result here.
But I’m sure, it has to do with how the mesh is created. EDIT²: Cloning the Color.White doesn’t help.
@destroflyer said:
EDIT: It could be something related to the mesh. In a seperated testcase with a small blockterrain and just a DirectionalLight, some block surfaces are completely black. So maybe something related to normals? I'll finish the testcase and post the result here.
But I'm sure, it has to do with how the mesh is created.
sounds like it yeah. According to the code your mesh has no normal buffer.
Don't look further that's your issue.