2017-12-16 19:34:16 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2020-01-26 15:01:49 +00:00
<class name= "BakedLightmap" inherits= "VisualInstance" version= "3.2" >
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.
2020-05-23 14:04:45 +00:00
[b]Note:[/b] This node has many known bugs and will be [url=https://godotengine.org/article/godot-40-will-get-new-modernized-lightmapper]rewritten for Godot 4.0[/url]. See [url=https://github.com/godotengine/godot/issues/30929]GitHub issue #30929[/url].
2017-12-16 19:34:16 +00:00
</description>
<tutorials >
2018-11-05 07:46:27 +00:00
<link > https://docs.godotengine.org/en/latest/tutorials/3d/baked_lightmaps.html</link>
2017-12-16 19:34:16 +00:00
</tutorials>
<methods >
<method name= "bake" >
<return type= "int" enum= "BakedLightmap.BakeError" >
</return>
<argument index= "0" name= "from_node" type= "Node" default= "null" >
</argument>
<argument index= "1" name= "create_visual_debug" type= "bool" default= "false" >
</argument>
<description >
2020-02-04 20:25:02 +00:00
Bakes the lightmaps within the currently edited scene. Returns a [enum BakeError] to signify if the bake was successful, or if unsuccessful, how the bake failed.
2017-12-16 19:34:16 +00:00
</description>
</method>
<method name= "debug_bake" >
<return type= "void" >
</return>
<description >
2019-07-13 16:13:52 +00:00
Executes a dry run bake of lightmaps within the currently edited scene.
2017-12-16 19:34:16 +00:00
</description>
</method>
</methods>
<members >
2019-06-29 10:38:01 +00:00
<member name= "bake_cell_size" type= "float" setter= "set_bake_cell_size" getter= "get_bake_cell_size" default= "0.25" >
2019-06-29 13:24:23 +00:00
Grid subdivision size for lightmapper calculation. The default value will work for most cases. Increase for better lighting on small details or if your scene is very large.
2017-12-16 19:34:16 +00:00
</member>
2019-07-04 10:15:49 +00:00
<member name= "bake_default_texels_per_unit" type= "float" setter= "set_bake_default_texels_per_unit" getter= "get_bake_default_texels_per_unit" default= "20.0" >
2019-07-13 16:13:52 +00:00
If a [member Mesh.lightmap_size_hint] isn't specified, the lightmap baker will dynamically set the lightmap size using this value. This value is measured in texels per world unit. The maximum lightmap texture size is 4096x4096.
2019-07-04 10:15:49 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "bake_energy" type= "float" setter= "set_energy" getter= "get_energy" default= "1.0" >
2019-07-13 16:13:52 +00:00
Multiplies the light sources' intensity by this value. For instance, if the value is set to 2, lights will be twice as bright. If the value is set to 0.5, lights will be half as bright.
2018-01-03 12:45:03 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "bake_extents" type= "Vector3" setter= "set_extents" getter= "get_extents" default= "Vector3( 10, 10, 10 )" >
2019-06-21 23:04:47 +00:00
The size of the affected area.
2017-12-16 19:34:16 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "bake_hdr" type= "bool" setter= "set_hdr" getter= "is_hdr" default= "false" >
2019-06-29 13:24:23 +00:00
If [code]true[/code], the lightmap can capture light values greater than [code]1.0[/code]. Turning this off will result in a smaller file size.
2017-12-16 19:34:16 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "bake_mode" type= "int" setter= "set_bake_mode" getter= "get_bake_mode" enum= "BakedLightmap.BakeMode" default= "0" >
2018-08-19 04:29:12 +00:00
Lightmapping mode. See [enum BakeMode].
2017-12-16 19:34:16 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "bake_propagation" type= "float" setter= "set_propagation" getter= "get_propagation" default= "1.0" >
2019-07-13 16:13:52 +00:00
Defines how far the light will travel before it is no longer effective. The higher the number, the farther the light will travel. For instance, if the value is set to 2, the light will go twice as far. If the value is set to 0.5, the light will only go half as far.
2017-12-16 19:34:16 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "bake_quality" type= "int" setter= "set_bake_quality" getter= "get_bake_quality" enum= "BakedLightmap.BakeQuality" default= "1" >
2018-08-19 04:29:12 +00:00
Three quality modes are available. Higher quality requires more rendering time. See [enum BakeQuality].
2017-12-16 19:34:16 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "capture_cell_size" type= "float" setter= "set_capture_cell_size" getter= "get_capture_cell_size" default= "0.5" >
2018-08-19 04:29:12 +00:00
Grid size used for real-time capture information on dynamic objects. Cannot be larger than [member bake_cell_size].
2017-12-16 19:34:16 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "image_path" type= "String" setter= "set_image_path" getter= "get_image_path" default= ""."" >
2019-06-21 23:04:47 +00:00
The location where lightmaps will 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>
</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" >
2019-06-21 23:04:47 +00:00
The highest bake quality mode. Takes longer to calculate.
2017-12-16 19:34:16 +00:00
</constant>
<constant name= "BAKE_MODE_CONE_TRACE" value= "0" enum= "BakeMode" >
2018-08-19 04:29:12 +00:00
Less precise but faster bake mode.
2017-12-16 19:34:16 +00:00
</constant>
<constant name= "BAKE_MODE_RAY_TRACE" value= "1" enum= "BakeMode" >
2018-08-19 04:29:12 +00:00
More precise bake mode but can take considerably longer to bake.
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>
<constant name= "BAKE_ERROR_USER_ABORTED" value= "4" enum= "BakeError" >
2020-02-04 20:25:02 +00:00
Returns if user cancels baking.
2017-12-18 07:13:58 +00:00
</constant>
2017-12-16 19:34:16 +00:00
</constants>
</class>