Some objects turn black as soon as I run the game

Godot Version 4.3

Question

Hello,

I’ve exported a 3d model of a room from Blender and imported it into Godot (as .glb). I’ve placed three omni lights in the room and the room is now looks properly lit, except for two objects. Those two objects are almost completely black.

The objects look good in Blender. But strangely they also look good in the Godot editor. Once I run the game however, the objects turn black. And I cannot find anything unusual in the material settings.

Does anyone has any idea what might cause this? It must be some kind of material setting I assume, but what? And what is the difference between the Godot editor and running a scene that can cause such a thing?

When you exported from Blender, did you check the normal facing directions were correct?

If a surface is facing the wrong way, you can get artifacts like this in game engines. (The Shader doesn’t bounce light correctly, black)

The normals are facing the correct direction, I’ve checked that.

Also, backface culling is enabled for both objects. So I would see it inmediately if the normals were facing the wrong direction.

BTW In Blender → Viewport Overlays, check Face Orientation and anything that is not blue needs the normal to be flipped.

Well, that is an odd one then, sometimes I have had issues in Blender where it looked right but the normal was messed up.

I’ve done that. Everything from within the room looks blue in Blender when I do that.

The only other thing is like if something wasn’t planar but in Godot things are triangulated, so that is more a Blender problem than game engine. Don’t know, must be something in Godot then.

I’ve discovered something. I had not yet added a WorldEnvironment node to the scene. Now I added one and I disabled the ambient lighting. Now most of the room is dark and I had to enlarge the range of the omni lights so that the entire room is lit. Now all objects in the room are lighted similarly, including the two objects that first appeared way too dark.

So the problem is that the two objects are not affected by the world’s ambient lighting, while the rest of the room is. This is ok for this room because it is an underground room with no windows, but I need the ambient lighting for outdoor scenes so I still have to figure out how to fix this.

Does anyone have any idea why some objects are not affected by the world’s ambient lighting?