godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.47k stars 21.26k forks source link

Normal maps are not sampled when using lightmap (even if the light still on) #82124

Open jcostello opened 1 year ago

jcostello commented 1 year ago

Godot version

4.1

System information

Ubuntu with Nvidia 2060

Issue description

When Lightmap is baked backed, material normals are not sampled even if the light still on. Note that when using dynamic light, only the part hit directly with the light is sampled

Static image

Dynamic image

Off image

Steps to reproduce

Bake lights in MRP

Minimal reproduction project

Lightmap.zip

patwork commented 1 year ago

In v4.2.beta.custom_build [bdd9034ad]

Lights bake mode: DYNAMIC, LIghtmapGI HIDDEN lights-dynamic-gi-off

Lights bake mode: DYNAMIC, LIghtmapGI VISIBLE lights-dynamic-gi-on

Lights bake mode: STATIC, LIghtmapGI HIDDEN lights-static-gi-off

Lights bake mode: STATIC, LIghtmapGI VISIBLE lights-static-gi-on

jcostello commented 1 year ago

@patwork sorry I dont get your example. The problem is directional vs non-directional bake. The example is not a good case because albedo texture could have fake bumps in it. The problem is that, when baking directional, the normal information of the texture is not baked into the light map. You only see the normals where direct light hits