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: VoxelGI Indirect Lighting from Static Omni Light is broken until manually re-setting gi data in Rendering Server #78373

Closed
Tracked by #55328
Cammymoop opened this issue Jun 17, 2023 · 3 comments · Fixed by #81124

Comments

@Cammymoop
Copy link
Contributor

Cammymoop commented Jun 17, 2023

Godot version

4.0.3 stable, 4.1 beta 2

System information

Windows 10 Vulkan forward+ Radeon RX 6700xt

Issue description

VoxelGI doesn't seem to show any bounce light from a static baked omni light on loading a scene. This happens both in the editor and when running the game.

Immediately after baking the voxelGI data the bounce light is visible and working properly, but it breaks as soon as you reload the scene, switch to another scene tab in the editor, and is also broken in the game window when run.

Once the baked data exists and is saved to a resource file, the lighting can be fixed by simply using the "load" option on the VoxelGIData and selecting the file it's already assigned to.

Calling DisplayServer.instance_set_base() or just using the set_base() method of the voxelGI node to re-set the GI data works to fix the issue in a running game (after a short period of starting the game)

This does not happen with bounce lighting from directional lights. EDIT SpotLight3D also seems to be unaffected by this issue.
il_scrnshots

Steps to reproduce

Create new forward+ project

  • In a 3d scene disable the preview sun and add 2 cube meshes positioned close enough to see bounce light.
  • Add an omniLight3D set the bake mode to static and set the light energy high so that bounce light is easily visible, position it so that it doesn't directly illuminate the gap between the meshes.
  • Add a VoxelGI node, create the voxelGIData resource and bake the GI
  • bounce lighting is visible
  • click Scene -> new scene, then click the tab to go back to the 3d scene with the GI
  • bounce lighting is now gone
  • bounce lighting is also not present when you run the scene

Minimal reproduction project

BrokenIL_MRP.zip

The VoxelGI node in this scene has an exported checkbox that if selected does the fix of re-setting the gi data in the display server when the scene is run for comparison

@Cammymoop
Copy link
Contributor Author

I came across #74134 which seemed similar but this seems to be specifically bounce light from static omni lights only

@Calinou Calinou changed the title VoxelGI Indirect Lighting from Static Omni Light is broken until manually re-setting gi data in Rendering Server Vulkan: VoxelGI Indirect Lighting from Static Omni Light is broken until manually re-setting gi data in Rendering Server Jun 17, 2023
@Calinou
Copy link
Member

Calinou commented Aug 28, 2023

I can confirm this on 4.2.dev 6758a7f (Linux, GeForce RTX 4090 with NVIDIA 535.98). #81067 doesn't fix this issue.

@bitsawer
Copy link
Member

I'm actually currently working on a fix to this, I'll see if I can make a PR soon. I ran into this bug too.

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

Successfully merging a pull request may close this issue.

4 participants