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

SDFGI doesn't update Mesh instances correctly in the editor #75334

Open
albinaask opened this issue Mar 25, 2023 · 4 comments
Open

SDFGI doesn't update Mesh instances correctly in the editor #75334

albinaask opened this issue Mar 25, 2023 · 4 comments

Comments

@albinaask
Copy link
Contributor

Godot version

4.0.1

System information

Windows 11, Vulkan, whatever graphics is included in intel i5-8265U

Issue description

The SDFGI cascades aren't updating correctly when properties of Mesh instances are updated, i.e visibility, position etc. See video:

vid.mp4

The user is looking into a mirror material at other objects

Steps to reproduce

  1. Open godot 4.0
  2. Move temp.tres from scene.zip to project folder
  3. Open scene in editor
  4. Position camera looking into the reflective node with the other nodes behind the camera.
  5. View bug as in video.
  6. Cry.
  7. Fix bug.
  8. Live a long and prosperous life.

Minimal reproduction project

scene.zip

@Calinou
Copy link
Member

Calinou commented Mar 26, 2023

SDFGI doesn't support dynamic objects yet. This would need to be added, and you'd have to make objects dynamic for it to work on those objects.

For static objects in the editor, the SDFGI data could be invalidated when a change is made in the editor after a certain amount of time with no changes has passed (debouncing). This would require godotengine/godot-proposals#7741 to be implemented first.

Full invalidation could also be performed automatically after a long operation in the editor, such as a 3D scene being reimported, VoxelGI bake or LightmapGI bake. #86267 makes computing cascades much faster, so it should be more affordable to do so in the future.

@albinaask
Copy link
Contributor Author

An alternative is to just have a button to update the data or do an update on scene save.

@HydrogenC
Copy link

SDFGI doesn't support dynamic objects yet. This would need to be added, and you'd have to make objects dynamic for it to work on those objects.

Thanks for your explaining. Is there currently a plan on this, for example, planned for 4.x?

@Calinou
Copy link
Member

Calinou commented Nov 27, 2023

Thanks for your explaining. Is there currently a plan on this, for example, planned for 4.x?

A SDFGI rework is planned in the long term. That said, this can already be fixed by invalidating SDFGI data after a certain amount of time has passed as I mentioned.

Also, marking objects as dynamic just to fix this issue would be a bad way to resolve the issue on a performance standpoint (dynamic GI is much more expensive than static GI).

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

3 participants