-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vulkan: Crash in scene with 128 OmniLights and 128 SpotLights rendered at the same time (or Decals/ReflectionProbes) #56657
Comments
For me maximal allowed value is 102, later it crashes with this backtrace
|
There is also crash when I instanced 444 Omnilight, so this is not only problem when using both types of Light together |
I noticed that decreasing Max Clustered Elements in the Project Settings will cause this crash to happen with fewer lights. Disabling Depth Prepass > Enable in the Project Settings doesn't affect the number of lights at which the crash starts to occur too. |
Reflection Probes decrease the number of lights till crash quite a bit.. |
This is because they're clustered elements (like Decals). I mentioned that in OP already 🙂 |
No, I mean Reflection probes act as a sort of multiplier for the Clustered elements they're rendering it seems. |
This is likely because the reflection probes render the lights and decals, while other lights and decals won't render each other. |
I am having a very similar issue with my project. I instanced a lot of lights at runtime according to GTA 3's item placement file and it crashes. Instancing non-lighting nodes instead fixes the crashes so I think it might be the same issue? |
This is indeed the same issue. Can you check if enabling Distance Fade on the lights (and ensuring the fade distance is low enough for some lights to be culled) fixes the crash? |
Yup. Someone suggested that I disable out-of-range lights so I used distance fading(again, data from placement files) and it worked. |
Yep, still there in Beta 10. Distance fading helps |
Is it normal that I'm getting an errorless crash, and there isn't even anything logged using a developer build? It crashes randomly after spawning a lot of decals. |
For me, my game crashes when I instantiate exactly 207 decals on a single model. |
Yes, as Godot currently doesn't have a GUI crash handler (until #61906 is merged).
This checks out with this quote from OP:
(103 + 103 resulting in 206 clustered items) |
Godot version
4.0.dev (b6b81e8)
System information
Fedora 34, GeForce GTX 1080 (NVIDIA 495.46)
Issue description
The engine crashes when opening a scene with 128 OmniLights and 128 SpotLights rendered at the same time. If only the 128 OmniLights or 128 SpotLights (not both) are instanced, there is no crash.
The highest amount of combined lights I can render successfully is 103 OmniLights + 103 SpotLights. Past that, I always get a crash when the project starts.
This can also be reproduced with Decals and ReflectionProbes, both of which are clustered elements.
Decreasing Max Clustered Elements in the Project Settings to 128 or below does not prevent the crash from occurring.
Backtrace:
103 OmniLights + 103 SpotLights success:
Steps to reproduce
@tool
script, instance 128 OmniLight3D and 128 SpotLight3D on the PlaneMesh at any position (as long as the touch the PlaneMesh somehow).Minimal reproduction project
test_clustering_crash.zip
The text was updated successfully, but these errors were encountered: