BakedLightmap

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.

@GodotBaseClass
struct BakedLightmap {}

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Enums

BakeError
enum BakeError
BakeQuality
enum BakeQuality
Constants
enum Constants
EnvironmentMode
enum EnvironmentMode

Functions

bake
BakedLightmap.BakeError bake(Node from_node, String data_save_path)

Bakes the lightmap, scanning from the given from_node root and saves the resulting BakedLightmapData in data_save_path. If no save path is provided it will try to match the path from the current lightData.

getBakeQuality
BakedLightmap.BakeQuality getBakeQuality()
getBias
double getBias()
getBounces
long getBounces()
getCaptureCellSize
double getCaptureCellSize()
getCaptureEnabled
bool getCaptureEnabled()
getCapturePropagation
double getCapturePropagation()
getCaptureQuality
BakedLightmap.BakeQuality getCaptureQuality()
getDefaultTexelsPerUnit
double getDefaultTexelsPerUnit()
getEnvironmentCustomColor
Color getEnvironmentCustomColor()
getEnvironmentCustomEnergy
double getEnvironmentCustomEnergy()
getEnvironmentCustomSky
Ref!Sky getEnvironmentCustomSky()
getEnvironmentCustomSkyRotationDegrees
Vector3 getEnvironmentCustomSkyRotationDegrees()
getEnvironmentMinLight
Color getEnvironmentMinLight()
getEnvironmentMode
BakedLightmap.EnvironmentMode getEnvironmentMode()
getExtents
Vector3 getExtents()
getImagePath
String getImagePath()
getLightData
Ref!BakedLightmapData getLightData()
getMaxAtlasSize
long getMaxAtlasSize()
isGenerateAtlasEnabled
bool isGenerateAtlasEnabled()
isUsingColor
bool isUsingColor()
isUsingDenoiser
bool isUsingDenoiser()
isUsingHdr
bool isUsingHdr()
opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(BakedLightmap other)
opEquals
bool opEquals(typeof(null) n)
setBakeQuality
void setBakeQuality(long quality)
setBias
void setBias(double bias)
setBounces
void setBounces(long bounces)
setCaptureCellSize
void setCaptureCellSize(double capture_cell_size)
setCaptureEnabled
void setCaptureEnabled(bool enabled)
setCapturePropagation
void setCapturePropagation(double propagation)
setCaptureQuality
void setCaptureQuality(long capture_quality)
setDefaultTexelsPerUnit
void setDefaultTexelsPerUnit(double texels)
setEnvironmentCustomColor
void setEnvironmentCustomColor(Color color)
setEnvironmentCustomEnergy
void setEnvironmentCustomEnergy(double energy)
setEnvironmentCustomSky
void setEnvironmentCustomSky(Sky sky)
setEnvironmentCustomSkyRotationDegrees
void setEnvironmentCustomSkyRotationDegrees(Vector3 rotation)
setEnvironmentMinLight
void setEnvironmentMinLight(Color min_light)
setEnvironmentMode
void setEnvironmentMode(long mode)
setExtents
void setExtents(Vector3 extents)
setGenerateAtlas
void setGenerateAtlas(bool enabled)
setImagePath
void setImagePath(String image_path)
setLightData
void setLightData(BakedLightmapData data)
setMaxAtlasSize
void setMaxAtlasSize(long max_atlas_size)
setUseColor
void setUseColor(bool use_denoiser)
setUseDenoiser
void setUseDenoiser(bool use_denoiser)
setUseHdr
void setUseHdr(bool use_denoiser)
toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

atlasGenerate
bool atlasGenerate [@property getter]
bool atlasGenerate [@property setter]

When enabled, the lightmapper will merge the textures for all meshes into a single large layered texture. Not supported in GLES2.

atlasMaxSize
long atlasMaxSize [@property getter]
long atlasMaxSize [@property setter]

Maximum size of each lightmap layer, only used when atlasGenerate is enabled.

bias
double bias [@property getter]
double bias [@property setter]

Raycasting bias used during baking to avoid floating point precission issues.

bounces
long bounces [@property getter]
long bounces [@property setter]

Number of light bounces that are taken into account during baking.

captureCellSize
double captureCellSize [@property getter]
double captureCellSize [@property setter]

Grid size used for real-time capture information on dynamic objects.

captureEnabled
bool captureEnabled [@property getter]
bool captureEnabled [@property setter]

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.

capturePropagation
double capturePropagation [@property getter]
double capturePropagation [@property setter]

Bias value to reduce the amount of light proagation in the captured octree.

captureQuality
BakedLightmap.BakeQuality captureQuality [@property getter]
long captureQuality [@property setter]

Bake quality of the capture data.

defaultTexelsPerUnit
double defaultTexelsPerUnit [@property getter]
double defaultTexelsPerUnit [@property setter]

If a baked mesh doesn't have a UV2 size hint, this value will be used to roughly compute a suitable lightmap size.

environmentCustomColor
Color environmentCustomColor [@property getter]
Color environmentCustomColor [@property setter]

The environment color when environmentMode is set to constant ENVIRONMENT_MODE_CUSTOM_COLOR.

environmentCustomEnergy
double environmentCustomEnergy [@property getter]
double environmentCustomEnergy [@property setter]

The energy scaling factor when when environmentMode is set to constant ENVIRONMENT_MODE_CUSTOM_COLOR or constant ENVIRONMENT_MODE_CUSTOM_SKY.

environmentCustomSky
Sky environmentCustomSky [@property getter]
Sky environmentCustomSky [@property setter]

The Sky resource to use when environmentMode is set o constant ENVIRONMENT_MODE_CUSTOM_SKY.

environmentCustomSkyRotationDegrees
Vector3 environmentCustomSkyRotationDegrees [@property getter]
Vector3 environmentCustomSkyRotationDegrees [@property setter]

The rotation of the baked custom sky.

environmentMinLight
Color environmentMinLight [@property getter]
Color environmentMinLight [@property setter]

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.

environmentMode
BakedLightmap.EnvironmentMode environmentMode [@property getter]
long environmentMode [@property setter]

Decides which environment to use during baking.

extents
Vector3 extents [@property getter]
Vector3 extents [@property setter]

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.

imagePath
String imagePath [@property getter]
String imagePath [@property setter]

Deprecated, in previous versions it determined the location where lightmaps were be saved.

lightData
BakedLightmapData lightData [@property getter]
BakedLightmapData lightData [@property setter]

The calculated light data.

quality
BakedLightmap.BakeQuality quality [@property getter]
long quality [@property setter]

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.

useColor
bool useColor [@property getter]
bool useColor [@property setter]

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.

useDenoiser
bool useDenoiser [@property getter]
bool useDenoiser [@property setter]

When enabled, a lightmap denoiser will be used to reduce the noise inherent to Monte Carlo based global illumination.

useHdr
bool useHdr [@property getter]
bool useHdr [@property setter]

If true, stores the lightmap textures in a high dynamic range format (EXR). If false, stores the lightmap texture in a low dynamic range PNG image. This can be set to false to reduce disk usage, but light values over 1.0 will be clamped and you may see banding caused by the reduced precision. Note: Setting useHdr to true will decrease lightmap banding even when using the GLES2 backend or if ProjectSettings.rendering/quality/depth/hdr is false.

Static functions

_new
BakedLightmap _new()

Construct a new instance of BakedLightmap. Note: use memnew!BakedLightmap instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta