...
- Create an
IBakeInputRuntime and fill it with the RadSystemCore and InputWorkspace of each Enlighten system. - For each Enlighten system, create an
IBakeInputSystem using all the Radiosity objects of the Enlighten system. This is required later in the process in order to fit the Enlighten lit instances to the bake system instances. Set the resolution of the IBakeInputSystem to the resolution of the Enlighten lightmap via an IBakeInputProperties object passed to the IBakeInputSystem::SetBakeProperties method. - For each Enlighten system, call
IBake::CreateRuntimeLighting to create an IBakeRuntimeLighting from:- the
IBakeInputSystem that you just made - the
IPrecompSystemDuster - the
IPrecompPackedSystem - the global
IBakeInputLighting
- For each runtime lighting you made:
- For each bake system representing the output lightmaps:
- Call
IBake::UpdateRuntimeLighting to apply the light and albedo information for each bake system to the Enlighten system.
- Call
IBake::FinaliseRuntimeLighting
- Call
IBake::RunEnlightenSolver; this takes all the information and spins a small Enlighten Runtime until the lighting values settle. This is run only once as it contains information about every system in the bake. - For each bake system, call
IBake::BakeSystemIndirect and extract the indirect lighting from the IBakeOutputSystemIndirect it creates. Optionally pass in a BakeSystemResource object and a IBakeInputRayOriginPositions to be able to enable visibility-aware upsampling with the identically named baking property.

Final Gather light baking
...
- For each
IBakeInputSystem, call IBake::BakeSystemFinalGather. - Extract the FP16 output textures from the resulting
IBakeOutputSystemFinalGather objects.

Ambient occlusion
- For each
BakeSystemResource, call IBake::BakeSystemAO. - Extract the FP16 output textures from the resulting
IBakeOutputSystemAO objects.

Direct light baking for probes
- First, copy lighting information into an
IBakeInputLighting object. - Now, for each probe set represented by an
IPrecompInputProbeSet, create an IBakeVisibilityBuffer with the IBake API. You also need to pass in a BakeSystemResource object, with all the systems that can influence the direct lighting for the probes. This operation is slow; therefore if only the lights have changed (and not the geometry) you can pass in an IBakeVisibilityBuffer from a previous run and it will be updated. - Call
IBake::BakeProbeSetDirect() to create the IBakeOutputProbeSet. Use the IBakeOutputProbeSet::GetOutput() method to retrieve the SH coefficients of all probes in the probe set.

Indirect light baking for probes
- First follow the steps described in Indirect light baking.
- Now, for each probe in a probe set, use the
IBakeSolvedRuntime::GetSolvedProbe() method of IBakeSolvedRuntime to retrieve the SH coefficients.

Baked Radiosity Normal Texture
...
- For each
BakeInputSystem, call IBake::BakeSystemRadiosityNormal, providing the BakeSolvedRuntime for all Enlighten systems. - Extract the FP16 output textures from the resulting
IBakeOutputSystemRadiosityNormal objects.

Message reporting and error handling
...
{"serverDuration": 295, "requestCorrelationId": "be41df9d37344ac68f8d4aa275869f4c"}