Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
maxLevel4
typeflat
printablefalse
separatorpipe

...

Note

The exported Enlighten scene and the intermediate data in __Build_<scene>__ are used only by the precompute and debugging tools, and are not required for runtime radiosity updates.

For a prototype implementation you might load files from the __Build_<scene>__ directory directly in your game runtime, but this would not be practical in a production implementation.

Data layout

Enlighten runtime data is grouped into separate objects for each system, probe set and cubemap.

To find the automatically generated systems in a zone, load the IPrecompGeneratedSystems object.

Code Block
// path: "precomp/[zone name].gs"
const Enlighten::IPrecompGeneratedSystems* generatedSystems
	= Geo::LoadInterfaceCompressed<Enlighten::IPrecompGeneratedSystems>(path);

for (Geo::s32 systemIndex = 0; systemIndex != generatedSystems->GetNumSystems(); ++systemIndex)
{
	const Enlighten::IPrecompInputSystem* inputSystem = generatedSystems->GetSystem(systemIndex);
	Geo::GeoFileString systemName(inputSystem->GetName());

	// extract radiosity data associated with this system
}

To find the automatically generated probe sets in a zone, load the IPrecompOutputProbeOctree object.

Code Block
// path: "precomp/[zone name].opo"
const Enlighten::IPrecompOutputProbeOctree* probeOctree
	= Geo::LoadInterfaceCompressed<Enlighten::IPrecompOutputProbeOctree>(path);

for (Geo::s32 probeSetIndex = 0; probeSetIndex != probeOctree->GetNumProbeSets(); ++probeSetIndex)
{
	Geo::GeoFileString probeSetName = Geo::GeoFileString::Printf("%s_%d", probeOctree->GetName(), probeSetIndex);

	// extract radiosity data associated with this probe set
}

...

Tip

If you choose to use explicit system groups or manually placed probes, keep track of the system and probe set names in the same way.

We recommend to combine all systems, probe sets and cubemaps in a single zone into a single chunk for efficient load in your runtime file-system. 

Below is a practical example of the data layout for a single chunk:

Tip

We recommend to compress each chunk of persistent runtime data on disk to save space and speed up loading.

...