Table of Contents

Class LightmapGIData

Contains baked lightmap and dynamic object probe data for LightmapGI.

Inheritance
LightmapGIData

Remarks

LightmapGIData contains baked lightmap and dynamic object probe data for LightmapGI. It is replaced every time lightmaps are baked in LightmapGI.

Properties

light_texture

The lightmap atlas texture generated by the lightmapper.

var light_texture : TextureLayered

Property Value

TextureLayered

Remarks

lightmap_textures

The lightmap atlas textures generated by the lightmapper.

var lightmap_textures : TextureLayered[] = []

Property Value

TextureLayered[]

Remarks

shadowmask_textures

The shadowmask atlas textures generated by the lightmapper.

var shadowmask_textures : TextureLayered[] = []

Property Value

TextureLayered[]

Remarks

Methods

add_user(NodePath, Rect2, int, int)

Adds an object that is considered baked within this LightmapGIData.

void add_user(NodePath path, Rect2 uv_scale, int slice_index, int sub_instance)

Parameters

path NodePath
uv_scale Rect2
slice_index int
sub_instance int

clear_users

Clear all objects that are considered baked within this LightmapGIData.

void clear_users

get_user_count

Qualifiers: const

Returns the number of objects that are considered baked within this LightmapGIData.

int get_user_count

get_user_path(int)

Qualifiers: const

Returns the NodePath of the baked object at index user_idx.

NodePath get_user_path(int user_idx)

Parameters

user_idx int

is_using_spherical_harmonics

Qualifiers: const

If true, lightmaps were baked with directional information. See also directional.

bool is_using_spherical_harmonics

set_uses_spherical_harmonics(bool)

If uses_spherical_harmonics is true, tells the engine to treat the lightmap data as if it was baked with directional information.

Note: Changing this value on already baked lightmaps will not cause them to be baked again. This means the material appearance will look incorrect until lightmaps are baked again, in which case the value set here is discarded as the entire LightmapGIData resource is replaced by the lightmapper.

void set_uses_spherical_harmonics(bool uses_spherical_harmonics)

Parameters

uses_spherical_harmonics bool