reckfellENGINE

VoxelGI

Indirect-light volume using prepared VoxelGIData.

On this page
class VoxelGIReckfellSharpInherits VisualInstance3D

VoxelGI uses prepared static geometry for indirect lighting during rendering. Configure Size and Subdiv, prepare meshes with Static GIMode and bake Data. Size specifies full box dimensions; save external binary data as .rbin.

See VoxelGI for workflow and light-leak diagnosis. An actual GPU probe confirmed static emission and data persistence, not arbitrary dynamic-mesh quality or scene performance.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

VoxelGIConstructor
# VoxelGI
C#
public VoxelGI();

Creates a VoxelGI without Data, with Size = (20, 20, 20) and Subdiv128. Add it to the level tree, prepare geometry and bake or assign existing data. A supported Forward+ renderer is needed for visual output.

Properties4

CameraAttributesProperty
# CameraAttributes
C#
public CameraAttributes CameraAttributes { get; set; }

Attributes used for bake exposure normalization, not the active camera or its Environment. Physical lighting uses CameraAttributes normalization; assignment also updates normalization for existing Data. Keep bake settings consistent with the exposure in use.

DataProperty
# Data
C#
public VoxelGIData Data { get; set; }

Prepared volume data. Without Data the VoxelGI supplies no indirect light. Assignment neither bakes nor copies the resource; null clears the assigned data. Account for resource sharing between independent volumes.

SizeProperty
# Size
C#
public Vector3 Size { get; set; }

Full box size on each axis, not half-extents. Local bounds run from −Size/2 to +Size/2. Setting clamps each component to at least 1. Rebake Data after changing it; old data is not automatically rebuilt.

SubdivProperty
# Subdiv
C#
public VoxelGI.SubdivEnum Subdiv { get; set; }

Longest-axis detail: Subdiv64, Subdiv128, Subdiv256 or Subdiv512; defaults to Subdiv128. Shorter axes adjust accordingly. Changing this does not rebake Data; higher detail needs more work and memory. Supply a valid enum value.

Methods10

Bakevoid
# Bake
C#
public void Bake(Entity fromNode = null, bool createVisualDebug = false);

Synchronously prepares visible static geometry from fromNode and descendants within the volume. With null, the root is the VoxelGI parent, which must exist. With createVisualDebug = false creates or updates Data. An assigned resource may be modified rather than replaced. Returns void: inspect errors and results; old nonnull Data alone does not prove a new bake succeeded. Saving the level does not replace saving external Data as .rbin.

Parameters
NameTypeDefault
fromNodeEntitynull
createVisualDebugboolfalse
fromNode

Geometry traversal root; null uses the VoxelGI parent.

createVisualDebug

true: create diagnostic geometry instead of ordinary Data. Defaults to false.

DebugBakevoid
# DebugBake
C#
public void DebugBake();

Runs Bake with null and createVisualDebug = true, creating a child MultiMeshInstance3D to inspect voxelization instead of producing ordinary Data. This is an editor diagnostic method, not persistence of usable GI.

GetCameraAttributesCameraAttributes
# GetCameraAttributes
C#
public CameraAttributes GetCameraAttributes();

Returns the current CameraAttributes. Attributes used for bake exposure normalization, not the active camera or its Environment. Physical lighting uses CameraAttributes normalization; assignment also updates normalization for existing Data. Keep bake settings consistent with the exposure in use.

Returns CameraAttributes

Current CameraAttributes; resources are returned by reference, not as independent copies.

GetProbeDataVoxelGIData
# GetProbeData
C#
public VoxelGIData GetProbeData();

Returns the current Data. Prepared volume data. Without Data the VoxelGI supplies no indirect light. Assignment neither bakes nor copies the resource; null clears the assigned data. Account for resource sharing between independent volumes.

Returns VoxelGIData

Current Data; resources are returned by reference, not as independent copies.

GetSizeVector3
# GetSize
C#
public Vector3 GetSize();

Returns the current Size. Full box size on each axis, not half-extents. Local bounds run from −Size/2 to +Size/2. Setting clamps each component to at least 1. Rebake Data after changing it; old data is not automatically rebuilt.

Returns Vector3

Current Size.

GetSubdivVoxelGI.SubdivEnum
# GetSubdiv
C#
public VoxelGI.SubdivEnum GetSubdiv();

Returns the current Subdiv. Longest-axis detail: Subdiv64, Subdiv128, Subdiv256 or Subdiv512; defaults to Subdiv128. Shorter axes adjust accordingly. Changing this does not rebake Data; higher detail needs more work and memory. Supply a valid enum value.

Returns VoxelGI.SubdivEnum

Current Subdiv.

SetCameraAttributesvoid
# SetCameraAttributes
C#
public void SetCameraAttributes(CameraAttributes cameraAttributes);

Sets CameraAttributes. Attributes used for bake exposure normalization, not the active camera or its Environment. Physical lighting uses CameraAttributes normalization; assignment also updates normalization for existing Data. Keep bake settings consistent with the exposure in use.

Parameters
NameTypeDefault
cameraAttributesCameraAttributes—
cameraAttributes

New CameraAttributes value.

SetProbeDatavoid
# SetProbeData
C#
public void SetProbeData(VoxelGIData data);

Sets Data. Prepared volume data. Without Data the VoxelGI supplies no indirect light. Assignment neither bakes nor copies the resource; null clears the assigned data. Account for resource sharing between independent volumes.

Parameters
NameTypeDefault
dataVoxelGIData—
data

New Data value.

SetSizevoid
# SetSize
C#
public void SetSize(Vector3 size);

Sets Size. Full box size on each axis, not half-extents. Local bounds run from −Size/2 to +Size/2. Setting clamps each component to at least 1. Rebake Data after changing it; old data is not automatically rebuilt.

Parameters
NameTypeDefault
sizeVector3—
size

New Size value.

SetSubdivvoid
# SetSubdiv
C#
public void SetSubdiv(VoxelGI.SubdivEnum subdiv);

Sets Subdiv. Longest-axis detail: Subdiv64, Subdiv128, Subdiv256 or Subdiv512; defaults to Subdiv128. Shorter axes adjust accordingly. Changing this does not rebake Data; higher detail needs more work and memory. Supply a valid enum value.

Parameters
NameTypeDefault
subdivVoxelGI.SubdivEnum—
subdiv

New Subdiv value.

VoxelGI.SubdivEnum

ValueDescription
Max = 4

Represents the size of the VoxelGI.SubdivEnum enum.

Subdiv128 = 1

Use 128 subdivisions. This is the default quality setting.

Subdiv256 = 2

Use 256 subdivisions.

Subdiv512 = 3

Use 512 subdivisions. This is the highest quality setting, but the slowest. On lower-end hardware, this could cause the GPU to stall.

Subdiv64 = 0

Use 64 subdivisions. This is the lowest quality setting, but the fastest. Use it if you can, but especially use it on lower-end hardware.

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.