LightmapGIData
Contains baked lightmap and dynamic object probe data for LightmapGI.
Contains baked lightmap and dynamic object probe data for LightmapGI.
LightmapGIData contains baked lightmap and dynamic object probe data for LightmapGI. It is replaced every time lightmaps are baked in LightmapGI.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
LightmapGIDataConstructor
public LightmapGIData();Properties8
LightTextureProperty · Deprecated
public TextureLayered LightTexture { get; set; }The lightmap atlas texture generated by the lightmapper.
LightTexturesProperty
public Reckfell.Collections.Array LightTextures { get; set; }LightmapTexturesProperty
public Reckfell.Collections.Array<TextureLayered> LightmapTextures { get; set; }The lightmap atlas textures generated by the lightmapper.
ProbeDataProperty
public Reckfell.Collections.Dictionary ProbeData { get; set; }ShadowmaskTexturesProperty
public Reckfell.Collections.Array<TextureLayered> ShadowmaskTextures { get; set; }The shadowmask atlas textures generated by the lightmapper.
UserDataProperty
public Reckfell.Collections.Array UserData { get; set; }UsesSphericalHarmonicsProperty
public bool UsesSphericalHarmonics { get; set; }_UsesPackedDirectionalProperty
public bool _UsesPackedDirectional { get; set; }Methods12
AddUservoid
public void AddUser(EntityPath path, Rect2 uVScale, int sliceIndex, int subInstance);Adds an object that is considered baked within this LightmapGIData.
| Name | Type | Default |
|---|---|---|
path | EntityPath | — |
uVScale | Rect2 | — |
sliceIndex | int | — |
subInstance | int | — |
ClearUsersvoid
public void ClearUsers();Clear all objects that are considered baked within this LightmapGIData.
GetLightTextureTextureLayered
public TextureLayered GetLightTexture();TextureLayeredGetLightmapTexturesReckfell.Collections.Array<TextureLayered>
public Reckfell.Collections.Array<TextureLayered> GetLightmapTextures();Reckfell.Collections.Array<TextureLayered>GetShadowmaskTexturesReckfell.Collections.Array<TextureLayered>
public Reckfell.Collections.Array<TextureLayered> GetShadowmaskTextures();Reckfell.Collections.Array<TextureLayered>GetUserCountint
public int GetUserCount();Returns the number of objects that are considered baked within this LightmapGIData.
intGetUserPathEntityPath
public EntityPath GetUserPath(int userIdx);Returns the EntityPath of the baked object at index user_idx.
| Name | Type | Default |
|---|---|---|
userIdx | int | — |
EntityPathIsUsingSphericalHarmonicsbool
public bool IsUsingSphericalHarmonics();If true, lightmaps were baked with directional information. See also LightmapGI.Directional.
boolSetLightTexturevoid
public void SetLightTexture(TextureLayered lightTexture);| Name | Type | Default |
|---|---|---|
lightTexture | TextureLayered | — |
SetLightmapTexturesvoid
public void SetLightmapTextures(Reckfell.Collections.Array<TextureLayered> lightTextures);| Name | Type | Default |
|---|---|---|
lightTextures | Reckfell.Collections.Array<TextureLayered> | — |
SetShadowmaskTexturesvoid
public void SetShadowmaskTextures(Reckfell.Collections.Array<TextureLayered> shadowmaskTextures);| Name | Type | Default |
|---|---|---|
shadowmaskTextures | Reckfell.Collections.Array<TextureLayered> | — |
SetUsesSphericalHarmonicsvoid
public void SetUsesSphericalHarmonics(bool usesSphericalHarmonics);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.
| Name | Type | Default |
|---|---|---|
usesSphericalHarmonics | bool | — |
LightmapGIData.ShadowmaskMode
| Value | Description |
|---|---|
None = 0 | Shadowmasking is disabled. No shadowmask texture will be created when baking lightmaps. Existing shadowmask textures will be removed during baking. |
Overlay = 2 | Shadowmasking is enabled. Directional shadows will be rendered with real-time shadows overlaid on top of the shadowmask texture. This mode makes for smoother shadow transitions when the camera moves fast, at the cost of a potential smearing effect for directional shadows that are up close (due to the real-time shadow being mixed with a low-resolution shadowmask). Objects that only have shadows baked in the shadowmask (and no real-time shadows) will keep their shadows up close. |
Replace = 1 | Shadowmasking is enabled. Directional shadows that are outside the |