module Low Level API

This is the documentation for Enlighten.

module Low Level API

This module contains the interfaces/objects used when dealing with the Low Level API.

Classes

Name

Description

Name

Description

Enlighten::InstanceDescMinimal

Minimal description of an instance.

Enlighten::IPrecompBuildParameters

A class containing various parameters and dials for the system level precompute process.

Enlighten::IPrecompCubeMapBuildParameters

Precompute parameters for cube maps.

Enlighten::IPrecompCubeMapCore

A class containing a data block that is used by the run-time to generate cube maps.

Enlighten::IPrecompDepthCubeMap

Handle to the depth cube map data.

Enlighten::IPrecompGeneratedSystems

Result of the the IPrecompute::CreateSystemsByVoxelisation() call.

Enlighten::IPrecompInputCubeMap

A class representing a cube map object which the run-time can generate dynamically.

Enlighten::IPrecompInputGeometry

Handle to the InputGeometry.

Enlighten::IPrecompInputItemDependencies

A collection of item dependencies.

Enlighten::IPrecompInputMesh

The standard precompute mesh input class.

Enlighten::IPrecompInputProbeOctree

Represents a region of 3D space within which sets of probe positions are adaptively generated.

Enlighten::IPrecompInputProbeRegion

Represents a region of 3D space voxelized at various resolutions.

Enlighten::IPrecompInputProbeSet

A class representing a set of sample points for which the run-time can generate spherical harmonic representations of the diffuse light incident on each sample point.

Enlighten::IPrecompInputSystem

Handle to the InputSystem.

Enlighten::IPrecompMeshValidation

An interface containing methods for analyzing meshes.

Enlighten::IPrecompOutputCubeMap

Handle to the precompute output data for cube maps.

Enlighten::IPrecompOutputProbeOctree

An octree of probe positions grouped into probe sets.

Enlighten::IPrecompOutputProbeSet

Handle to the LightTransport data for probesets.

Enlighten::IPrecompPackedGeometry

Handle to the PackedGeometry.

Enlighten::IPrecompPackedInstance

Handle to the PackedInstance.

Enlighten::IPrecompPackedSystem

Class encapsulating the geometry and additional data for a system, light-mapped or otherwise.

Enlighten::IPrecompProbeAtlasMaxima

Maximum values across the entire world, used to determine the resources required at runtime.

Enlighten::IPrecompProbeOctree

A class representing an octree which defines sets of probe positions within a volume.

Enlighten::IPrecompProbeOctreeLayout

The layout of an octree.

Enlighten::IPrecompProbeSetBuildParameters

A class defining parameters for SH sample probe building.

Enlighten::IPrecompProbeSetRadiosity

A class containing a set of data blocks that are used by the run-time to generate SH representations for the related IPrecompInputProbeSet.

Enlighten::IPrecompRadiosityNormalTexture

Handle to the radiosity normal texture.

Enlighten::IPrecompSystemClustering

Handle to the SystemClustering.

Enlighten::IPrecompSystemCompressedLightTransport

Handle to a compressed SystemLightTransport.

Enlighten::IPrecompSystemDependencies

Handle to the SystemDependencies.

Enlighten::IPrecompSystemDuster

Handle to the platform-agnostic input sample points (dusters).

Enlighten::IPrecompSystemLightTransport

Handle to the SystemLightTransport.

Enlighten::IPrecompSystemPreClustering

Handle to the SystemPreClustering.

Enlighten::IPrecompSystemRadiosity

Handle to the SystemRadiosity.

Enlighten::IPrecompSystemsDependencies

Holds IPrecompSystemDependencies for multiple systems.

Enlighten::IPrecompute

The Low Level Enlighten Precompute API.

Enlighten::PointProjectionOptions

Projection options for the point projection functionality.

Enlighten::PointProjectionSurface

A surface we can project points onto.

Enlighten::PointProjectionVersion

Description of the point projection of one instance to a set of surfaces.

Enlighten::PppiAtlasMaxima

The maximum number of atlas tiles and probes that may be concurrently allocated for the given combination of probe sets.

Enlighten::PrecompInputFace

A face (triangle) in EnlightenPrecomp input geometry.

Enlighten::PrecompInputInstance

A simple class housing the data required with each stand-alone instance of some geometry.

Enlighten::PrecompInputVertex

A vertex in EnlightenPrecomp input geometry.

Enlighten::PrecompMeshIdentifier

Simple struct to identify an IPrecompInputMesh with the name and GUID of the geom and the index and GUID of the mesh.

Enlighten::PrecompMeshInstanceView

A view into the mesh data associated with an instance.

Enlighten::PrecompMeshProperties

Properties of input meshes.

Enlighten::SystemDependencies

A list of system dependencies.

Enlighten::SystemGrouping

A groupings of instances into systems.

Geo::IdentVertLinkBuilder

A utility for identifying pairs of "identical" vertices in a vertex buffer.

Geo::IdxLink

A link between two vertices.

Geo::TriGroupSelection

Utility for doing vertex-based chart identification.

Functions

Name

Description

Name

Description

CalculateUvScaleAndWorldOutputPixelSize(float, const Geo::Matrix &, bool, float, Geo::s32 &, float &)

Utility to calculate the correct UV scaling and world-space output pixel size for a given instance of a given geometry.

ConvertInputSystemToIPrecompGeneratedSystem(Enlighten::IPrecompInputSystem *, const IPrecompInputGeometry *const *, Geo::s32, Enlighten::IPrecompGeneratedSystems *&)

Create an IPrecompGeneratedSystems object from inputSystem.

CreateDebugEnvironmentClustering(Geo::s32)

Creates a debug IClusteringOutput interface representing the clustering of an environment at the given resolution.

CreatePrecompute()

Create an instance of the Precompute.

CreateTriGroupsForPrecompInputMesh(const IPrecompInputMesh *)

Utility to create the tri group structure defined by the input mesh.

EstimateSystemDependencies(const Enlighten::InstanceDescMinimal< IPrecompInputGeometry > *, Geo::s32, const Enlighten::SystemGrouping *, Enlighten::SystemDependencies *&)

Estimate the dependencies between a set of systems.

EstimateSystemDependencies(const Enlighten::InstanceDescMinimal< IPrecompPackedGeometry > *, Geo::s32, const Enlighten::SystemGrouping *, Enlighten::SystemDependencies *&)

Estimate the dependencies between a set of systems.

GetOctreeCodeWorldPositionAndSize(PrecompOctreeCode, float)

Return the world space position (xyz) and size (w) of the octree block identified by the specified octree code with the specified voxel size.

IsClosedMesh(Geo::StridedArrayView< PrecompIndex3 >)

Return true if the mesh is closed.

RepairHoles(Geo::StridedArrayView< PrecompIndex3 >)

Return the faces which must be added to the mesh to repair holes.

StoreTemporaryScaleAndTranslation(Enlighten::PrecompOutputInstance *, Geo::s32, Geo::s32)

Utility to temporarily pack scale and translation into the PrecompOutputInstance object.

Enums

Name

Description

Name

Description

eAutoSimpMode

The UV auto generation / simplification mode for a mesh.

eMeshClassificationLightingType

Enumeration for reporting results of the first step of Mesh Classification (lightmap-lit or probe-lit).

ePrecompCubeMapQuality

Quality levels for the raytracing in the cube map precompute.

ePrecompQuality

Quality levels for majority of raytracing in the precompute, except cube maps.

GeometryBuildResult

Enumeration for reporting geometry build success/fail.

ProbeOctreeResolution

The resolution at which probes should be placed.

Typedefs

Name

Description

Name

Description

Geo::GeoPair< Geo::GeoGuid, Geo::u32 > MaterialGuidMapping

A mapping between a material GUID and a 32-bit material ID.

Geo::FixedSizeArray< Geo::s32, 3 > PrecompIndex3

An array of three indices.

Geo::FixedSizeArray< Geo::StridedArrayView< PrecompMeshInstanceView >, PROBEOCTREERESOLUTIONCOUNT > PrecompMeshProbeRegion

A region of 3D space defined by a set of meshes transformed and voxelized at various resolutions.

Geo::u64 PrecompOctreeCode

Identifies a block within the octree.

Variables

Name

Description

Name

Description

const float g_DependencyVisibilityThresholdDefault = 1.f / (1 << 8)

By default, do not consider a system as a dependency if its visibility is smaller than this threshold.



void GEO_CALL Enlighten::CalculateUvScaleAndWorldOutputPixelSize


public: void GEO_CALL CalculateUvScaleAndWorldOutputPixelSize
(
    float geomOutputPixelSize,
    const Geo::Matrix & instanceTransform,
    bool scaleUvsWithInstanceSize,
    float instanceAdditionalUvScale,
    Geo::s32 & outUvScale,
    float & outWorldOutputPixelSize
)


Utility to calculate the correct UV scaling and world-space output pixel size for a given instance of a given geometry.

This depends on the instance transform, the "ScaleUvsWithInstanceSize" flag on the instance, the "AdditionalUvScale" value on the instance and the output pixel size on the geom.

 

Parameters

[in]

geomOutputPixelSize

The unscaled pixel size

[in]

instanceTransform

The transform matrix for the instance

[in]

scaleUvsWithInstanceSize

Should the scaling of the transform of the instance be taken into account when generating the per-instance lightmap UVs (i.e. should the output pixel size specified for this instance be in world units (true) or in local geometry units (false))

[in]

instanceAdditionalUvScale

Specifies an additional scale that should be applied to the lightmap UVs for the geometry instance instance (to change the output pixel size). This is applied in addition to any scaling related to the ScaleUvsWithInstanceSize flag.

[out]

outUvScale

The UV scale for that instance

[out]

outWorldOutputPixelSize

The pixel size after instance UV scaling is applied

 



Geo::s32 GEO_CALL Enlighten::ConvertInputSystemToIPrecompGeneratedSystem


public: Geo::s32GEO_CALL ConvertInputSystemToIPrecompGeneratedSystem
(
    Enlighten::IPrecompInputSystem * inputSystem,
    const IPrecompInputGeometry *const * pInputGeoms,
    Geo::s32 numGeoms,
    Enlighten::IPrecompGeneratedSystems *& generatedSystem
)


Create an IPrecompGeneratedSystems object from inputSystem.

The generatedSystem object will have only one system in it (inputSystem) Note that the output object (generatedSystem) owns the input system, e.g. inputSystem will be destroyed when generatedSystem is destroyed.

Parameters

[in]

inputSystem

InputSystem to be converted to PrecompGeneratedSystem

[in]

pInputGeoms

array of geoms referenced by inputsystem

[in]

numGeoms

num of geoms in pInputGeoms

[out]

generatedSystem

IPrecompGeneratedSystems with one system in it.

Returns

0 if successful, otherwise a non-zero value.

 



Enlighten::IClusteringOutput* GEO_CALL Enlighten::CreateDebugEnvironmentClustering


public: Enlighten::IClusteringOutput *GEO_CALL CreateDebugEnvironmentClustering
(
    Geo::s32 environmentResolution
)


Creates a debug IClusteringOutput interface representing the clustering of an environment at the given resolution.



IPrecompute* Enlighten::CreatePrecompute


public: IPrecompute * CreatePrecompute()


Create an instance of the Precompute.



Geo::TriGroupSelection* GEO_CALL Enlighten::CreateTriGroupsForPrecompInputMesh


public: Geo::TriGroupSelection *GEO_CALL CreateTriGroupsForPrecompInputMesh
(
    const IPrecompInputMesh * inputMesh
)


Utility to create the tri group structure defined by the input mesh.

This can be used to generate the same tri groups the precompute will generate when given this mesh. The tri groups are determined by the connectivity in the index buffer (ie. shared vertices) and the links (Geo::IdxLink) specified or generated by the user.

 

Parameters

[in]

inputMesh

The input mesh.

The resulting structure should be released by the caller.

 

 

Returns

A valid tri group if successful, else null.

 



Geo::s32 GEO_CALL Enlighten::EstimateSystemDependencies


public: Geo::s32GEO_CALL EstimateSystemDependencies
(
    const Enlighten::InstanceDescMinimal< IPrecompInputGeometry > * instances,
    Geo::s32 numInstances,
    const Enlighten::SystemGrouping * iSystemGrouping,
    Enlighten::SystemDependencies *& oSystemDependencies
)


Estimate the dependencies between a set of systems.

Uses the instance bounding boxes to determine the system bounding boxes, and a collection of bounding box/sphere intersection tests to determine the dependencies. The function can be given either IPrecompInputGeometry or IPrecompPackedGeometry. Results will be identical.

 

Parameters

[in]

instances

The instances in the systems.

[in]

numInstances

The number of instances.

[in]

iSystemGrouping

A list of system groups. Each group contains indices into the input array of instances.

[out]

oSystemDependencies

The system dependencies.

Returns

0 if successful, otherwise a non-zero value.

 



Geo::s32 GEO_CALL Enlighten::EstimateSystemDependencies


public: Geo::s32GEO_CALL EstimateSystemDependencies
(
    const Enlighten::InstanceDescMinimal< IPrecompPackedGeometry > * instances,
    Geo::s32 numInstances,
    const Enlighten::SystemGrouping * iSystemGrouping,
    Enlighten::SystemDependencies *& oSystemDependencies
)


Estimate the dependencies between a set of systems.

Uses the instance bounding boxes to determine the system bounding boxes, and a collection of bounding box/sphere intersection tests to determine the dependencies. The function can be given either IPrecompInputGeometry or IPrecompPackedGeometry. Results will be identical.

 

Parameters

[in]