reckfellENGINE

LightmapGIData

Contains baked lightmap and dynamic object probe data for LightmapGI.

On this page
class LightmapGIDataReckfellSharpInherits Resource

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
# LightmapGIData
C#
public LightmapGIData();

Properties8

LightTextureProperty · Deprecated
# LightTexture
C#
public TextureLayered LightTexture { get; set; }

The lightmap atlas texture generated by the lightmapper.

LightTexturesProperty
# LightTextures
C#
public Reckfell.Collections.Array LightTextures { get; set; }
LightmapTexturesProperty
# LightmapTextures
C#
public Reckfell.Collections.Array<TextureLayered> LightmapTextures { get; set; }

The lightmap atlas textures generated by the lightmapper.

ProbeDataProperty
# ProbeData
C#
public Reckfell.Collections.Dictionary ProbeData { get; set; }
ShadowmaskTexturesProperty
# ShadowmaskTextures
C#
public Reckfell.Collections.Array<TextureLayered> ShadowmaskTextures { get; set; }

The shadowmask atlas textures generated by the lightmapper.

UserDataProperty
# UserData
C#
public Reckfell.Collections.Array UserData { get; set; }
UsesSphericalHarmonicsProperty
# UsesSphericalHarmonics
C#
public bool UsesSphericalHarmonics { get; set; }
_UsesPackedDirectionalProperty
# _UsesPackedDirectional
C#
public bool _UsesPackedDirectional { get; set; }

Methods12

AddUservoid
# AddUser
C#
public void AddUser(EntityPath path, Rect2 uVScale, int sliceIndex, int subInstance);

Adds an object that is considered baked within this LightmapGIData.

Parameters
NameTypeDefault
pathEntityPath—
uVScaleRect2—
sliceIndexint—
subInstanceint—
ClearUsersvoid
# ClearUsers
C#
public void ClearUsers();

Clear all objects that are considered baked within this LightmapGIData.

GetLightTextureTextureLayered
# GetLightTexture
C#
public TextureLayered GetLightTexture();
Returns TextureLayered
GetLightmapTexturesReckfell.Collections.Array<TextureLayered>
# GetLightmapTextures
C#
public Reckfell.Collections.Array<TextureLayered> GetLightmapTextures();
Returns Reckfell.Collections.Array<TextureLayered>
GetShadowmaskTexturesReckfell.Collections.Array<TextureLayered>
# GetShadowmaskTextures
C#
public Reckfell.Collections.Array<TextureLayered> GetShadowmaskTextures();
Returns Reckfell.Collections.Array<TextureLayered>
GetUserCountint
# GetUserCount
C#
public int GetUserCount();

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

Returns int
GetUserPathEntityPath
# GetUserPath
C#
public EntityPath GetUserPath(int userIdx);

Returns the EntityPath of the baked object at index user_idx.

Parameters
NameTypeDefault
userIdxint—
Returns EntityPath
IsUsingSphericalHarmonicsbool
# IsUsingSphericalHarmonics
C#
public bool IsUsingSphericalHarmonics();

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

Returns bool
SetLightTexturevoid
# SetLightTexture
C#
public void SetLightTexture(TextureLayered lightTexture);
Parameters
NameTypeDefault
lightTextureTextureLayered—
SetLightmapTexturesvoid
# SetLightmapTextures
C#
public void SetLightmapTextures(Reckfell.Collections.Array<TextureLayered> lightTextures);
Parameters
NameTypeDefault
lightTexturesReckfell.Collections.Array<TextureLayered>—
SetShadowmaskTexturesvoid
# SetShadowmaskTextures
C#
public void SetShadowmaskTextures(Reckfell.Collections.Array<TextureLayered> shadowmaskTextures);
Parameters
NameTypeDefault
shadowmaskTexturesReckfell.Collections.Array<TextureLayered>—
SetUsesSphericalHarmonicsvoid
# SetUsesSphericalHarmonics
C#
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.

Parameters
NameTypeDefault
usesSphericalHarmonicsbool—

LightmapGIData.ShadowmaskMode

ValueDescription
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 DirectionalLight3D.DirectionalShadowMaxDistance will be rendered using the shadowmask texture. Shadows that are inside the range will be rendered using real-time shadows exclusively. This mode allows for more precise real-time shadows up close, without the potential "smearing" effect that can occur when using lightmaps with a high texel size. The downside is that when the camera moves fast, the transition between the real-time light and shadowmask can be obvious. Also, objects that only have shadows baked in the shadowmask (and no real-time shadows) won't display any shadows up close.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.