Skip to main content

Global Illumination in XFSDK Light

Quick start​

Enable Generate Mesh Distance Fields in Project Settings (requires an editor restart), then configure the renderer and Light GI mode:

[/Script/Engine.RendererSettings]
r.DynamicGlobalIlluminationMethod=3
r.GenerateMeshDistanceFields=True

[SystemSettings]
xl_gi_method=2

r.DynamicGlobalIlluminationMethod=3 selects the plugin GI path. xl_gi_method=2 enables Hybrid SDF GI (0 is off; 1 is reserved for planned hardware ray tracing). See the XFSDK Light overview for installation and the full xl_ console-variable list.

Setup video: Hybrid SDF GI in XFSDK Light.

Place an XFSDK GI Volume over the area you want to light and keep a Sky Light for sky contribution and fallback outside the volume. See GI volumes and Baking.

Tuning​

Use the Hybrid SDF GI settings with the Light prefix xl_gi_. For example, try xl_gi_dfgi_lite_visualize 3 to inspect placement and convergence. The quality modes and final gather use the same parameters.

Light quality presets​

Light saves xl_gi_quality in GameUserSettings. Leave it at -1 to use the renderer baseline, or choose Low (0), Medium (1), High (2), or Extreme (3). High enables final gather at one receiver per 2×2 block with one ray. Extreme enables it at full resolution with two rays per receiver.

Runtime GI API​

The runtime GI functions are available in Light under the same Blueprint node and C++ function names. The example uses the Light module and API types.

C++ setup​

Add the system module to the consuming module:

PrivateDependencyModuleNames.AddRange(
new string[]
{
"XFSDK_System"
});

Include the API header and select a mode.

#include "XFSDK_GI_API.h"

UXFSDKGIAPI::XFSDK_EnableHybridSDFGI();

const EXFSDKGIMode Mode =
UXFSDKGIAPI::XFSDK_GetGIMode();