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: MeshInstance3D nodes with Dynamic Bake mode are very expensive in VoxelGI, regardless of quality settings #55359

Open
Tracked by #55328
Calinou opened this issue Nov 26, 2021 · 1 comment · May be fixed by #55419

Comments

@Calinou
Copy link
Member

Calinou commented Nov 26, 2021

Godot version

4.0.dev (5efe80f)

System information

Fedora 34, GeForce GTX 1080 (NVIDIA 470.74)

Issue description

Even when using primitive BoxMeshes and very simple world geometry, VoxelGI updating takes a lot of time. It typically doubles the frametime required to render a scene, making it difficult to sustain a 60 FPS target on anything but the highest-end GPUs. Dynamic VoxelGI becomes relatively affordable at low VoxelGI quality + half-resolution GI, but this causes overall GI quality to take a noticeable hit.

I remember dynamic VoxelGI being less expensive a while ago (late 2019-early 2020), so a regression may have occurred. If this turns out not to be a regression, we should figure out a way to reduce the cost to make the feature more usable in real world scenarios (such as by revoxelizing less often at the cost of quality).

See the FPS counters in the top-left corner of each screenshot:

VoxelGI high quality

Dynamic and static Dynamic only Static only No static or dynamic
2021-11-26_17 04 11 2021-11-26_17 04 29 2021-11-26_17 04 18 2021-11-26_17 04 33

VoxelGI low quality

Dynamic and static Dynamic only Static only No static or dynamic
2021-11-26_17 05 18 2021-11-26_17 05 31 2021-11-26_17 05 27 2021-11-26_17 05 37

VoxelGI low quality + half-resolution GI

Dynamic and static Dynamic only Static only No static or dynamic
2021-11-26_17 06 03 2021-11-26_17 06 14 2021-11-26_17 06 10 2021-11-26_17 06 21

Steps to reproduce

  • Add a VoxelGI node.
  • Add a MeshInstance3D with bake mode set to Baked. Assign an emissive material to it.
  • Add second MeshInstance3D with bake mode set to Dynamic. Assign an emissive material to it.
  • Bake the VoxelGI node.
  • Notice how performance plummets whenever the dynamic MeshInstance is visible, even when it doesn't move.

Minimal reproduction project

test_voxelgi_performance.zip
Press D to toggle dynamic mesh visibility.
Press S to toggle static mesh visibility.

@Calinou Calinou added this to the 4.0 milestone Nov 26, 2021
@clayjohn clayjohn modified the milestones: 4.0, 4.x Feb 22, 2023
@Calinou
Copy link
Member Author

Calinou commented Aug 7, 2023

Still reproducible as of 4.2.dev 16a9356 on Linux, even on a much faster GPU: #80356 (comment)

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.

2 participants