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: LightmapGI's bake() function is not exposed to scripting (unlike BakedLightmap in 3.x) #59217

Open
Tracked by #56033
Calinou opened this issue Mar 16, 2022 · 1 comment

Comments

@Calinou
Copy link
Member

Calinou commented Mar 16, 2022

Godot version

4.0.alpha (fb28025)

System information

Fedora 34, GeForce GTX 1080 (NVIDIA 495.46)

Issue description

LightmapGI's bake() function is not exposed to scripting (unlike BakedLightmap in 3.x).

Exposing bake() is useful for editor plugins that need to perform lightmap baking in an automatic manner, without relying on the BakedLightmap node currently being selected by the user.

Note that bake() will still not work in exported projects, as lightmapping and automatic UV unwrapping (xatlas) functionality is only available in the editor to decrease binary size. bake() will only work in projects run from the editor, as well as the editor itself.

I've tried to do this here, but I can't get environment lighting to show up when baking lightmaps by calling bake() in the editor on scene load: https://github.com/Calinou/godot/tree/lightmapgi-expose-baking
Older branch (predates multiple image atlases and many other LightmapGI changes): https://github.com/Calinou/godot/tree/lightmapgi-expose-bake-method

This may not be an issue we may be able to work around internally, but I want to know if manual baking after the scene has loaded works properly (I haven't been able to test this yet). Either way, we should document that particular quirk of the bake() method.

Steps to reproduce

  • Look at the LightmapGI class documentation.
  • Notice there is no bake() method exposed to scripting.

Minimal reproduction project

Testing project for the above linked branch: test_lightmapgi_bake_method.zip

@verypleasentusername
Copy link

verypleasentusername commented Nov 5, 2023

Also would be really handy to make SDK's like map tools and if a tutorial on how to make bake() function exposed in local repo was made.

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