Prerendered indirect light map for a scene.
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.
$DOCS_URL/tutorials/3d/baked_lightmaps.html
Bakes the lightmap, scanning from the given [code]from_node[/code] root and saves the resulting [BakedLightmapData] in [code]data_save_path[/code]. If no root node is provided, parent of this node will be used as root instead. If no save path is provided it will try to match the path from the current [member light_data].
- When enabled, the lightmapper will merge the textures for all meshes into a single large layered texture. Not supported in GLES2.
- Maximum size of each lightmap layer, only used when [member atlas_generate] is enabled.
- Raycasting bias used during baking to avoid floating point precision issues.
- The energy multiplier for each bounce. Higher values will make indirect lighting brighter. A value of [code]1.0[/code] represents physically accurate behavior, but higher values can be used to make indirect lighting propagate more visibly when using a low number of bounces. This can be used to speed up bake times by lowering the number of [member bounces] then increasing [member bounce_indirect_energy]. Unlike [member BakedLightmapData.energy], this property does not affect direct lighting emitted by light nodes, emissive materials and the environment. [b]Note:[/b] [member bounce_indirect_energy] only has an effect if [member bounces] is set to a value greater than or equal to [code]1[/code].
- Number of light bounces that are taken into account during baking. See also [member bounce_indirect_energy].
- Grid size used for real-time capture information on dynamic objects.
- When enabled, an octree containing the scene's lighting information will be computed. This octree will then be used to light dynamic objects in the scene.
- Bias value to reduce the amount of light propagation in the captured octree.
- Bake quality of the capture data.
- If a baked mesh doesn't have a UV2 size hint, this value will be used to roughly compute a suitable lightmap size.
- The environment color when [member environment_mode] is set to [constant ENVIRONMENT_MODE_CUSTOM_COLOR].
- The energy scaling factor when when [member environment_mode] is set to [constant ENVIRONMENT_MODE_CUSTOM_COLOR] or [constant ENVIRONMENT_MODE_CUSTOM_SKY].
- The [Sky] resource to use when [member environment_mode] is set o [constant ENVIRONMENT_MODE_CUSTOM_SKY].
- The rotation of the baked custom sky.
- Minimum ambient light for all the lightmap texels. This doesn't take into account any occlusion from the scene's geometry, it simply ensures a minimum amount of light on all the lightmap texels. Can be used for artistic control on shadow color.
- Decides which environment to use during baking.
- Size of the baked lightmap. Only meshes inside this region will be included in the baked lightmap, also used as the bounds of the captured region for dynamic lighting.
- Deprecated, in previous versions it determined the location where lightmaps were be saved.
- The calculated light data.
- Determines the amount of samples per texel used in indirect light baking. The amount of samples for each quality level can be configured in the project settings.
- Store full color values in the lightmap textures. When disabled, lightmap textures will store a single brightness channel. Can be disabled to reduce disk usage if the scene contains only white lights or you don't mind losing color information in indirect lighting.
- When enabled, a lightmap denoiser will be used to reduce the noise inherent to Monte Carlo based global illumination.
- If [code]true[/code], stores the lightmap textures in a high dynamic range format (EXR). If [code]false[/code], stores the lightmap texture in a low dynamic range PNG image. This can be set to [code]false[/code] to reduce disk usage, but light values over 1.0 will be clamped and you may see banding caused by the reduced precision. [b]Note:[/b] Setting [member use_hdr] to [code]true[/code] will decrease lightmap banding even when using the GLES2 backend or if [member ProjectSettings.rendering/quality/depth/hdr] is [code]false[/code].
The lowest bake quality mode. Fastest to calculate.
The default bake quality mode.
A higher bake quality mode. Takes longer to calculate.
The highest bake quality mode. Takes the longest to calculate.
Baking was successful.
Returns if no viable save path is found. This can happen where an [member image_path] is not specified or when the save location is invalid.
Currently unused.
Returns when the baker cannot save per-mesh textures to file.
The size of the generated lightmaps is too large.
Some mesh contains UV2 values outside the [code][0,1][/code] range.
Returns if user cancels baking.
Returns if lightmapper can't be created. Unless you are using a custom lightmapper, please report this as bug.
There is no root node to start baking from. Either provide [code]from_node[/code] argument or attach this node to a parent that should be used as root.
No environment is used during baking.
The baked environment is automatically picked from the current scene.
A custom sky is used as environment during baking.
A custom solid color is used as environment during baking.