BakedLightmap

Inherits: VisualInstance < Spatial < Node < Object

Category: Core

Brief Description

Prerendered indirect light map for a scene.

Methods

BakeError bake ( Node from_node=null, bool create_visual_debug=false )
void debug_bake ( )

Enumerations

enum BakeQuality:

  • BAKE_QUALITY_LOW = 0 — Lowest bake quality mode. Fastest to calculate.
  • BAKE_QUALITY_MEDIUM = 1 — Default bake quality mode.
  • BAKE_QUALITY_HIGH = 2 — Highest bake quality mode. Takes longer to calculate.

enum BakeError:

  • BAKE_ERROR_OK = 0
  • BAKE_ERROR_NO_SAVE_PATH = 1
  • BAKE_ERROR_NO_MESHES = 2
  • BAKE_ERROR_CANT_CREATE_IMAGE = 3
  • BAKE_ERROR_USER_ABORTED = 4

enum BakeMode:

  • BAKE_MODE_CONE_TRACE = 0 — Less precise but faster bake mode.
  • BAKE_MODE_RAY_TRACE = 1 — More precise bake mode but can take considerably longer to bake.

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.

Tutorials

Property Descriptions

Setter set_bake_cell_size(value)
Getter get_bake_cell_size()

Grid subdivision size for lightmapper calculation. Default value of 0.25 will work for most cases. Increase for better lighting on small details or if your scene is very large.

Setter set_energy(value)
Getter get_energy()
Setter set_extents(value)
Getter get_extents()

Size of affected area.

Setter set_hdr(value)
Getter is_hdr()

If true lightmap can capture light values greater than 1.0. Turning this off will result in a smaller lightmap. Default value:false.

Setter set_bake_mode(value)
Getter get_bake_mode()

Lightmapping mode. See BakeMode.

Setter set_propagation(value)
Getter get_propagation()
Setter set_bake_quality(value)
Getter get_bake_quality()

Three quality modes are available. Higher quality requires more rendering time. See BakeQuality.

  • float capture_cell_size
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.

Setter set_image_path(value)
Getter get_image_path()

Location where lightmaps will be saved.

Setter set_light_data(value)
Getter get_light_data()

The calculated light data.

Method Descriptions

  • void debug_bake ( )