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
In the Vulkan GPU lightmapper, meshes will always cast shadows even if they were configured not to. This makes it impossible to have a specific mesh that receives baked lightmaps but does not cast static shadows (when the light's bake mode is set to Static). While there is no run-time performance on baked surfaces, this causes a discrepancy between baked shadows and real-time shadows (which dynamic objects receive when moving around the scene).
From left to right:
Single-sided plane with Cast Shadows set to Off
Single-sided plane with Cast Shadows set to On
Single-sided plane with Cast Shadows set to Double-Sided
Single-sided plane with Cast Shadows set to Shadows Only
master (OmniLight3D bake mode set to Dynamic, equivalent to 3.x's Indirect)
master (OmniLight3D bake mode set to Static, equivalent to 3.x's All)
In comparison, in 3.x, meshes that have Cast Shadow set to Off will not cast any shadows:
3.x (OmniLight bake mode set to Indirect)
3.x (OmniLight bake mode set to All)
Shadows will always be double-sided in 3.x as well, but I think this is expected behavior so that non-sealed levels can be lit properly.
Steps to reproduce
Create a scene in Blender with a box and single-sided planes on top. Export as glTF.
Import the glTF scene in Godot. Set the light baking mode to Static Lightmaps in the import dock and click Reimport.
Instance the glTF scene in Godot.
Right-click the plane nodes and enable Editable Children to adjust the Cast Shadow property on each plane.
Add an OmniLight3D node and enable shadows.
Add a LightmapGI node and bake lightmaps.
Set the OmniLight3D node's global illumination mode to Static instead of the default Dynamic. Bake lightmaps again.
Notice how shadows are casted differently – some shadows that were not previously present are now displayed.
Related to #56611.
Godot version
4.0.dev (ce6de71)
System information
Fedora 34, GeForce GTX 1080 (NVIDIA 495.46)
Issue description
In the Vulkan GPU lightmapper, meshes will always cast shadows even if they were configured not to. This makes it impossible to have a specific mesh that receives baked lightmaps but does not cast static shadows (when the light's bake mode is set to Static). While there is no run-time performance on baked surfaces, this causes a discrepancy between baked shadows and real-time shadows (which dynamic objects receive when moving around the scene).
From left to right:
master
(OmniLight3D bake mode set to Dynamic, equivalent to3.x
's Indirect)master
(OmniLight3D bake mode set to Static, equivalent to3.x
's All)In comparison, in
3.x
, meshes that have Cast Shadow set to Off will not cast any shadows:3.x
(OmniLight bake mode set to Indirect)3.x
(OmniLight bake mode set to All)Shadows will always be double-sided in
3.x
as well, but I think this is expected behavior so that non-sealed levels can be lit properly.Steps to reproduce
Minimal reproduction project
master
: test_lightmap_mesh_shadow_master.zip3.x
(for comparison): test_lightmap_mesh_shadow_3.x.zipThe text was updated successfully, but these errors were encountered: