Inherits: VisualInstance < Spatial < Node < Object
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.
Note: This node has many known bugs and will be rewritten for Godot 4.0. See GitHub issue #30929.
float | bake_cell_size | 0.25 |
float | bake_default_texels_per_unit | 20.0 |
float | bake_energy | 1.0 |
Vector3 | bake_extents | Vector3( 10, 10, 10 ) |
bool | bake_hdr | false |
BakeMode | bake_mode | 0 |
float | bake_propagation | 1.0 |
BakeQuality | bake_quality | 1 |
float | capture_cell_size | 0.5 |
String | image_path | "." |
BakedLightmapData | light_data |
BakeError | bake ( Node from_node=null, bool create_visual_debug=false ) |
void | debug_bake ( ) |
enum BakeQuality:
enum BakeMode:
enum BakeError:
Default | 0.25 |
Setter | set_bake_cell_size(value) |
Getter | get_bake_cell_size() |
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.
Default | 20.0 |
Setter | set_bake_default_texels_per_unit(value) |
Getter | get_bake_default_texels_per_unit() |
If a 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.
Default | 1.0 |
Setter | set_energy(value) |
Getter | get_energy() |
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.
Default | Vector3( 10, 10, 10 ) |
Setter | set_extents(value) |
Getter | get_extents() |
The size of the affected area.
Default | false |
Setter | set_hdr(value) |
Getter | is_hdr() |
If true
, the lightmap can capture light values greater than 1.0
. Turning this off will result in a smaller file size.
Default | 0 |
Setter | set_bake_mode(value) |
Getter | get_bake_mode() |
Lightmapping mode. See BakeMode.
Default | 1.0 |
Setter | set_propagation(value) |
Getter | get_propagation() |
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.
Default | 1 |
Setter | set_bake_quality(value) |
Getter | get_bake_quality() |
Three quality modes are available. Higher quality requires more rendering time. See BakeQuality.
Default | 0.5 |
Setter | set_capture_cell_size(value) |
Getter | get_capture_cell_size() |
Grid size used for real-time capture information on dynamic objects. Cannot be larger than bake_cell_size.
Default | "." |
Setter | set_image_path(value) |
Getter | get_image_path() |
The location where lightmaps will be saved.
Setter | set_light_data(value) |
Getter | get_light_data() |
The calculated light data.
Bakes the lightmaps within the currently edited scene. Returns a BakeError to signify if the bake was successful, or if unsuccessful, how the bake failed.
Executes a dry run bake of lightmaps within the currently edited scene.
© 2014–2020 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
https://docs.godotengine.org/en/3.2/classes/class_bakedlightmap.html