...
- Create an
IBakeInputRuntimeand fill it with theRadSystemCoreandInputWorkspaceof each Enlighten system. - For each Enlighten system, create an
IBakeInputSystemusing 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 theIBakeInputSystemto the resolution of the Enlighten lightmap via anIBakeInputPropertiesobject passed to theIBakeInputSystem::SetBakePropertiesmethod. - For each Enlighten system, call
IBake::CreateRuntimeLightingto create anIBakeRuntimeLightingfrom:- the
IBakeInputSystemthat you just made - the
IPrecompSystemDuster - the
IPrecompPackedSystem - the global
IBakeInputLighting
- the
- For each runtime lighting you made:
- For each bake system representing the output lightmaps:
- Call
IBake::UpdateRuntimeLightingto apply the light and albedo information for each bake system to the Enlighten system.
- Call
- Call
IBake::FinaliseRuntimeLighting
- For each bake system representing the output lightmaps:
- 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::BakeSystemIndirectand extract the indirect lighting from theIBakeOutputSystemIndirectit creates. Optionally pass in aBakeSystemResourceobject and aIBakeInputRayOriginPositionsto be able to enable visibility-aware upsampling with the identically named baking property.
| Excerpt | ||
|---|---|---|
| ||
Final Gather light baking
...