You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project
Godot 4.0 has a GPU lightmapper which is fast and can bake high-quality lightmaps, but it has two limitations:
On GPUs that have little video memory, the GPU lightmapper can be unstable on large, complex scenes.
On systems that have a CPU that is much faster compared to the GPU, a CPU lightmapper will typically be faster and more stable.
When using the OpenGL renderer, lightmaps cannot be baked as the GPU lightmapper requires Vulkan support by design. It's not possible to make the GPU lightmapper run on OpenGL due to the complexity required.
Lightmaps baked with a GPU lightmapper can still be displayed with an OpenGL renderer, but from an editor perspective, this would require switching to Vulkan and restarting the editor every time you wish to bake lightmaps.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Port the CPU lightmapper from Godot 3.x to Godot 4.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
There are a few challenges to porting the CPU lightmapper:
Dynamic object capture needs to be rewritten to use a format compatible with the GPU lightmapper. The octree approach used in 3.x wasn't very efficient anyway (on top of requiring very large files to be saved on disk).
The CPU lightmapper currently doesn't support directional lightmapping1 (which allows for more accurate lighting). For feature parity with the GPU lightmapper, this would need to be implemented. However, given the low-end focus of the OpenGL renderer (where the CPU lightmapper will be the most popular), it may not make sense to support this in the CPU lightmapper.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No, as a lightmapper can't be implemented in a few lines of script.
Is there a reason why this should be core and not an add-on in the asset library?
Lightmappers need to be implemented in core to be fast.
Footnotes
Directional lightmapping has no relation to DirectionalLight nodes. ↩
The text was updated successfully, but these errors were encountered:
Lightmap baking is supported when using Compatibility since 4.3, as long as your GPU supports at least one RenderingDevice-based API (Vulkan, Direct3D 12, or in 4.4, Metal): godotengine/godot#87386
Therefore, there's no longer much use to having a (much slower) CPU lightmapper. The remaining issues in the GPU lightmapper (such as crashes when running out of VRAM) can be resolved without implementing a CPU lightmapper.
Related to #3920.
Describe the project you are working on
The Godot editor 🙂
Describe the problem or limitation you are having in your project
Godot 4.0 has a GPU lightmapper which is fast and can bake high-quality lightmaps, but it has two limitations:
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Port the CPU lightmapper from Godot 3.x to Godot 4.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
There are a few challenges to porting the CPU lightmapper:
If this enhancement will not be used often, can it be worked around with a few lines of script?
No, as a lightmapper can't be implemented in a few lines of script.
Is there a reason why this should be core and not an add-on in the asset library?
Lightmappers need to be implemented in core to be fast.
Footnotes
Directional lightmapping has no relation to DirectionalLight nodes. ↩
The text was updated successfully, but these errors were encountered: