From a3179a0b3c7d7e2f1427e4d735a146c2ac242718 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Thu, 31 Jul 2025 16:30:32 +0200 Subject: [PATCH] Improve documentation related to GridMap mesh/lightmap baking --- modules/gridmap/doc_classes/GridMap.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/gridmap/doc_classes/GridMap.xml b/modules/gridmap/doc_classes/GridMap.xml index cf13068efa..56e9900ad6 100644 --- a/modules/gridmap/doc_classes/GridMap.xml +++ b/modules/gridmap/doc_classes/GridMap.xml @@ -38,7 +38,8 @@ - Returns an array of [ArrayMesh]es and [Transform3D] references of all bake meshes that exist within the current GridMap. + Returns an array of [ArrayMesh]es and [Transform3D] references of all bake meshes that exist within the current GridMap. Even indices contain [ArrayMesh]es, while odd indices contain [Transform3D]s that are always equal to [constant Transform3D.IDENTITY]. + This method relies on the output of [method make_baked_meshes], which will be called with [code]gen_lightmap_uv[/code] set to [code]true[/code] and [code]lightmap_uv_texel_size[/code] set to [code]0.1[/code] if it hasn't been called yet. @@ -86,7 +87,7 @@ - Returns an array of [Transform3D] and [Mesh] references corresponding to the non-empty cells in the grid. The transforms are specified in local space. + Returns an array of [Transform3D] and [Mesh] references corresponding to the non-empty cells in the grid. The transforms are specified in local space. Even indices contain [Transform3D]s, while odd indices contain [Mesh]es related to the [Transform3D] in the index preceding it. @@ -128,7 +129,8 @@ - Bakes lightmap data for all meshes in the assigned [MeshLibrary]. + Generates a baked mesh that represents all meshes in the assigned [MeshLibrary] for use with [LightmapGI]. If [param gen_lightmap_uv] is [code]true[/code], UV2 data will be generated for each mesh currently used in the [GridMap]. Otherwise, only meshes that already have UV2 data present will be able to use baked lightmaps. When generating UV2, [param lightmap_uv_texel_size] controls the texel density for lightmaps, with lower values resulting in more detailed lightmaps. [param lightmap_uv_texel_size] is ignored if [param gen_lightmap_uv] is [code]false[/code]. See also [method get_bake_meshes], which relies on the output of this method. + [b]Note:[/b] Calling this method will not actually bake lightmaps, as lightmap baking is performed using the [LightmapGI] node.