2017-12-16 19:34:16 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2021-03-23 12:40:34 +00:00
<class name= "BakedLightmap" inherits= "VisualInstance" version= "3.3" >
2017-12-16 19:34:16 +00:00
<brief_description >
2018-08-19 04:29:12 +00:00
Prerendered indirect light map for a scene.
2017-12-16 19:34:16 +00:00
</brief_description>
<description >
2018-08-19 04:29:12 +00:00
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.
2017-12-16 19:34:16 +00:00
</description>
<tutorials >
2021-03-26 09:43:43 +00:00
<link > https://docs.godotengine.org/en/3.3/tutorials/3d/baked_lightmaps.html</link>
2017-12-16 19:34:16 +00:00
</tutorials>
<methods >
<method name= "bake" >
2021-07-30 13:28:05 +00:00
<return type= "int" enum= "BakedLightmap.BakeError" />
<argument index= "0" name= "from_node" type= "Node" default= "null" />
<argument index= "1" name= "data_save_path" type= "String" default= """" />
2017-12-16 19:34:16 +00:00
<description >
2020-12-30 16:12:41 +00:00
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 save path is provided it will try to match the path from the current [member light_data].
2017-12-16 19:34:16 +00:00
</description>
</method>
</methods>
<members >
2020-12-30 16:12:41 +00:00
<member name= "atlas_generate" type= "bool" setter= "set_generate_atlas" getter= "is_generate_atlas_enabled" default= "true" >
When enabled, the lightmapper will merge the textures for all meshes into a single large layered texture. Not supported in GLES2.
2017-12-16 19:34:16 +00:00
</member>
2020-12-30 16:12:41 +00:00
<member name= "atlas_max_size" type= "int" setter= "set_max_atlas_size" getter= "get_max_atlas_size" default= "4096" >
Maximum size of each lightmap layer, only used when [member atlas_generate] is enabled.
2019-07-04 10:15:49 +00:00
</member>
2020-12-30 16:12:41 +00:00
<member name= "bias" type= "float" setter= "set_bias" getter= "get_bias" default= "0.005" >
Raycasting bias used during baking to avoid floating point precission issues.
2018-01-03 12:45:03 +00:00
</member>
2020-12-30 16:12:41 +00:00
<member name= "bounces" type= "int" setter= "set_bounces" getter= "get_bounces" default= "3" >
Number of light bounces that are taken into account during baking.
2017-12-16 19:34:16 +00:00
</member>
2020-12-30 16:12:41 +00:00
<member name= "capture_cell_size" type= "float" setter= "set_capture_cell_size" getter= "get_capture_cell_size" default= "0.5" >
Grid size used for real-time capture information on dynamic objects.
2017-12-16 19:34:16 +00:00
</member>
2020-12-30 16:12:41 +00:00
<member name= "capture_enabled" type= "bool" setter= "set_capture_enabled" getter= "get_capture_enabled" default= "true" >
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.
2017-12-16 19:34:16 +00:00
</member>
2020-12-30 16:12:41 +00:00
<member name= "capture_propagation" type= "float" setter= "set_capture_propagation" getter= "get_capture_propagation" default= "1.0" >
Bias value to reduce the amount of light proagation in the captured octree.
2017-12-16 19:34:16 +00:00
</member>
2020-12-30 16:12:41 +00:00
<member name= "capture_quality" type= "int" setter= "set_capture_quality" getter= "get_capture_quality" enum= "BakedLightmap.BakeQuality" default= "1" >
Bake quality of the capture data.
2017-12-16 19:34:16 +00:00
</member>
2020-12-30 16:12:41 +00:00
<member name= "default_texels_per_unit" type= "float" setter= "set_default_texels_per_unit" getter= "get_default_texels_per_unit" default= "16.0" >
If a baked mesh doesn't have a UV2 size hint, this value will be used to roughly compute a suitable lightmap size.
</member>
<member name= "environment_custom_color" type= "Color" setter= "set_environment_custom_color" getter= "get_environment_custom_color" >
The environment color when [member environment_mode] is set to [constant ENVIRONMENT_MODE_CUSTOM_COLOR].
</member>
<member name= "environment_custom_energy" type= "float" setter= "set_environment_custom_energy" getter= "get_environment_custom_energy" >
The energy scaling factor when when [member environment_mode] is set to [constant ENVIRONMENT_MODE_CUSTOM_COLOR] or [constant ENVIRONMENT_MODE_CUSTOM_SKY].
</member>
<member name= "environment_custom_sky" type= "Sky" setter= "set_environment_custom_sky" getter= "get_environment_custom_sky" >
The [Sky] resource to use when [member environment_mode] is set o [constant ENVIRONMENT_MODE_CUSTOM_SKY].
</member>
<member name= "environment_custom_sky_rotation_degrees" type= "Vector3" setter= "set_environment_custom_sky_rotation_degrees" getter= "get_environment_custom_sky_rotation_degrees" >
The rotation of the baked custom sky.
</member>
2021-03-11 12:34:57 +00:00
<member name= "environment_min_light" type= "Color" setter= "set_environment_min_light" getter= "get_environment_min_light" default= "Color( 0, 0, 0, 1 )" >
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.
</member>
2020-12-30 16:12:41 +00:00
<member name= "environment_mode" type= "int" setter= "set_environment_mode" getter= "get_environment_mode" enum= "BakedLightmap.EnvironmentMode" default= "0" >
Decides which environment to use during baking.
2017-12-16 19:34:16 +00:00
</member>
2020-12-30 16:12:41 +00:00
<member name= "extents" type= "Vector3" setter= "set_extents" getter= "get_extents" default= "Vector3( 10, 10, 10 )" >
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.
</member>
<member name= "image_path" type= "String" setter= "set_image_path" getter= "get_image_path" >
Deprecated, in previous versions it determined the location where lightmaps were be saved.
2017-12-16 19:34:16 +00:00
</member>
2019-07-15 18:42:47 +00:00
<member name= "light_data" type= "BakedLightmapData" setter= "set_light_data" getter= "get_light_data" >
2018-08-19 04:29:12 +00:00
The calculated light data.
2017-12-16 19:34:16 +00:00
</member>
2020-12-30 16:12:41 +00:00
<member name= "quality" type= "int" setter= "set_bake_quality" getter= "get_bake_quality" enum= "BakedLightmap.BakeQuality" default= "1" >
Determines the amount of samples per texel used in indrect light baking. The amount of samples for each quality level can be configured in the project settings.
</member>
2021-02-15 11:32:31 +00:00
<member name= "use_color" type= "bool" setter= "set_use_color" getter= "is_using_color" default= "true" >
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.
</member>
2020-12-30 16:12:41 +00:00
<member name= "use_denoiser" type= "bool" setter= "set_use_denoiser" getter= "is_using_denoiser" default= "true" >
When enabled, a lightmap denoiser will be used to reduce the noise inherent to Monte Carlo based global illumination.
</member>
2021-02-15 11:32:31 +00:00
<member name= "use_hdr" type= "bool" setter= "set_use_hdr" getter= "is_using_hdr" default= "true" >
2021-03-04 16:10:29 +00:00
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].
2021-02-15 11:32:31 +00:00
</member>
2017-12-16 19:34:16 +00:00
</members>
<constants >
<constant name= "BAKE_QUALITY_LOW" value= "0" enum= "BakeQuality" >
2019-06-21 23:04:47 +00:00
The lowest bake quality mode. Fastest to calculate.
2017-12-16 19:34:16 +00:00
</constant>
<constant name= "BAKE_QUALITY_MEDIUM" value= "1" enum= "BakeQuality" >
2019-06-21 23:04:47 +00:00
The default bake quality mode.
2017-12-16 19:34:16 +00:00
</constant>
<constant name= "BAKE_QUALITY_HIGH" value= "2" enum= "BakeQuality" >
2020-12-30 16:12:41 +00:00
A higher bake quality mode. Takes longer to calculate.
2017-12-16 19:34:16 +00:00
</constant>
2020-12-30 16:12:41 +00:00
<constant name= "BAKE_QUALITY_ULTRA" value= "3" enum= "BakeQuality" >
The highest bake quality mode. Takes the longest to calculate.
2017-12-16 19:34:16 +00:00
</constant>
2017-12-18 07:13:58 +00:00
<constant name= "BAKE_ERROR_OK" value= "0" enum= "BakeError" >
2020-02-04 20:25:02 +00:00
Baking was successful.
2017-12-18 07:13:58 +00:00
</constant>
<constant name= "BAKE_ERROR_NO_SAVE_PATH" value= "1" enum= "BakeError" >
2020-02-04 20:25:02 +00:00
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.
2017-12-18 07:13:58 +00:00
</constant>
<constant name= "BAKE_ERROR_NO_MESHES" value= "2" enum= "BakeError" >
2020-02-04 20:25:02 +00:00
Currently unused.
2017-12-18 07:13:58 +00:00
</constant>
<constant name= "BAKE_ERROR_CANT_CREATE_IMAGE" value= "3" enum= "BakeError" >
2020-02-04 20:25:02 +00:00
Returns when the baker cannot save per-mesh textures to file.
2017-12-18 07:13:58 +00:00
</constant>
2020-12-30 16:12:41 +00:00
<constant name= "BAKE_ERROR_LIGHTMAP_SIZE" value= "4" enum= "BakeError" >
The size of the generated lightmaps is too large.
</constant>
<constant name= "BAKE_ERROR_INVALID_MESH" value= "5" enum= "BakeError" >
Some mesh contains UV2 values outside the [code][0,1][/code] range.
</constant>
<constant name= "BAKE_ERROR_USER_ABORTED" value= "6" enum= "BakeError" >
2020-02-04 20:25:02 +00:00
Returns if user cancels baking.
2017-12-18 07:13:58 +00:00
</constant>
2020-12-30 16:12:41 +00:00
<constant name= "BAKE_ERROR_NO_LIGHTMAPPER" value= "7" enum= "BakeError" >
</constant>
<constant name= "ENVIRONMENT_MODE_DISABLED" value= "0" enum= "EnvironmentMode" >
No environment is used during baking.
</constant>
<constant name= "ENVIRONMENT_MODE_SCENE" value= "1" enum= "EnvironmentMode" >
The baked environment is automatically picked from the current scene.
</constant>
<constant name= "ENVIRONMENT_MODE_CUSTOM_SKY" value= "2" enum= "EnvironmentMode" >
A custom sky is used as environment during baking.
</constant>
<constant name= "ENVIRONMENT_MODE_CUSTOM_COLOR" value= "3" enum= "EnvironmentMode" >
A custom solid color is used as environment during baking.
</constant>
2017-12-16 19:34:16 +00:00
</constants>
</class>