Versions Compared

Key

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

...

Note

The diagram below shows the creation of one IPrecompPackedSystem. If you have multiple systems, each one needs to be packed. They may share the same IPrecompPackedGeometry objects if they use the same mesh with a different location/orientation.


Excerpt
hiddentrue



Radiosity processing

  1. When you have decided what the system dependencies are, pass these systems into the IPrecompute::CreatePreClustering function and subsequently the IPrecompute::CreateClustering function. The output data is used for both radiosity and spherical harmonics generation.
  2. For radiosity processing, pass these systems (and their cluster data) into the IPrecompute::CreateLightTransport function. The output from this task is the light transport.
  3. The light transport is passed to IPrecompute::CompileRadiosity in order to generate per-platform runtime data, a RadSystemCore within the IPrecompSystemRadiosity class.
Note

The diagram below shows a scene with two IPrecompPackedSystems; there may be more or less than this.


Excerpt
hiddentrue



You should ensure that the collection of systems passed to pre-clustering and clustering is the same as that passed to light transport. Light will only travel between systems that were given to both the (pre-)clustering and light transport stages. If you are implementing your own build pipeline, the object that is created by CompressLightTransport may be stored as a result of the precompute, and the later stage of CompileRadiosity done only when you know what platforms are required.

...

The next step is to create runtime workspaces from the precompute data.


Excerpt
hiddentrue



These are all fast operations, as they are simply compressing data from the intermediate objects into runtime formats. The InputWorkspace and AlbedoWorkspace are relocatable objects, so you can stream them in and out of memory whenever you need to.

...

To use adaptive probe placement in an octree, an extra stage is required (shown dashed in the picture below). Use IPrecompute::CreateOutputProbeOctree to convert an IPrecompInputProbeOctree into an IPrecompOutputProbeOctree. The IPrecompInputProbeSet::SetOctreeProbePositions function can then be used to set up the input for the remainder of the probeset pipeline.


Excerpt
hiddentrue



Cube map processing

Cube map processing follows the same pipeline structure as probe sets. Like the probe sets, the cube map processing can be started as soon as the IPrecompSystemClustering is available, and can be done in parallel with other precompute calculations. The correspondence between the interface objects and precompute functions for probe sets and cube maps are:

...