3d render goes black

Godot Version

4.2.1

Question

Hi everyone! I’m currently working on my 3d game and I’m using gridmap for my 3d objects. I would like to ask why is that when in my main panel, the objects color are fine, the environment and lighting. But when running the scene, the environment is black and almost all of my objects are black?

If I’m understanding you correctly: The game looks good in the editor, but when you run it the light and environment are gone?

When you make a new 3D scene in Godot, there are these buttons at the top of the screen (when in 3D view):
image
These mean “use preview light and environment”. This light and environment is not actually present in the scene, but is being used for viewing the scene in the editor. This is useful for scenes that are meant to be part of a bigger scene, but shouldn’t have their own light and environment.

If you press the three dots, you get a menu where you can configure the preview light and environment, and/or add them to the actual scene:


As a handy shortcut, if you hold down Shift and click on either of those “add to scene” buttons, it’ll add both.

Hi! I’ve already tried that but it’s still not working. I don’t know either why the environment and the gridmap itself is black.

Could you perhaps show some screenshots of how your scene is set up? It’s difficult to help without a little more info.