Merge pull request #11189 from Calinou/using-gridmaps-baking-lightmaps

Add a section on baking lightmaps in Using GridMaps
This commit is contained in:
Matthew
2025-08-08 12:34:39 -04:00
committed by GitHub

View File

@@ -89,6 +89,21 @@ additional nodes can be added as source geometry just for baking the navmesh.
The baked cell size of the NavigationMesh must match the NavigationServer map cell
size to properly merge the navigation meshes of different grid cells.
Lightmaps
---------
It is possible to bake lightmaps onto a GridMap. Lightmap UV2 data will be reused
from meshes if already present. If UV2 data is not present, then it will be
automatically generated on bake with a lightmap texel size of 0.1 units.
To generate UV2 data with a different lightmap texel size, you can set the
global illumination mode in the Import dock to **Static Lightmaps**
and specify the texel size there. This option must be changed *before* the scene
is converted to a MeshLibrary, as changing it later on will not affect
the existing MeshLibrary data.
Aside from this peculiarity, the lightmap baking process is the same as for any other 3D scene.
See :ref:`doc_using_lightmap_gi` for more information about lightmap baking.
MeshLibrary format
------------------
@@ -120,7 +135,7 @@ as a resource.
.. image:: img/gridmap_export.webp
You can find an already exported MeshLibrary in the project named "MeshLibrary.tres".
You can find an already exported MeshLibrary in the project named ``MeshLibrary.tres``.
Using GridMap
-------------