Improve the GIProbe and BakedLightmap class documentation
This adds information about performance and procedural generation.
(cherry picked from commit 194d45f11d
)
This commit is contained in:
parent
fd8ae8ce39
commit
fc749f7f8b
2 changed files with 6 additions and 2 deletions
|
@ -5,6 +5,7 @@
|
|||
</brief_description>
|
||||
<description>
|
||||
Baked lightmaps are an alternative workflow for adding indirect (or baked) lighting to a scene. Unlike the [GIProbe] approach, baked lightmaps work fine on low-end PCs and mobile devices as they consume almost no resources in run-time.
|
||||
[b]Procedural generation:[/b] Lightmap baking functionality is only available in the editor. This means [BakedLightmap] is not suited to procedurally generated or user-built levels. For procedurally generated or user-built levels, use [GIProbe] instead.
|
||||
[b]Note:[/b] Due to how lightmaps work, most properties only have a visible effect once lightmaps are baked again.
|
||||
</description>
|
||||
<tutorials>
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
<description>
|
||||
[GIProbe]s are used to provide high-quality real-time indirect light to scenes. They precompute the effect of objects that emit light and the effect of static geometry to simulate the behavior of complex light in real-time. [GIProbe]s need to be baked before using, however, once baked, dynamic objects will receive light from them. Further, lights can be fully dynamic or baked.
|
||||
Having [GIProbe]s in a scene can be expensive, the quality of the probe can be turned down in exchange for better performance in the [ProjectSettings] using [member ProjectSettings.rendering/quality/voxel_cone_tracing/high_quality].
|
||||
[b]Note:[/b] Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh.
|
||||
[b]Procedural generation:[/b] [GIProbe] can be baked in an exported project, which makes it suitable for procedurally generated or user-built levels as long as all the geometry is generated in advance.
|
||||
[b]Performance:[/b] [GIProbe] is relatively demanding on the GPU and is not suited to low-end hardware such as integrated graphics (consider [BakedLightmap] instead). To provide a fallback for low-end hardware, consider adding an option to disable [GIProbe] in your project's options menus. A [GIProbe] node can be disabled by hiding it.
|
||||
[b]Note:[/b] Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh. To further prevent light leaks, you can also strategically place temporary [MeshInstance] nodes with [member GeometryInstance.use_in_baked_light] enabled. These temporary nodes can then be hidden after baking the [GIProbe] node.
|
||||
[b]Note:[/b] Due to a renderer limitation, emissive [ShaderMaterial]s cannot emit light when used in a [GIProbe]. Only emissive [SpatialMaterial]s can emit light in a [GIProbe].
|
||||
</description>
|
||||
<tutorials>
|
||||
|
@ -20,6 +22,7 @@
|
|||
<argument index="1" name="create_visual_debug" type="bool" default="false" />
|
||||
<description>
|
||||
Bakes the effect from all [GeometryInstance]s marked with [member GeometryInstance.use_in_baked_light] and [Light]s marked with either [constant Light.BAKE_INDIRECT] or [constant Light.BAKE_ALL]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [GIProbe]'s data and debug any issues that may be occurring.
|
||||
[b]Note:[/b] [method bake] works from the editor and in exported projects. This makes it suitable for procedurally generated or user-built levels. Baking a [GIProbe] generally takes from 5 to 20 seconds in most scenes. Reducing [member subdiv] can speed up baking.
|
||||
</description>
|
||||
</method>
|
||||
<method name="debug_bake">
|
||||
|
@ -73,7 +76,7 @@
|
|||
Use 256 subdivisions.
|
||||
</constant>
|
||||
<constant name="SUBDIV_512" value="3" enum="Subdiv">
|
||||
Use 512 subdivisions. This is the highest quality setting, but the slowest. On lower-end hardware this could cause the GPU to stall.
|
||||
Use 512 subdivisions. This is the highest quality setting, but the slowest. On lower-end hardware, this could cause the GPU to stall.
|
||||
</constant>
|
||||
<constant name="SUBDIV_MAX" value="4" enum="Subdiv">
|
||||
Represents the size of the [enum Subdiv] enum.
|
||||
|
|
Loading…
Reference in a new issue