Skip to content

Meshes without UV2 cannot block light / contribute to LightmapGI #96538

@sievaxx

Description

@sievaxx

Tested versions

  • Tested in Godot 4.3-stable

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.
image

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.
image

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions