class Enlighten::IPrecompute
The Low Level Enlighten Precompute API.
Enums
Name | Description |
---|---|
EMinimumCompatibleVersion | Controls if Precompute should generate data that can be used by older Enlighten run time APIs. |
EStateDump | Controls the amount of reproduction data saved by the IPrecompute tasks. |
Functions
Anchor | ||||
---|---|---|---|---|
|
EMinimumCompatibleVersion
...
public: enum EMinimumCompatibleVersion
{
emcvEnlighten3
}
...
Controls if Precompute should generate data that can be used by older Enlighten run time APIs.
enumerators
emcvEnlighten3 | Generate precompute data that can be consumed by Enlighten3 (and later) API. |
Anchor | ||||
---|---|---|---|---|
|
EStateDump
...
public: enum EStateDump
{
esdNone,
esdInputsOnly,
esdAll
}
...
Controls the amount of reproduction data saved by the IPrecompute tasks.
enumerators
esdNone | Do not save any dump files. |
esdInputsOnly | Save files containing the inputs provided by the user. |
esdAll | Save files at the input to every task, including generated files. |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::AssembleSystemGeometry
...
public: Geo::s32 AssembleSystemGeometry
(
const IPrecompInputSystem * pSystem,
const IPrecompInputGeometry *const * ppInputGeometry,
Geo::s32 numGeometries,
Geo::IGeoProgressProxy * progress,
IPrecompPackedSystem *& oSystem
)
...
Assemble system geometry.
If a system is going to be used as probe radiosity, then the input processing is greatly reduced (there is no need to pack the geometry and create the UV chart mappings).
Parameters
[in] | pSystem | The system to pack |
[in] | ppInputGeometry | The geometry referred to (by Id) in this system's PrecompInputInstances. You may pass more geometry items than are necessary, but all Id's used in the instances must have a packed geometry available. |
[in] | numGeometries | The number of packed geometry classes in the above array |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oSystem | The final packed system |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CalculateCubeMapSystemDependencies
...
public: Geo::s32 CalculateCubeMapSystemDependencies
(
const IPrecompInputCubeMap * pCubeMap,
const IPrecompPackedSystem *const * ppSystems,
Geo::s32 numSystems,
Geo::IGeoProgressProxy * progress,
IPrecompSystemDependencies *& oDependencies
)
...
Calculate system dependencies for a cube map.
Each IPrecompInputCubeMap may have dependencies calculated by calling this function on it. All packed systems which are fully loaded will have their geometry fully represented in the visibility tests. Packed systems which only have a header (ie whose geometry isn't loaded) will be represented by their bounding boxes in the visibility tests. (In the HLBS these sets of systems are controlled by the "expansionDistance" parameter.)
Parameters
[in] | pCubeMap | The cube map for which to calculate dependencies |
[in] | ppSystems | The list of systems to include in this calculation. |
[in] | numSystems | The number of packed systems in the above array |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oDependencies | The approximate set of system dependencies, which may be fed back into the precompute. |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CalculateProbeSetSystemDependencies
...
public: Geo::s32 CalculateProbeSetSystemDependencies
(
const IPrecompInputProbeSet * pProbeInput,
const IPrecompPackedSystem *const * ppSystems,
Geo::s32 numSystems,
Geo::IGeoProgressProxy * progress,
IPrecompSystemDependencies *& oDependencies
)
...
Calculate system dependencies for a probe set.
Each IPrecompInputProbeSet may have dependencies calculated by calling this function on it. The collection of systems passed in determines the connectivity between them, so completely isolated systems have a numSystems of 1. All packed systems which are fully loaded will have their geometry fully represented in the visibility tests. Packed systems which only have a header (ie whose geometry isn't loaded) will be represented by their bounding boxes in the visibility tests. (In the HLBS these sets of systems are controlled by the "expansionDistance" parameter.)
Parameters
[in] | pProbeInput | The probe set for which to calculate dependencies |
[in] | ppSystems | The list of systems to include in this calculation. |
[in] | numSystems | The number of packed systems in the above array |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oDependencies | The approximate set of system dependencies, which may be fed back into the precompute. |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CalculateSystemDependencies
...
public: Geo::s32 CalculateSystemDependencies
(
const IPrecompPackedSystem * pSystem,
const IPrecompPackedSystem *const * ppSystems,
Geo::s32 numSystems,
float rayOriginsPerPixelArea,
Geo::IGeoProgressProxy * progress,
IPrecompSystemDependencies *& oDependencies
)
...
Calculate system dependencies for a system.
Each IPrecompInputSystem may have dependencies calculated by calling this function on it. The collection of systems passed in determines the connectivity between them, so completely isolated systems have a numSystems of 1. All packed systems which are fully loaded will have their geometry fully represented in the visibility tests. Packed systems which only have a header (ie whose geometry isn't loaded) will be represented by their bounding boxes in the visibility tests. (In the HLBS these sets of systems are controlled by the "expansionDistance" parameter.)
Parameters
[in] | pSystem | The system for which to calculate dependencies |
[in] | ppSystems | The list of systems to include in this calculation. It must include at least the system in the previous argument. |
[in] | numSystems | The number of packed systems in the above array |
[in] | rayOriginsPerPixelArea | Density of ray origins - i.e. num of ray origins = rayOriginsPerPixelArea * SystemWorldArea/(minSystemPixelSize^2) |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oDependencies | The approximate set of system dependencies, which may be fed back into the precompute. |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CalculateSystemDependenciesByDistance
...
public: Geo::s32 CalculateSystemDependenciesByDistance
(
const IPrecompInputSystem *const * pInputSystems,
Geo::s32 numSystems,
const IPrecompInputGeometry *const * pInputGeoms,
Geo::s32 numGeoms,
float maxDistanceInPixelSizeUnits,
bool estimateFromCentre,
Geo::IGeoProgressProxy * progress,
IPrecompSystemsDependencies *& oDependencies
)
...
Calculate dependencies for the input systems.
System A is dependent on system B if the centres of A and B are at a distance equal or smaller than the maxDistanceInPixelSizeUnits multiplied by the minimum pixel size of the instances in system B.
Parameters
[in] | pInputSystems | The input systems that will get their dependencies calculated. |
[in] | numSystems | The number of input systems |
[in] | pInputGeoms | A collection of input geometry objects, referred to by the input systems above. |
[in] | numGeoms | How many entries in the pInputGeometry array. |
[in] | maxDistanceInPixelSizeUnits | If system A's bounding box is closer than maxDistanceInPixelSizeUnits * (minPixelSize of system B) to system's B bounding box, than system A is dependent on system B. minPixelSize of a system is a minimal value of an output pixel size present among input instances making up that system. |
[in] | estimateFromCentre | If true the distance between bounding box centres is evaluated, if false the actual distance between the bounding boxes is considered (i.e. overlapping bounding boxes have a distance of less than zero. |
[in] | progress | This object is updated during this function call to give feedback on progress. |
[out] | oDependencies | Dependencies for the input systems. |
Anchor | ||||
---|---|---|---|---|
|
virtual bool Enlighten::IPrecompute::ClassifyInstanceAsLightmapOrProbeLit
...
public: bool ClassifyInstanceAsLightmapOrProbeLit
(
const Geo::Matrix & instanceTransform,
const IPrecompInputGeometry * pPrecompInputGeometry,
float outputPixelSize,
bool considerUserUvs,
float autoUvMaxDistanceFactor,
double autoUvTotalErrorThreshold,
eMeshClassificationLightingType & result
)
...
Decides whether a given geometry instance should be probe-lit or lightmap-lit based on how good its generated Auto UVs are.
This is used as part of Mesh Classification.
Parameters
[in] | instanceTransform | The matrix transform of the instance that is to be classified |
[in] | pPrecompInputGeometry | The geometry used by the instance that is to be classified |
[in] | outputPixelSize | The output pixel size assigned to the instance that is to be classified |
[in] | considerUserUvs | Should existing user UVs on the IPrecompInputGeometry be considering when running the Auto UVs algorithm |
[in] | autoUvMaxDistanceFactor | The Auto UVs algorithm used to classify the instance will use a "simpMaxDistance" (see Auto UV docs) of this factor multiplied by outputPixelSize (a good default is 0.5) |
[in] | autoUvTotalErrorThreshold | The total error reported by the Auto UVs algorithm (the total overlap ratio) is thresholded against this value to determine the classification result (a good default is 0.3) |
[out] | result | The result of the classification - either MCLT_PROBE for probe-lit or MCLT_LIGHTMAP for lightmap-lit. |
Anchor | ||||
---|---|---|---|---|
|
virtual bool Enlighten::IPrecompute::ClassifyInstancesAsContributingProbeLit
...
public: bool ClassifyInstancesAsContributingProbeLit
(
const Geo::Matrix * pInstanceTransforms,
const IPrecompInputGeometry *const * ppInstanceGeoms,
const float * pClusterSizes,
Geo::s32 numInstances,
float densityWindowSizeFactor,
bool * pResults
)
...
Decides which probe-lit instances should be contributing ("Probe Radiosity") and which should not ("Fully Dynamic") based on how much light each instance and its neighbours could block.
This is used as part of Mesh Classification.
Parameters
[in] | pInstanceTransforms | The matrix transforms for each instance that is to be classified |
[in] | ppInstanceGeoms | The geometries used by each instance that is to be classified |
[in] | pClusterSizes | The cluster sizes assigned to each instance that is to be classified |
[in] | numInstances | The number of instances to classify which should match the length of the pInstanceTransforms, ppInstanceGeoms, pClusterSizes and pResults arrays. |
[in] | densityWindowSizeFactor | Specifies the size (edge length) of the window (in output pixels) in which there must be significant projected area for instances to count as contributing (a good default is 10.0) |
[out] | pResults | The results of the classification - true for each instance that should be contributing, false for each instance that should not. This should be a pointer an already allocated array of booleans, of length numInstances. |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CompileClusteringOutput
...
public: Geo::s32 CompileClusteringOutput
(
const IPrecompSystemPreClustering * pPreClustering,
const IPrecompSystemClustering * pClustering,
Geo::IGeoProgressProxy * progress,
IClusteringOutput *& oClusteringOutput
)
...
Extract some data about the clustering process.
An optional step that gives you some information for debugging.
Parameters
[in] | pPreClustering | The preClustering interface for the clustering being processed |
[in] | pClustering | The clustering being processed |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oClusteringOutput | Class containing the debugging data |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CompileCubeMap
...
public: Geo::s32 CompileCubeMap
(
const IPrecompOutputCubeMap * cubeMapOutput,
Enlighten::eSolverType targetSolver,
Geo::IGeoProgressProxy * progress,
IPrecompCubeMapCore *& oCubeMapCore
)
...
Compile the data from the cube map output object into runtime format.
Each IPrecompOutputCubeMap must have this function called on it per-platform
Parameters
[in] | cubeMapOutput | The cube map being processed |
[in] | targetSolver | Which solver to create data for |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oCubeMapCore | Class containing the runtime cube map data |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CompileDepthCubeMap
...
public: Geo::s32 CompileDepthCubeMap
(
const IPrecompOutputCubeMap * cubeMapOutput,
IPrecompDepthCubeMap *& oDepthCubeMap
)
...
Compile the depth data from the cube map output object.
Each IPrecompOutputCubeMap must have this function called on it per-platform
Parameters
[in] | cubeMapOutput | The cube map being processed |
[out] | oDepthCubeMap | Class containing the depth cube map data |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CompileInputWorkspace
...
public: Geo::s32 CompileInputWorkspace
(
const IPrecompSystemDuster * pDusters,
Enlighten::eSolverType targetSolver,
bool includeProjectedPointData,
Geo::IGeoProgressProxy * progress,
InputWorkspace *& oInputWorkspace
)
...
Compile the data from the dusters and radiosity cores into an InputWorkspace.
Parameters
[in] | pDusters | The dusters being processed |
[in] | targetSolver | Which solver to create data for |
[in] | includeProjectedPointData | When true, if projected point data is in the IPrecompSystemDuster object, it will be exported to the RadDataBlock m_ProjectedPointData in the InputWorkspace. False disables the export. |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oInputWorkspace | Class containing the runtime InputWorkspace |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CompileLightTransportOutput
...
public: Geo::s32 CompileLightTransportOutput
(
const IPrecompSystemLightTransport * pLightTransport,
Geo::IGeoProgressProxy * progress,
ILightTransportOutput *& oLightTransportOutput
)
...
Extract some data about the light transport process.
An optional step that gives you some information for debugging.
Parameters
[in] | pLightTransport | The light transport being processed |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oLightTransportOutput | Class containing the debugging data |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CompileMaterialData
...
public: Geo::s32 CompileMaterialData
(
const IPrecompSystemDuster * pDusters,
Geo::IGeoProgressProxy * progress,
ClusterAlbedoWorkspaceMaterialData *& oMaterialData
)
...
Compile the data from the dusters into a ClusterAlbedoWorkspaceMaterialData.
Parameters
[in] | pDusters | The dusters being processed |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oMaterialData | Class containing the ClusterAlbedoWorkspaceMaterialData |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CompileProbeSet
...
public: Geo::s32 CompileProbeSet
(
const IPrecompOutputProbeSet * pProbeSetOutput,
Enlighten::eSolverType targetSolver,
Geo::IGeoProgressProxy * progress,
IPrecompProbeSetRadiosity *& oRadiosity
)
...
Compile the data from the probeset light transport into runtime format.
Each IPrecompOutputProbeSet must have this function called on it per-platform
Parameters
[in] | pProbeSetOutput | The probeset being processed |
[in] | targetSolver | Which solver to create data for |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oRadiosity | Class containing the runtime radiosity |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CompileRadiosity
...
public: Geo::s32 CompileRadiosity
(
const IPrecompSystemCompressedLightTransport * pLightTransport,
Enlighten::eSolverType targetSolver,
Geo::IGeoProgressProxy * progress,
IPrecompSystemRadiosity *& oRadiosity
)
...
Compile the data from the light transport into runtime format.
Each IPrecompSystemLightTransport must have this function called on it per-platform
Parameters
[in] | pLightTransport | The compressed light transport (ie. system) being processed |
[in] | targetSolver | Which solver to create data for |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oRadiosity | Class containing the runtime radiosity |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CompileRadiosityNormalTexture
...
public: Geo::s32 CompileRadiosityNormalTexture
(
const IPrecompSystemCompressedLightTransport * pLightTransport,
IPrecompRadiosityNormalTexture *& oRadiosityNormalTexture
)
...
Compile the radiosity normal texture from the light transport data.
Parameters
[in] | pLightTransport | The compressed light transport (ie. system) being processed. |
[out] | oRadiosityNormalTexture | Class containing the texture data. |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CompressLightTransport
...
public: Geo::s32 CompressLightTransport
(
const IPrecompSystemLightTransport * pLightTransport,
const IPrecompSystemDuster * pDusters,
Geo::IGeoProgressProxy * progress,
IPrecompSystemCompressedLightTransport *& oCompiledLightTransport
)
...
Compress the data from the light transport into a tighter format.
Each IPrecompSystemLightTransport must have this function called on it to reduce the data down to runtime-compatible levels.
Parameters
[in] | pLightTransport | The light transport (ie. system) being processed |
[in] | pDusters | The dusters for the system being processed |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oCompiledLightTransport | Compressed data passed to CompileRadiosity |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CreateClustering
...
public: Geo::s32 CreateClustering
(
const IPrecompSystemPreClustering * pSystemPreClustering,
const IPrecompPackedSystem *const * ppOtherPackedSystems,
Geo::s32 numOtherSystems,
Geo::IGeoProgressProxy * progress,
IPrecompSystemClustering *& oClustering
)
...
Create clustering for a system.
Each IPrecompInputSystem must have clustering created by calling this function on it. The collection of other packed systems passed in is used for visibility determination, so any system whose geometry could affect rays cast with the system should be supplied. Typically the safest and simplest thing is to pass the same dependencies used by light transport.
Parameters
[in] | pSystemPreClustering | The pre-clustering interface for the system to cluster |
[in] | ppOtherPackedSystems | The list of (other) packed systems to consider when generating this clustering. The packed system for the system to generate clustering for may be passed but will be ignored. |
[in] | numOtherSystems | The number of packed systems in the above array |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oClustering | The system clustering, used by other stages |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CreateCubeMap
...
public: Geo::s32 CreateCubeMap
(
const IPrecompInputCubeMap * inputCubeMap,
const IPrecompSystemClustering *const * ppClusterings,
Geo::s32 numClusterings,
const IPrecompSystemPreClustering *const * ppPreClusterings,
Geo::IGeoProgressProxy * progress,
IPrecompOutputCubeMap *& oCubeMapOutput
)
...
Run the precompute for a cube map.
This function takes a description of a cube map as a IPrecompInputCubeMap and runs the precompute to produce an IPrecompOutputCubeMap. The runtime data can then be extracted from this object. This function requires a list of all systems the cube map is allowed to 'see', as an array of IPrecompSystemClustering objects. Removing systems that the cube map cannot see will make this stage faster.
Parameters
[in] | inputCubeMap | The description of the cube map to precompute |
[in] | ppClusterings | The list of clusterings to assume may be visible from this cube map |
[in] | numClusterings | The number of clusterings in the above array |
[in] | ppPreClusterings | The list of pre-clusterings to assume may be visible from this cube map |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oCubeMapOutput | The precomputed cube map data |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CreateLightTransport
...
public: Geo::s32 CreateLightTransport
(
const IPrecompPackedSystem * pSystem,
const IPrecompPackedSystem *const * ppSystems,
Geo::s32 numSystems,
const IPrecompSystemClustering *const * ppClusterings,
Geo::s32 numClusterings,
Geo::IGeoProgressProxy * progress,
IPrecompSystemLightTransport *& oLightTransport
)
...
Create the light transport for a system.
Each light-mapped system must have a light transport created by calling this function on it. The clustering object for each system to be considered as input (the dependencies), whether light-mapped or not, should be passed in. These are used to determine the bounced light that a given pixel in the system of interest can see. The packed system object of each light-mapped system to be considered as input should be passed in separately. These are used to determine connectivity in light-map space, and ensure boundaries between systems are as smooth as possible.
Parameters
[in] | pSystem | The system to create light transport for |
[in] | ppSystems | The list of systems to include in this light transport. It must include at least the system in the previous argument. |
[in] | numSystems | The number of packed systems in the above array |
[in] | ppClusterings | The list of clusterings to include in this light transport |
[in] | numClusterings | The number of clusterings in the above array |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oLightTransport | The system light transport, used by CompileRadiosity |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CreatePreClustering
...
public: Geo::s32 CreatePreClustering
(
const IPrecompPackedSystem * pSystem,
const IPrecompPackedSystem *const * ppSystems,
Geo::s32 numSystems,
Geo::IGeoProgressProxy * progress,
IPrecompSystemPreClustering *& oPreClustering
)
...
Create pre-clustering for a system.
Each IPrecompInputSystem must have pre-clustering created by calling this function on it. The collection of systems passed in determines the connectivity between them, so completely isolated systems have a numSystems of 1.
Parameters
[in] | pSystem | The system to pre-cluster |
[in] | ppSystems | The list of systems to include in this pre-clustering. It must include at least the system in the previous argument. |
[in] | numSystems | The number of packed systems in the above array |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oPreClustering | The system pre-clustering, used by other stages |
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompute::CreateProbeAtlasMaxima
...
public: void CreateProbeAtlasMaxima
(
const char * name,
Geo::u32 probeSetCount,
const PrecompOctreeCode * octreeCodes,
const PppiProbeSetFootprint * footprints,
IPrecompProbeAtlasMaxima *& pMaxima
)
...
Compute the atlas maxima for the specified probe sets.
Parameters
[in] | name | The name of the created object. |
[in] | probeSetCount | The number of probe sets in the world. |
[in] | octreeCodes | The octree code associated with each probe set. |
[in] | footprints | The result of GetOctreePppiAtlasFootprint for each probe set. |
[out] | pMaxima | The computed maxima. |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CreateProbeOctree
...
public: Geo::s32 CreateProbeOctree
(
const IPrecompInputProbeOctree * pProbeInput,
const IPrecompPackedSystem *const * ppSystems,
Geo::s32 numSystems,
Geo::IGeoProgressProxy * progress,
IPrecompProbeOctree *& pProbeOctree
)
...
Automatically place probes within a volume, based on distance to geometry.
Parameters
[in] | pProbeInput | The volume within which to generate probe positions. |
[in] | ppSystems | The list of systems whose geometry will be used. |
[in] | numSystems | The number of packed systems in the above array |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | pProbeOctree | The generated probe octree, from which probe sets may be extracted. |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CreateProbeSet
...
public: Geo::s32 CreateProbeSet
(
const IPrecompInputProbeSet * pProbeSet,
const IPrecompSystemClustering *const * ppClusterings,
Geo::s32 numClusterings,
Geo::IGeoProgressProxy * progress,
IPrecompOutputProbeSet *& oProbeSetOutput
)
...
Create the spherical harmonic data for an SH probe set.
Each IPrecompInputProbeSet must have spherical harmonic data created by calling this function on it. The collection of clusters passed in limits what is visible to the probe set.
Parameters
[in] | pProbeSet | The SH probe set definition |
[in] | ppClusterings | The array of clusterings to include in this probe set |
[in] | numClusterings | The number of clusterings in the above array |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oProbeSetOutput | The computed sh probe set, used by the runtime |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CreateSystemDusters
...
public: Geo::s32 CreateSystemDusters
(
const IPrecompSystemClustering * pClustering,
const IPrecompSystemClustering *const * ppClusterings,
Geo::s32 numClusterings,
Geo::IGeoProgressProxy * progress,
IPrecompSystemDuster *& oDuster
)
...
Create the platform-agnostic runtime input sample points.
Parameters
[in] | pClustering | The clustering (ie. system) being processed |
[in] | ppClusterings | The list of clusterings to include in this Create System Dusters |
[in] | numClusterings | The number of clusterings in the above array |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oDuster | Class containing the runtime input sample points |
Note | ||
---|---|---|
| ||
There are two versions of this function. This simpler version assumes you do not want any projected point data generated. It is equivalent to calling the second function as: CreateSystemDusters(pClustering, ppClusterings, numClusterings, NULL, 0, NULL, 0, NULL, progress, oDuster); |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CreateSystemDusters
...
public: Geo::s32 CreateSystemDusters
(
const IPrecompSystemClustering * pClustering,
const IPrecompSystemClustering *const * ppClusterings,
Geo::s32 numClusterings,
const PointProjectionSurface * surfaceArray,
Geo::s32 numSurfaces,
const PointProjectionVersion * versionArray,
Geo::s32 numVersions,
const PointProjectionOptions * projectionOptions,
Geo::IGeoProgressProxy * progress,
IPrecompSystemDuster *& oDuster
)
...
Create the platform-agnostic runtime input sample points including versions of projected points.
This function will optionally generate alternative versions of the input sample points (duster points). If created, these will be exported via the m_ProjectedPointData RadDataBlock of the InputWorkspace runtime object when this class is compiled to a specific platform. If you do not want point projection data, you can simply pass NULLs as appropriate. There is a second version of this function which does this for you. In particular, if no versions are specified (numVersions == 0), the call will succeed and will not generate any additional data.
The m_ProjectedPointData RadDataBlock in the InputWorkspace is a collection of per-instance sets of input sample points that have been projected to the meshes provided to this call. The m_ProjectedPointData RadDataBlock is optional and will only be loaded at runtime if you provide the Enlighten::Iff::ProjectedPointsInputWorkspaceDataSection to Enlighten::ReadInputWorkspaceFromFile().
Point projection works well when projecting onto an alternative representation of the same geometry, such as a different LOD level. The geometry to project onto is provided as a set of 'surfaces', each of which consist of an IPrecompInputMesh, a transformation matrix and boolean. This is the PointProjectionSurface class. Note that only the positions and normals of the meshes are used in the projection. The set of surfaces to use is specified per-instance, per-version, with the PointProjectionVersion class.
"Versions" can be thought of as a generalisation of LODs. They are just an alternative representation for an instance, and although version IDs need to be unique per-instance, they can be any value. In particular, they do not need to start at 0, or be contiguous, or positive (e.g. -100,-1,4,5 are all fine). This function will fail and report an error if you specify the same version ID for an instance more than once. It will also fail if the m_TargetSurfaces array is 0 length, or contains invalid indices or refers to null pointers and so on, but we will accept geometry that is empty (no triangles or vertices). In this case, it is not possible to project the points so we keep their original locations and create a version entry with this data. This is redundant (the points are the same), but it allows us to handle this scenario correctly and without creating an edge case in the runtime. In particular, all versions of the points for an instance will have the same number of points in all cases.
Instances that are known by the precompute (and therefore the InputWorkspace), but do not have projected point versions explicitly created for them have zero points in the resulting RadDataBlock. See the runtime API for further details.
The projection code will find the closest position on the specified geometry for each duster point. But it can also attempt to find a better position in front of itself, along its normal, if this helps it sit on top of nearby obscuring geometry. This can help prevent points being hidden under small details. This behaviour is optional and disabled if maxRayIntersectionDistance in the PointProjectionOptions class is 0 or negative. (Default is 0.)
The ppClusterings array of dependent clusterings is used to correctly determine transparency offsets per cluster, it has to contain the pClustering system.
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CreateSystemsByVoxelisation
...
public: Geo::s32 CreateSystemsByVoxelisation
(
const IPrecompInputSystem * pInputSystem,
const IPrecompPackedGeometry *const * pPackedGeoms,
Geo::s32 numGeoms,
float voxelSizeInPixelSizeUnits,
Geo::IGeoProgressProxy * progress,
IPrecompGeneratedSystems *& oSystems
)
...
Split the input system into automatically generated systems.
Note that terrain instances will always be automatically grouped into a different system than non-terrain instances. This version of the function takes a collection of packed geometry objects allowing it to check that each system generated will pack. The instances in a generated system that would fail to pack using the provided voxel size are split into sub-voxels, ensuring valid systems are always generated.
Parameters
[in] | pInputSystem | The input system that will be split. |
[in] | pPackedGeoms | A collection of packed geometry objects, referred to by the above. |
[in] | numGeoms | How many entries in the pPackedGeoms array. |
[in] | voxelSizeInPixelSizeUnits | Size of a voxel in pixelSize units. If input geometries (pInputGeoms) have different pixelSizes than the minimum one is used. All instances whose bounding box centre falls into the same voxel are grouped into one system. |
[in] | progress | This object is updated during this function call to give feedback on progress. |
[out] | oSystems | Details about the instances in each system. |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CreateSystemsByVoxelisation
...
public: Geo::s32 CreateSystemsByVoxelisation
(
const IPrecompInputSystem * pInputSystem,
const IPrecompInputGeometry *const * pInputGeoms,
Geo::s32 numGeoms,
float voxelSizeInPixelSizeUnits,
Geo::IGeoProgressProxy * progress,
IPrecompGeneratedSystems *& oSystems
)
...
Split the input system into automatically generated systems.
Note that instances which have terrain geometry will always be automatically grouped into a different system than regular instances.
Parameters
[in] | pInputSystem | The input system that will be split. |
[in] | pInputGeoms | A collection of input geometry objects, referred to by the above. |
[in] | numGeoms | How many entries in the pInputGeoms array. |
[in] | voxelSizeInPixelSizeUnits | Size of a voxel in pixelSize units. If input geometries (pInputGeoms) have different pixelSizes than the minimum one is used. All instances whose bounding box centre falls into the same voxel are grouped into one system. |
[in] | progress | This object is updated during this function call to give feedback on progress. |
[out] | oSystems | Details about the instances in each system. |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CreateUnlitClustering
...
public: Geo::s32 CreateUnlitClustering
(
const IPrecompPackedSystem * pPackedSystem,
Geo::IGeoProgressProxy * progress,
IPrecompSystemClustering *& oClustering
)
...
Create an unlit clustering for a system that does not reflect light.
Parameters
[in] | pPackedSystem | The unlit system from which to create the clustering. |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oClustering | The final unlit clustering |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::CreateVisibilityData
...
public: Geo::s32 CreateVisibilityData
(
const IPrecompSystemClustering * thisClustering,
const IPrecompSystemClustering *const * allClusterings,
Geo::s32 numClusterings,
Geo::IGeoProgressProxy * progress,
PrecomputedVisibilityData *& oVisibility
)
...
Create precomputed visibility data for directional lights for a system.
Parameters
[in] | thisClustering | The clusterings for the system to precompute visibility for |
[in] | allClusterings | The clusterings for all systems to be included in the visibility computation. |
[in] | numClusterings | The number of clusterings in the above array |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oVisibility | The computed visibility, used by the runtime |
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompute::DumpInputProbeRegion
...
public: void DumpInputProbeRegion
(
const IPrecompInputProbeRegion * pProbeRegion,
const char * name,
float voxelSize,
WorldAxis verticalAxis,
float waterPlane
)
...
Dump debug data for a probe region.
Parameters
[in] | pProbeRegion | The region for which to dump debug data. |
[in] | name | The unique name of the region, used to construct the filename. |
[in] | voxelSize | The size of the smallest possible voxel used to represent the region of 3D space. |
[in] | verticalAxis | The axis aligned vector pointing directly upwards. |
[in] | waterPlane | If the value is not WaterPlaneInvalid, probes are placed for terrain only above the plane defined by this distance and the vertical axis. |
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompute::DumpMeshProbeRegion
...
public: void DumpMeshProbeRegion
(
const PrecompMeshProbeRegion & surfaceRegion,
const PrecompMeshProbeRegion & terrainRegion,
const char * name,
float voxelSize,
WorldAxis verticalAxis,
float waterPlane
)
...
Dump debug data for a probe region.
Parameters
[in] | surfaceRegion | The surface region for which to dump debug data. |
[in] | terrainRegion | The terrain region for which to dump debug data. |
[in] | name | The unique name of the region, used to construct the filename. |
[in] | voxelSize | The size of the smallest possible voxel used to represent the region of 3D space. |
[in] | verticalAxis | The axis aligned vector pointing directly upwards. |
[in] | waterPlane | If the value is not WaterPlaneInvalid, probes are placed for this region only above the plane defined by this distance and the vertical axis. |
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompute::DumpSystemDependencies
...
public: void DumpSystemDependencies
(
const IPrecompSystemDependencies * pDependencies,
const char * name
)
...
Dump debug data for a set of system dependencies.
Parameters
[in] | pDependencies | The object for which to dump debug data. |
[in] | name | The unique name of the object, used to construct the filename. |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::ExtractOctreeProbeSet
...
public: Geo::s32 ExtractOctreeProbeSet
(
const IPrecompOutputProbeOctree * pProbeOctree,
Geo::s32 probeSetIndex,
IPrecompInputProbeSet *& pProbeSet,
IPrecompSystemDependencies *& pDependencies
)
...
Extract a probe set containing automatically placed probes from a probe octree.
The build parameters for the extracted probe set are taken from the octree.
Parameters
[in] | pProbeOctree | The probe octree from which to extract a probe set. |
[in] | probeSetIndex | The index of the probe set within the probe octree. |
[out] | pProbeSet | The extracted probe positions, which may be fed back into the precompute. |
[out] | pDependencies | The extracted system dependencies, which may be fed back into the precompute. |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::LicenseDaysRemaining
...
public: Geo::s32 LicenseDaysRemaining()
...
Number of full days remaining for the set license. Returns -1 if the set license is invalid and/or outdated.
Anchor | ||||
---|---|---|---|---|
|
Geo::NonCopyable::NonCopyable
...
public: NonCopyable
(
NonCopyable &&
)
...
Defaulted to allow move.
Anchor | ||||
---|---|---|---|---|
|
NonCopyable& Geo::NonCopyable::operator=
...
public: NonCopyable & operator=
(
NonCopyable &&
)
...
Defaulted to allow move.
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::PackGeometry
...
public: Geo::s32 PackGeometry
(
const IPrecompInputGeometry * pGeometry,
Geo::IGeoProgressProxy * progress,
IPrecompPackedGeometry *& oGeometry
)
...
Simplify and pack geometry meshes.
Each IPrecompInputGeometry must be analysed and packed by calling this function on it.
Parameters
[in] | pGeometry | The geometry to simplify and pack |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oGeometry | The final packed geometry |
Returns
Returns 0 if successful, otherwise an integer which can be interpreted as a GeometryBuildResult. More detailed error information can be collected by implementing the ReportError() method of the IGeoProgressProxy object.
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::PackSystem
...
public: Geo::s32 PackSystem
(
const IPrecompInputSystem * pSystem,
const IPrecompPackedGeometry *const * ppPackedGeometry,
Geo::s32 numGeometries,
Geo::IGeoProgressProxy * progress,
IPrecompPackedSystem *& oSystem
)
...
Pack systems.
Each IPrecompInputSystem must be packed by calling this function on it.
Parameters
[in] | pSystem | The system to pack |
[in] | ppPackedGeometry | The geometry referred to (by Id) in this system's PrecompInputInstances. You may pass more geometry items than are necessary, but all Id's used in the instances must have a packed geometry available. |
[in] | numGeometries | The number of packed geometry classes in the above array |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oSystem | The final packed system |
Returns
Returns zero if successful, non-zero if an error occurred. More detailed error information can be collected by implementing the ReportError() method of the IGeoProgressProxy object.
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::ProjectGeometry
...
public: Geo::s32 ProjectGeometry
(
const IPrecompInputGeometry * pInputGeometry,
const IPrecompPackedGeometry *const * pBaseGeometries,
Geo::s32 numBaseGeoms,
Geo::IGeoProgressProxy * progress,
IPrecompPackedGeometry *& oGeometry
)
...
Project detail meshes in an pInputGeometry onto target clusters from pBaseGeometries This is guaranteed not to change the pInputGeometry and pBaseGeometries in any way, so can be done after a precompute to get new UVs for a detail mesh that was not known about when the last precompute was run.
Parameters
[in] | pInputGeometry | The geometry to project (must contain only detail meshes) |
[in] | pBaseGeometries | An array of packed geometries to project onto |
[in] | numBaseGeoms | Number of geometries in pBaseGeometries |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oGeometry | The projected geometry. |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::ProjectSystem
...
public: Geo::s32 ProjectSystem
(
const IPrecompInputSystem * pProjectedSystem,
const IPrecompInputGeometry *const * ppProjSysGeoms,
Geo::s32 numProjSysGeometries,
const IPrecompInputSystem * pTargetSystem,
const IPrecompPackedGeometry *const * ppTargetSysGeoms,
Geo::s32 numTargetSysGeometries,
const Geo::Geo2DTransform * pTargetUvTransforms,
Geo::IGeoProgressProxy * progress,
IPrecompPackedSystem *& oSystem
)
...
Project a system comprised entirely of detail mesh instances across another system.
Parameters
[in] | pProjectedSystem | The system to project. |
[in] | ppProjSysGeoms | The geometry referred to (by Id) in this projected system's PrecompInputInstances. |
[in] | numProjSysGeometries | The number of input geometry objects in the ppProjSysGeoms array. |
[in] | pTargetSystem | The system to project onto. |
[in] | ppTargetSysGeoms | The geometry referred to in the target system's PrecompInputInstances. |
[in] | numTargetSysGeometries | The number of packed geometry classes in the above array |
[in] | pTargetUvTransforms | The UV transforms obtained from the result of packing the system - one UV Transform for each instance in the target system. |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | oSystem | The final projected system. The UV projection information is stored in the IPrecompPackedInstances. |
Anchor | ||||
---|---|---|---|---|
|
virtual void Geo::IGeoReleasable::Release
...
public: void Release()
...
Free this object that was created within the Enlighten libraries.
Expect this to behave in a similar way to calling 'delete(this)'
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompute::SetCpuGpuMode
...
public: void SetCpuGpuMode
(
Geo::ECpuGpuMode mode
)
...
Sets the hardware mode for the Enlighten precompute.
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompute::SetCpuThreadMax
...
public: void SetCpuThreadMax
(
Geo::s32 maxThreads
)
...
Sets the maximum number of threads that the Cpu mode will use.
Anchor | ||||
---|---|---|---|---|
|
virtual bool Enlighten::IPrecompute::SetLicense
...
public: bool SetLicense
(
const char * licenseData,
Geo::s32 licenseLength
)
...
Set the license string. Must set before any precompute action.
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompute::SetMaxConcurrentRays
...
public: void SetMaxConcurrentRays
(
Geo::s32 totalRays
)
...
Sets the total number of rays that the precompute will generate at one time. Set this only if you are concerned about memory pressure.
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompute::SetMemoryLimit
...
public: void SetMemoryLimit
(
Geo::MemoryLimitCallback callback
)
...
Set a callback which can track and limit the total memory allocated by the precompute.
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompute::SetMinimumCompatibleVersion
...
public: void SetMinimumCompatibleVersion
(
EMinimumCompatibleVersion minimumVersion
)
...
Sets the minimum version of Enlighten, precompute should generate data for (default is emcvEnlighten3).
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompute::SetStateDump
...
public: void SetStateDump
(
EStateDump state
)
...
Sets the level of reproduction data saved by the IPrecompute tasks.
Anchor | ||||
---|---|---|---|---|
|
virtual bool Enlighten::IPrecompute::SetStateDumpFolder
...
public: bool SetStateDumpFolder
(
const char * folder
)
...
Sets the folder that shall contain reproduction data for the IPrecompute tasks.
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::StitchProbeOctree
...
public: Geo::s32 StitchProbeOctree
(
const IPrecompProbeOctree * probeOctree,
const IPrecompProbeOctreeLayout *const * otherLayouts,
Geo::s32 otherCount,
Geo::IGeoProgressProxy * progress,
IPrecompOutputProbeOctree *& outputOctree
)
...
Stitch one octree with others to produce an output probe octree.
Parameters
[in] | probeOctree | The probe octree to be stitched. |
[in] | otherLayouts | The set of other octree layouts that may overlap. |
[in] | otherCount | The number of entries in the above array. |
[in] | progress | This object is updated during this function call to give feedback on progress |
[out] | outputOctree | The stitched output probe octree. |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::ValidateBuildParameters
...
public: Geo::s32 ValidateBuildParameters
(
const IPrecompInputSystem * pSystem,
const IPrecompInputGeometry *const * ppGeometry,
Geo::s32 numGeometries,
bool estimateNumOutputPixels,
bool estimateNumClusters,
Geo::IGeoProgressProxy * progress
)
...
Examine the incoming data and determine if the supplied parameters will violate memory or reasonable performance limits.
Parameters
[in] | pSystem | The system to validate. |
[in] | ppGeometry | The geometry referred to (by Id) in this system's PrecompInputInstances. You may pass more geometry items than are necessary |
[in] | numGeometries | The number of input geometry classes in the above array |
[in] | estimateNumOutputPixels | True if the estimated number of output pixels that the system will require should be estimated and validated, false if not. |
[in] | estimateNumClusters | True if the estimated number of clusters that the system will require should be estimated and validated, false if not. |
[in] | progress | This object is updated during this function call to give feedback on progress |
Returns
Returns zero if successful, non-zero if the validation fails. Please refer to the errors reported via the ReportError() method of the IGeoProgressProxy object for details.
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::ValidateGeometryParameters
...
public: Geo::s32 ValidateGeometryParameters
(
const IPrecompInputGeometry * pGeometry,
Geo::s32 * oOutputPixelLowerBound,
Geo::IGeoProgressProxy * progress
)
...
Examine the incoming geometry and determine if the supplied parameters violate memory and performance limits.
This function will compute a lower bound on the number of output pixels, based on the surface area of the geometry and its output pixel size. If this lower bound exceeds the maximum size of a system then the function will fail. This is only intended as a sanity check, to catch the case where the output pixel size mismatches the geometry by order(s) of magnitude.
Parameters
[in] | pGeometry | The geometry to validate. |
[in] | oOutputPixelLowerBound | Optional pointer to receive the lower bound on the number of pixels as output, if required. |
[in] | progress | This object is updated during this function call to give feeback on progress |
Returns
0 on success, non-zero if the validation fails.
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::ValidateRegionParameters
...
public: Geo::s32 ValidateRegionParameters
(
float voxelSize,
ProbeOctreeResolution resolution,
const PrecompMeshInstanceView & mesh,
Geo::IGeoProgressProxy * progress
)
...
Examine the incoming region and determine if the supplied parameters violate memory and performance limits.
Returns
Returns zero if successful, non-zero if the validation fails.
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::ValidateRegionParameters
...
public: Geo::s32 ValidateRegionParameters
(
float voxelSize,
ProbeOctreeResolution resolution,
Geo::StridedArrayView< Geo::v128 > points,
Geo::IGeoProgressProxy * progress
)
...
Examine the incoming region and determine if the supplied parameters violate memory and performance limits.
Returns
Returns zero if successful, non-zero if the validation fails.
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::ValidateRegionParameters
...
public: Geo::s32 ValidateRegionParameters
(
float voxelSize,
ProbeOctreeResolution resolution,
Geo::StridedArrayView< Geo::GeoBoundingBox > boxes,
Geo::IGeoProgressProxy * progress
)
...
Examine the incoming region and determine if the supplied parameters violate memory and performance limits.
Returns
Returns zero if successful, non-zero if the validation fails.