Skip to content

Commit aa9e21f

Browse files
committed
Merge pull request #109164 from Calinou/doc-gridmap-bake
Improve documentation related to GridMap mesh/lightmap baking
2 parents 22a5467 + a3179a0 commit aa9e21f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

modules/gridmap/doc_classes/GridMap.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
<method name="get_bake_meshes">
3939
<return type="Array" />
4040
<description>
41-
Returns an array of [ArrayMesh]es and [Transform3D] references of all bake meshes that exist within the current GridMap.
41+
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].
42+
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.
4243
</description>
4344
</method>
4445
<method name="get_basis_with_orthogonal_index" qualifiers="const">
@@ -86,7 +87,7 @@
8687
<method name="get_meshes" qualifiers="const">
8788
<return type="Array" />
8889
<description>
89-
Returns an array of [Transform3D] and [Mesh] references corresponding to the non-empty cells in the grid. The transforms are specified in local space.
90+
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.
9091
</description>
9192
</method>
9293
<method name="get_navigation_map" qualifiers="const">
@@ -128,7 +129,8 @@
128129
<param index="0" name="gen_lightmap_uv" type="bool" default="false" />
129130
<param index="1" name="lightmap_uv_texel_size" type="float" default="0.1" />
130131
<description>
131-
Bakes lightmap data for all meshes in the assigned [MeshLibrary].
132+
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.
133+
[b]Note:[/b] Calling this method will not actually bake lightmaps, as lightmap baking is performed using the [LightmapGI] node.
132134
</description>
133135
</method>
134136
<method name="map_to_local" qualifiers="const">

0 commit comments

Comments
 (0)