godotengine / godot

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

Vulkan: GridMap is not included in SDFGI baking #40617

Closed Syntaxxor closed 1 year ago

Syntaxxor commented 4 years ago

Godot version:

4.0, master branch, Commit Hash: 0cd98ec7e13038d09a77cf821e930be79026f943

OS/device including version:

Windows 10 v. 2004, RTX 2060, NVidia GeForce Game-Ready Driver v. 451.67, Vulkan backend.

Issue description: My Grid Map is not being shown in SDFGI, despite being set to be used for baked lighting. Mesh Instances are able to use SDFGI with the same settings, but if it's in a Grid Map, SDFGI doesn't work at all. The expected behavior would be the Grid Map producing the same sort of lighting as the Mesh Instances. image

Steps to reproduce: Create a Grid Map and place objects with it, and then enable SDFGI. If you construct the same thing with Mesh Instances, you will notice that they affect the lighting, but the Grid map doesn't.

Minimal reproduction project:

GridMapSDFGI.zip

Zylann commented 4 years ago

Does this mean all non-node-based mesh instances aren't included as well? (when using VisualServer only, that is) Or is it only a configuration issue?

Syntaxxor commented 4 years ago

Does this mean all non-node-based mesh instances aren't included as well? (when using VisualServer only, that is) Or is it only a configuration issue?

@Zylann, I lack the knowledge of the Godot rendering pipeline to properly answer that question. However, I can confirm that SDFGI Baking does include MultiMeshInstance nodes and CSG nodes with or without a combiner.

etodd commented 1 year ago

This seems to be working for me. The lighting doesn't always update right away, but in general it works.

Calinou commented 1 year ago

I can confirm SDFGI works with GridMap cells on 4.0.stable. The glowing cubes are GridMap cells, they both receive and contribute to GI:

image

Testing project: GridMapSDFGI2.zip