Skip to content
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: Console keeps spamming error when scene is empty while SDFGI is turned on #60533

Closed
Tracked by #55327
Hakimvira opened this issue Apr 26, 2022 · 11 comments
Closed
Tracked by #55327

Comments

@Hakimvira
Copy link

Godot version

Godot 4.0 Alpha 6

System information

Windows 11, RTX 3050, 472.12, Vulkan Clustered

Issue description

2022-04-26.20-59-34.mp4

The console keep spamming

Storage buffer supplied (binding: 1) must provide one ID (0 provided).
./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
drivers/vulkan/rendering_device_vulkan.cpp:7387 - Condition "!uniform_set" is true.

when no mesh exist in the scene. However the error disappear when a new mesh is added to the scene

Steps to reproduce

  1. Create a new empty scene
  2. Add WorldEnviroment node
  3. Enable SDFGI

Minimal reproduction project

No response

@Calinou Calinou added this to the 4.0 milestone Apr 26, 2022
@Calinou Calinou changed the title Console keep spamming error when scene is empty while SDFGI is turned on Vulkan: Console keeps spamming error when scene is empty while SDFGI is turned on Apr 26, 2022
@Calinou
Copy link
Member

Calinou commented Apr 26, 2022

I can confirm this on 4.0.alpha 5c54770 (Linux, NVIDIA 510.60.02).

@gaschneidr
Copy link

I've been having a similar issue when trying to play a basic scene with SDFGI enabled.

This is the stack trace

image

I only create a ground plane and a capsule player to try and move around with.

image

This has been happening ever since 4.0 Alpha 1 for me here. Don't know what is causing this issue since I see people being able to use SDFGI in feature showcases.

Something new that happened with Alpha 6 and now 7 is when trying to play the scene the screen is all black. Even though there is an active camera.

image

As I'm writing this comment Godot is making my computer lag like crazy!

@Calinou
Copy link
Member

Calinou commented Apr 28, 2022

I only create a ground plane and a capsule player to try and move around with.

Does the ground plane have its Global Illumination Mode property set to Static in the inspector? This is required for SDFGI to work.

@StefSSU
Copy link

StefSSU commented Apr 28, 2022

I only create a ground plane and a capsule player to try and move around with.

Does the ground plane have its Global Illumination Mode property set to Static in the inspector? This is required for SDFGI to work.

I was able to replicate the issue when both the ground plane and capsule had Global Illumination Mode disabled, setting the ground plane GI Mode to Static and restarting fixed the problem. Perhaps a clearer error message would be a good idea? Also, interestingly when I tried disabling the GI Mode and reloading the scene I did not see the errors reappear, only once I restarted the project.

Environment:
v4.0.alpha7.official [3e9ead0]
macOS 12.3.1 arm64 Apple M1

@Calinou
Copy link
Member

Calinou commented Apr 28, 2022

Perhaps a clearer error message would be a good idea?

The Vulkan errors need to be fixed first before we can consider adding a warning message that's printed only once (using WARN_PRINT_ONCE() in debug builds).

@gaschneidr
Copy link

I only create a ground plane and a capsule player to try and move around with.

Does the ground plane have its Global Illumination Mode property set to Static in the inspector? This is required for SDFGI to work.

Setting the Global Illumination Mode indeed fixed the error. Thanks!

What about the black viewport thing?

@Calinou
Copy link
Member

Calinou commented Apr 29, 2022

What about the black viewport thing?

I don't know. Can you upload a minimal reproduction project here? You can attach a ZIP file by drag-and-dropping it.

@gaschneidr
Copy link

Here it is. Thanks for the help!

I don't remember having to do anything other than putting a camera in the scene in previous versions of Godot to make the camera work. And also I was not facing this issue with Godot 4.0 alpha until version 6 I guess. Don't remember testing version 5.

Alpha 7 Test.zip

@marstaik
Copy link
Contributor

marstaik commented May 8, 2022

I ran into the exact same issues as this post, and setting the GI on the static floor did fix it. One think I didn't see mentioned is that if you animate/move the player capsule/camera the entire screen will start flickering as these resource issues in vulkan keep getting hit over and over again.

Does the ground plane have its Global Illumination Mode property set to Static in the inspector? This is required for SDFGI to work.

It's required if we want it to contribute to SDFGI, but it should still be fine for "disabled" to be a valid option and not cause this erratic behavior right?

@Calinou
Copy link
Member

Calinou commented May 8, 2022

It's required if we want it to contribute to SDFGI, but it should still be fine for "disabled" to be a valid option and not cause this erratic behavior right?

Not having any objects marked as static shouldn't cause errors or performance degradation, but it will not look correct.

To be fair, since imported 3D scenes (Collada/glTF/FBX) are already using the Static global illumination mode by default, I wonder if this should be done for all GeometryInstance3D nodes by default. This would result in more consistent behavior between primitive meshes, loaded OBJ meshes and imported 3D scenes. See also #59293 which does this in a more scoped fashion (on CSG nodes only).

Edit: Proposal opened: godotengine/godot-proposals#4515

@clayjohn
Copy link
Member

I can't reproduce on RC3. We have fixed a lot of errors like this, so I will close this as fixed. Please comment if you can reproduce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants