• Godot Help
  • Models / surfaces randomly stop rendering if too many lights are present

As this might be Linux / amdgpu module related, the question is likely best answered by other Linux / AMD users. The projects in cause aren't truly ready to share yet but hopefully a reproducible test case can be found as this seems to be happening everywhere for me.

When too many meshes or faces are being rendered, Godot will sometimes stop drawing them for no explanation. This appears to happen more frequently the more lights you have in the scene: Toggling some lights will make the issue occur and surfaces to disappear the moment a light turns on. Is anyone else experiencing something similar and is the problem known?

Here are some screenshots from the new tileset generator I'm currently playing with. You should not be seeing any gaps, yet parts of the wall randomly disappear as you walk around. Once more the issue increases in frequency if I add more lights or increase the radius of existing ones.



In Godot 3.x the max lights per object used to be 8, but was changed to 32.

In Godot 4.0 it is defaulted to 8 per mesh, but you can configure it in the advanced project settings.

That said, if the full level is one mesh, you might have optimization issues, as objects cannot be culled, and also calculating a large amount of lights can be heavy versus if the level was broken into smaller sections.

cybereality Yes: I already set that limit to 64 and restarted, no improvement however. And it's not (just) lights that are disappearing, it's entire models going invisible... they are influenced by the number / radius of lights however so it may be related to that in some form.

Another serious issue I keep experiencing is Godot crashing the GPU and the entire system with it. Some shaders used to trigger it but now that seems to be fixed, instead I get it when I use too many VoxelGI proves which blocks my machine with corrupted squares on the screen till I forcefully reset / power off. Should I report that as well or is this known with Linux / amdgpu?

    Very strange: I tried setting up a simpler test case except with even more meshes / surfaces and lights, yet that does NOT reproduce my issue. Sharing it here just in case.

    Could it be that this is only triggered when a lot of large scenes using array meshes are spawned at a distance by the script? One of my previous projects no longer seems to be doing it, but yesterday I started getting it with my tileset generator... that's not public just yet as it needs to get more stable and finished first.

    I wonder if there's a difference between using meshinstance and csgmesh. I use the former, might try the later and see what that changes.

    MirceaKitsune I get it when I use too many VoxelGI proves which blocks my machine with corrupted squares on the screen till I forcefully reset / power off. Should I report that as well or is this known with Linux / amdgpu?

    You should certainly search the tracker, if no other issue already open for it then yes.

    cybereality As in the GPU crash? When those are triggered (rarely thank goodness) what happens is everything freezes for a few seconds, the screen goes black and the monitor even enters / exits power saving a few times, then if I wait long enough I see weird repetitive color pattern stuck on the screen forever. The session is unsalvageable when this happens, not even toggling the NumLock / CapsLock keys works any more: You need the reset button on the computer case to force a reboot.

    I believe a few months ago enabling a setting for fog did it. That's since been solved, and instead VoxelGI proves are triggering it for me now. I might make a test case and report it, though that's risky since I don't want to risk corrupting my drive or even damaging hardware this way, will think about and how I could go about that.

    No, I get a different issue. The left and right sides 200 pixels of the Godot screen become like a rainbow of pixels flickering. But I can fix it by restarting the editor.

    You can restart the graphics driver in code on Linux. I forget the command, but you need to it working well enough to get into a terminal window.

    https://github.com/godotengine/godot/issues/70406

    I reported the issue here with a simple test case attached. Just load up the project and press F5 to run it... if you spawn outside you may need to repeatedly press space to jump in mid-air and go up, the ceiling has no collisions for testing purposes so you can keep jumping until you land inside a corridor.

    6 days later

    More things I noticed with another project, similar dungeon generator but you have a flashlight you can toggle:

    It appears that whenever a light turns on, random meshes within radius of that light will disappear. They remain disappeared forever even if you turn the light back off if they were initially touched by it. Turning the light off and back on repeatedly causes more objects to disappear each time.

    What's notable is it never seems to be independent faces of a mesh derendering but the entire object: Everything that goes missing is one mesh instance. Seemingly with all materials at the same time, as can be seen in the screenshots from my test where each square goes missing regardless the color of different components.