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
Godot v4.3.stable - Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1080 Ti (NVIDIA; 31.0.15.3742) - Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz (12 Threads)
Issue description
Meshes that have no UV2, even when the GeometryInstance3D gi_mode is set to Static, do not appear to contribute any shadows to the LightmapGI.
Unwrapping the UV2 does allow things to contribute, but to me this doesn't make any sense. They should still be capable of being rasterized by the lightmapper for direct light even if they have no UV2 to allow for writing to the lightmap, and it should be up to the gi_mode to dictate if it is contributing. I'd understand if they couldn't have bounce light when use_texture_for_bounces is true, but it should still be visible to the direct light.
Currently this makes setting up "light blockers", like gobos (although texture gobos wouldn't work anyway without #90109), or to prevent light bleeding, annoying. You have to make sure they have UV2s, and then having a hint size small to not waste space on the atlas. There doesn't seem to be a better way to do it then that
Steps to reproduce
Just bake a LightmapGI in a scene with meshes that have no UV2 alongside meshes that do.
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered:
The documentation mentions in several places that UV2 is required (and hence why primitives won't work for light baking). My understanding is that the baked light textures map to UV2, and not the mesh's original UV map, which might not be using maximum surface area.
The workflow for light blockers might be the main issue here.
The documentation mentions in several places that UV2 is required (and hence why primitives won't work for light baking). My understanding is that the baked light textures map to UV2, and not the mesh's original UV map, which might not be using maximum surface area.
I didn't misunderstand that, meshes obviously need UV2s to be baked into the lightmap texture atlas. But meshes without UV2s should still be considered in the lightmap raycasting/rasterization for other surfaces, even if they themselves have nothing to bake onto.
This was supported in Godot 3.x, but it wasn't reimplemented in Godot 4.x when the lightmapper was rewritten from scratch. The way the GPU lightmapper works may make this not technically feasible anymore as well.
I agree this would be useful for emissive surfaces that you hide after baking (or large emissive surfaces you don't want to take space in the generated lightmap textures). However, changing this behavior may change visuals in existing projects if they bake lightmaps again.
Tested versions
System information
Godot v4.3.stable - Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1080 Ti (NVIDIA; 31.0.15.3742) - Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz (12 Threads)
Issue description
Meshes that have no UV2, even when the GeometryInstance3D
gi_mode
is set to Static, do not appear to contribute any shadows to the LightmapGI.Unwrapping the UV2 does allow things to contribute, but to me this doesn't make any sense. They should still be capable of being rasterized by the lightmapper for direct light even if they have no UV2 to allow for writing to the lightmap, and it should be up to the
gi_mode
to dictate if it is contributing. I'd understand if they couldn't have bounce light whenuse_texture_for_bounces
is true, but it should still be visible to the direct light.Currently this makes setting up "light blockers", like gobos (although texture gobos wouldn't work anyway without #90109), or to prevent light bleeding, annoying. You have to make sure they have UV2s, and then having a hint size small to not waste space on the atlas. There doesn't seem to be a better way to do it then that
Steps to reproduce
Just bake a LightmapGI in a scene with meshes that have no UV2 alongside meshes that do.
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered: