...
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
...
EMinimumCompatibleVersion
public: enum EMinimumCompatibleVersion
{
emcvEnlighten3
}
...
ValidateRegionParameters(float, ProbeOctreeResolution, const PrecompMeshInstanceView &, Geo::IGeoProgressProxy *) | Examine the incoming region and determine if the supplied parameters violate memory and performance limits. |
ValidateRegionParameters(float, ProbeOctreeResolution, Geo::StridedArrayView< Geo::v128 >, Geo::IGeoProgressProxy *) | Examine the incoming region and determine if the supplied parameters violate memory and performance limits. |
ValidateRegionParameters(float, ProbeOctreeResolution, Geo::StridedArrayView< Geo::GeoBoundingBox >, Geo::IGeoProgressProxy *) | Examine the incoming region and determine if the supplied parameters violate memory and performance limits. |
Anchor | ||||
---|---|---|---|---|
|
EMinimumCompatibleVersion
...
public: enum EMinimumCompatibleVersion
{
emcvEnlighten3
}
...
Controls if Precompute should generate data that can be used by older Enlighten run time APIs.
...
[in] | pProbeSet | The SH probe set definition |
[in] | ppClusterings | The list 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,
const PointProjectionSurface * surfaceArray,
Geo::s32 numSurfaces,
const PointProjectionVersion * versionArray,
Geo::s32 numVersions,
const PointProjectionOptions * projectionOptions,
Geo::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.
...
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); |
...
.
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 IPrecompInputGeometry IPrecompPackedGeometry *const * pInputGeomspPackedGeoms,
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 instancesthe 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] | pInputGeomspPackedGeoms | A collection of input packed geometry objects, referred to by the above. |
[in] | numGeoms | How many entries in the pInputGeoms 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 IPrecompPackedGeometry IPrecompInputGeometry *const * pPackedGeomspInputGeoms,
Geo::s32 numGeoms,
float voxelSizeInPixelSizeUnits,
Geo::IGeoProgressProxy * progress,
IPrecompGeneratedSystems *& oSystems
)
...
Split the input system into automatically generated systems.
Note that instances which have terrain instances geometry 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 generatedsystem than regular instances.
Parameters
[in] | pInputSystem | The input system that will be split. |
[in] | pPackedGeomspInputGeoms | A collection of packed input geometry objects, referred to by the above. |
[in] | numGeoms | How many entries in the pPackedGeoms 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. |
...
[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 IPrecompPackedInstancesin 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 Release()
Free this object that was created within the Enlighten libraries.
Expect this to behave in a similar way to calling 'delete(this)'
...
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 SetCpuGpuModeSetMaxConcurrentRays
(
Geo::ECpuGpuMode modes32 totalRays
)
...
Sets the hardware mode for the Enlighten precomputetotal 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 SetCpuThreadMaxSetMemoryLimit
(
Geo::s32 maxThreadsMemoryLimitCallback callback
)
...
Sets the maximum number of threads that the Cpu mode will useSet a callback which can track and limit the total memory allocated by the precompute.
Anchor | ||||
---|---|---|---|---|
|
virtual
...
void Enlighten::IPrecompute::
...
SetMinimumCompatibleVersion
...
public: bool SetLicensevoid SetMinimumCompatibleVersion
(
const char * licenseData,
Geo::s32 licenseLength
)Set the license string. Must set before any precompute action EMinimumCompatibleVersion minimumVersion
)
...
Sets the minimum version of Enlighten, precompute should generate data for (default is emcvEnlighten3).
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompute::
...
SetStateDump
...
public: void SetMaxConcurrentRaysSetStateDump
(
Geo::s32 totalRays EStateDump state
)
...
Sets the total number of rays that the precompute will generate at one time. Set this only if you are concerned about memory pressurelevel of reproduction data saved by the IPrecompute tasks.
Anchor | ||||
---|---|---|---|---|
|
virtual
...
bool Enlighten::IPrecompute::
...
SetStateDumpFolder
...
public: void SetMemoryLimitbool SetStateDumpFolder
(
Geo::MemoryLimitCallback callbackconst char * folder
)
...
Set a callback which can track and limit the total memory allocated by the precomputeSets the folder that shall contain reproduction data for the IPrecompute tasks.
Anchor | ||||
---|---|---|---|---|
|
virtual
...
Geo::s32 Enlighten::IPrecompute::
...
StitchProbeOctree
...
public: void SetMinimumCompatibleVersion: Geo::s32 StitchProbeOctree
(
EMinimumCompatibleVersion minimumVersion
)
Sets the minimum version of Enlighten, precompute should generate data for (default is emcvEnlighten3).
...
virtual void Enlighten::IPrecompute::SetStateDump
public: void SetStateDump
(
EStateDump state
)
Sets the level of reproduction data saved by the IPrecompute tasks.
...
virtual bool Enlighten::IPrecompute::SetStateDumpFolder
public: bool SetStateDumpFolder
(
const char * folder
)
Sets the folder that shall contain reproduction data for the IPrecompute tasks.
...
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 StitchProbeOctree ValidateBuildParameters
(
const IPrecompProbeOctree IPrecompInputSystem * probeOctreepSystem,
const IPrecompProbeOctreeLayout IPrecompInputGeometry *const * otherLayoutsppGeometry,
Geo::s32 otherCount numGeometries,
bool estimateNumOutputPixels,
bool estimateNumClusters,
Geo::IGeoProgressProxy * progress,
IPrecompOutputProbeOctree *& outputOctree
)
Stitch one octree with others to produce an output probe octree.
Parameters
...
)
...
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] | otherLayouts | The set of other octree layouts that may overlapestimateNumOutputPixels | True if the estimated number of output pixels that the system will require should be estimated and validated, false if not. | |
[in] | otherCount | The estimateNumClusters | True if the estimated number of entries in the above arrayclusters 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 | [out] | outputOctree | The stitched output probe octree
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 ValidateBuildParameters ValidateGeometryParameters
(
const IPrecompInputSystem IPrecompInputGeometry * pSystempGeometry,
const IPrecompInputGeometry *const * ppGeometry Geo::s32 * oOutputPixelLowerBound,
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 limitsIGeoProgressProxy * 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] | pSystempGeometry | The system geometry 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 oOutputPixelLowerBound | Optional pointer to receive the lower bound on the number of pixels as output, if required. |
[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 | 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. Please refer to the errors reported via the ReportError() method of the IGeoProgressProxy object for details.
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompute::
...
ValidateRegionParameters
...
public: Geo::s32 ValidateGeometryParameters ValidateRegionParameters
(
float voxelSize,
const IPrecompInputGeometry * pGeometry ProbeOctreeResolution resolution,
Geo::s32 * oOutputPixelLowerBoundStridedArrayView< Geo::v128 > points,
Geo::IGeoProgressProxy * progress
)
...
Examine the incoming geometry region 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
...
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.
...