-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Cache lightprobe generation in ligthtmap baking #82915
base: master
Are you sure you want to change the base?
Conversation
8d24b01
to
22a6dcc
Compare
22a6dcc
to
c170c02
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, it works as expected.
Testing project: test_lightmap_preview_bake_4.x.zip
Time for a lightmap bake with Probe Subdiv set to 16 (i9-13900K + RTX 4090):
- Cold cache: 7 seconds
- Warm cache: 4 seconds
Some notes:
- Creating a LightmapProbe invalidates cache (as expected).
- Creating or removing a static object with UV2 doesn't invalidate cache (as expected, but I initially thought this wasn't feasible).
- Moving a dynamic object then baking doesn't invalidate cache (as expected).
What I find unexpected is that when you restart the editor, the cache is lost (even if you save the scene after baking). This means you only get the warm cache benefit for subsequent bakes within a given editor session. I'd expect it to be able to persist the cache across restarts.
I expect to persist as well after the editor is restarted as well |
@Calinou I fixed a bug, the cache should persist. Feel free to give it another try. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probe generation caching now works across editor restarts.
However, it only seems to work if you've baked the same scene at least twice before exiting the editor. If you only bake it once, caching will not be effective when you reopen the editor and bake again without changing anything.
Implements half of godotengine/godot-proposals#7900