Versions Compared

Key

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

Operations relating to input lighting generation for the Enlighten runtime.

This is the original input lighting api. Note that there is a new 'extended' input lighting api available on most platforms through EnlightenInputLighting.h.

There is a considerable amount of freedom in how you choose to provide input lighting to Enlighten and the design trade-offs involved can have a huge impact on the success of Enlighten in your product. Most games are unique in some respect, so please feel free to contact Enlighten support for help in choosing the best option for your game.

There are also now two apis for providing input lighting to Enlighten. This one (the original api) and a newer 'extended' input lighting api, available through EnlightenInputLighting.h. They both use the same InputWorkspace structure and have other elements in common, but differ in how the calculation is performed, and the extended api supports additional features.

Enlighten uses a physically realistic algorithm for bouncing indirect light around a scene (subject to the tweakable albedo and bounce scale values), but makes no particular assumptions about the direct lighting model.

In practice, it's often more convenient to use a non-physical fall-off model for spot and point lights. They can be simpler to work with, reduce artefacts, and given the limitations of output displays it's often the only way to produce the desired effect.

Because of this, Enlighten allows users to specify a custom distance fall-off for point and spot light using the Enlighten::InputLightFalloffTable. Now, it is worth emphasising that there needn't be an exact correspondence between the model used for direct, on-screen lighting and the model used for producing input lighting for Enlighten. The closer the two models correspond, the more self-consistent the lighting model as a whole; on the other hand, if the Enlighten input lighting uses a completely non-physical model, it can produce counter-intuitive effects. (One example would be that the amount of light in the scene could vary wildly as a light source of constant intensity is moved closer to or further away from geometry; as soon as the model is non-physical, energy is not necessarily conserved.)

For convenience, Enlighten provides two API functions for generating suitable fall-off tables: Enlighten::GenerateUnrealCompatibleLightFalloffTable(), Enlighten::GenerateUnityCompatibleLightFalloffTable() and Enlighten::GenerateInverseSquaredLightFalloffTable(). See also the Enlighten::InputLight class.

Classes

NameDescription
Enlighten::InputLightBase

A base class all light types must derive from to work with any input lighting API.

Enlighten::InputLightFalloffTable

Class encapsulating the description of a light falloff curve.

Enlighten::InputLightingBuffer

A single frame of the InputWorkspace lighting (internal).

Enlighten::InputWorkspaceDebugPoint

A structure for receiving the data held internally about a duster point for debugging visualisation purposes.

Enlighten::PrecomputedVisibilityData

Runtime data storing precomputed visibility information (eg, for directional lights)

Enlighten::PrecomputedVisibilityWorkspace

Runtime data allocated by end user that stores uncompressed precomputed visibility data.

Enlighten::VisibilityFormat

Supported formats for visibility data.

Variables

NameDescription
void *const LIGHT_VISIBILITY_DISABLED = (void*)1

Equivalent to light visibility data with all bits set to 0.

Functions

NameDescription
AddCachedValuesToInputWorkspace(const InputWorkspace *, InputLightingBuffer *, const InputLightingBuffer *)

Adds light values from one input lighting buffer to another.

AddDusterValuesToInputWorkspace(const InputWorkspace *, InputLightingBuffer *, const Geo::v128 *)

Adds light values laid out in a duster block to an Enlighten input workspace.

CalcInputLightingBufferSize(const InputWorkspace *, PrecisionHint::Value)

Tells you the amount of memory required to hold input lighting for a given system.

CalcLightVisibilitySize(const InputWorkspace *, eLightType)

Determine how much memory is required for a light visibility block.

CalcLightVisibilitySize(const InputWorkspace *, Enlighten::VisibilityFormat::Type)

Determine how much memory is required for a light visibility block.

CalcPrecomputedVisibilityWorkspaceSize(const InputWorkspace *, const PrecomputedVisibilityData *)

Determine how much memory is required for a precomputed visibility workspace.

ClearInputWorkspace(const InputWorkspace *, InputLightingBuffer *)

Clear the input lighting to black.

CompareInputLightingBuffers(Geo::Statistics &, const InputLightingBuffer *, const InputLightingBuffer *)

Compares Returns true if the lighting buffers could be compared.

CreateInputLightingBuffer(void *, const InputWorkspace *, PrecisionHint::Value)

Construct an InputLightingBuffer inside the memory provided.

CreatePrecomputedVisibilityWorkspace(void *, const InputWorkspace *, const PrecomputedVisibilityData *)

Construct an PrecomputedVisibilityWorkspace inside the memory provided.

GenerateInverseSquaredLightFalloffTable(InputLightFalloffTable *, float, float)

Helper function that generates a Falloff Table using an inverse squared light falloff function, closely approximating real world light falloff.

GenerateUnityCompatibleLightFalloffTable(InputLightFalloffTable *)

Helper function that generates a falloff table compatible with the Unity light falloff model.

GenerateUnrealCompatibleLightFalloffTable(InputLightFalloffTable *, float)

Helper function that generates a Falloff Table compatible with the Unreal light falloff model.

GetInputLightingBufferLightValue(const InputLightingBuffer *, float, Geo::s32)

Fill the specified array with the current light value for the given cluster index.

GetInputLightingBufferSize(const InputLightingBuffer *)

Returns the size of the specified InputLightingBuffer object.

GetInputLightingBufferSystemId(const Enlighten::InputLightingBuffer *)

Get system id from InputLightingBuffer.

GetInputWorkspaceDebugIterator(const InputWorkspace *, Enlighten::InputWorkspaceDebugIterator &)

Return a debug iterator object in {debugIterator} which can be used to iterate through the systems debug points.

GetInputWorkspaceDebugPoint(const InputWorkspace *, InputWorkspaceDebugPoint *, Geo::s32)

Fill the specified debug data structure with the current values for the given input workspace sample point.

GetInputWorkspaceLitDebugPoint(const InputWorkspace *, InputWorkspaceDebugPoint *, Geo::s32, const InputLightingBuffer *)

Fill the specified debug data structure with the current values for the given input workspace sample point.

GetInputWorkspaceNormalArray(const InputWorkspace *, Geo::v128 *)

Fills an array with the normals of all of the input points in an input workspace.

GetInputWorkspaceNumPointsPerClusterArray(const InputWorkspace *, Geo::s32 *)

Fills the array with the number of points per cluster.

GetInputWorkspacePositionAndNormalArray(const InputWorkspace *, Geo::v128 *, Geo::v128 *)

Fills arrays with the positions and normals of all of the input points in an input workspace.

GetInputWorkspacePositionArray(const InputWorkspace *, Geo::v128 *)

Fills an array with the positions of all of the input points in an input workspace.

GetInputWorkspaceSize(const InputWorkspace *)

Returns the size of the specified InputWorkspace object.

GetNumberOfClustersInInputWorkspace(const InputWorkspace *)

Returns the total number of clusters in an input workspace.

GetNumberOfOutputBuckets(const RadSystemCore *)

Returns the total number of output buckets.

GetNumberOfOutputPixels(const RadSystemCore *)

Returns the total number of output pixels being lit.

GetNumberOfOutputPixelsInBucket(const RadSystemCore *, const Geo::s32 &)

Returns the total number of output pixels in the given bucket.

GetNumberOfPointsInInputWorkspace(const InputWorkspace *)

Returns the total number of sample duster points in an input workspace.

GetNumberOfTreeClustersInInputWorkspace(const InputWorkspace *)

Returns the total number of tree clusters in an input workspace.

GetPrecomputedVisibilityDataSize(const PrecomputedVisibilityData *)

Returns the size of the specified PrecomputedVisibilityData object.

GetSystemBoundingBox(const InputWorkspace *, Geo::GeoBoundingBox &)

Returns the axis-aligned bounding box of the set of input points in the input workspace.

GetSystemBounds(const InputWorkspace *, Geo::GeoBoundingBox &)

Retrieve the bounding volume of the system.

SetDirectionalVisibility(const InputWorkspace *, const PrecomputedVisibilityData *, PrecomputedVisibilityWorkspace *, void *, Geo::v128)

Set visibility in an input workspace for a directional light, using precomputed visibility data.

VerifyInputLightingBufferData(const InputLightingBuffer *)

Returns true if there are no NaN's or non-finite numbers in the specified InputLightingBuffer object.

WriteInputLightingBuffer(const Enlighten::InputLightingBuffer *, Enlighten::InputLightingBuffer *)

Overwrite an InputLightingBuffer with another InputLightingBuffer.

Enums

NameDescription
eLightType

Different types of Enlighten input lights.

Typedefs

NameDescription
Geo::s32 LightTypeId

LightTypeIds type.


Anchor
a82539bac6c75fc3abe49c847ffc3d959
a82539bac6c75fc3abe49c847ffc3d959

bool GEO_CALL Enlighten::AddCachedValuesToInputWorkspace

...

public: bool GEO_CALL AddCachedValuesToInputWorkspace
(
    const InputWorkspace * workspaceMemory,
    InputLightingBuffer * output,
    const InputLightingBuffer * cachedValues
)

...

Adds light values from one input lighting buffer to another.

Parameters
[in]workspaceMemory

The input workspace memory block used in the two buffers.

[in]output

The input lighting that is added to.

[in]cachedValues

The input lighting to add.


Anchor
ae3556acbea1645f7f8063fe42745575b
ae3556acbea1645f7f8063fe42745575b

bool GEO_CALL Enlighten::AddDusterValuesToInputWorkspace

...

public: bool GEO_CALL AddDusterValuesToInputWorkspace
(
    const InputWorkspace * workspaceMemory,
    InputLightingBuffer * output,
    const Geo::v128 * dusterValues
)

...

Adds light values laid out in a duster block to an Enlighten input workspace.

Parameters
[in]workspaceMemory

The input workspace memory block.

[in]output

The lighting buffer to fill with data.

[in]dusterValues

The linear light colour values for the duster array of point samples. The duster (its size, positions, normals etc.) must match the one originally passed to CreateInputWorkspace.


Anchor
aa65d338070e0071c644a9e5ef5b2febc
aa65d338070e0071c644a9e5ef5b2febc

Geo::u32 GEO_CALL Enlighten::CalcInputLightingBufferSize

...

public: Geo::u32GEO_CALL CalcInputLightingBufferSize
(
    const InputWorkspace * inputWorkspace,
    PrecisionHint::Value precisionHint
)

...

Tells you the amount of memory required to hold input lighting for a given system.

Parameters
[in]inputWorkspace

The InputWorkspace for the system.

[in]precisionHint

The hint to what floating point precision to use.

Returns

Required memory in bytes, 0xFFFFFFFF upon error.


Anchor
a86594c597c45e98a35dd55eb6abece09
a86594c597c45e98a35dd55eb6abece09

Geo::u32 GEO_CALL Enlighten::CalcLightVisibilitySize

...

public: Geo::u32GEO_CALL CalcLightVisibilitySize
(
    const InputWorkspace * workspaceMemory,
    eLightType lightType
)

...

Determine how much memory is required for a light visibility block.

Directional lights store a byte per cluster, all other lights store a bit per input sample (duster).

Parameters
[in]workspaceMemory

The input workspace memory block.

[in]lightType

Type of light; one of the Enlighten light type constants, e.g. LIGHT_TYPE_DIRECTIONAL_LIGHT

Returns

Required memory in bytes, 0xFFFFFFFF upon error.


Anchor
aa8c925bd25b15b15b961a482d472c009
aa8c925bd25b15b15b961a482d472c009

Geo::u32 GEO_CALL Enlighten::CalcLightVisibilitySize

...

public: Geo::u32GEO_CALL CalcLightVisibilitySize
(
    const InputWorkspace * workspaceMemory,
    Enlighten::VisibilityFormat::Type visibilityType
)

...

Determine how much memory is required for a light visibility block.

Directional lights store a byte per cluster, all other lights store a bit per input sample (duster).

Parameters
[in]workspaceMemory

The input workspace memory block.

[in]visibilityType

Format of the visibility. Must be one of the types defined in VisibilityFormat

Returns

Required memory in bytes, 0xFFFFFFFF upon error.


Anchor
a73f20762dd6462f4ce6f30c5a56a9df4
a73f20762dd6462f4ce6f30c5a56a9df4

Geo::u32 GEO_CALL Enlighten::CalcPrecomputedVisibilityWorkspaceSize

...

public: Geo::u32GEO_CALL CalcPrecomputedVisibilityWorkspaceSize
(
    const InputWorkspace * workspaceMemory,
    const PrecomputedVisibilityData * precomputedVisibilityData
)

...

Determine how much memory is required for a precomputed visibility workspace.

Parameters
[in]workspaceMemory

The input workspace memory block.

[in]precomputedVisibilityData

The block of precomputed visibilty data.

Returns

Required memory in bytes, 0xFFFFFFFF upon error.


Anchor
a4becaf4d8e400f230fa70a34cde6deba
a4becaf4d8e400f230fa70a34cde6deba

bool GEO_CALL Enlighten::ClearInputWorkspace

...

public: bool GEO_CALL ClearInputWorkspace
(
    const InputWorkspace * workspaceMemory,
    InputLightingBuffer * buffer
)

...

Clear the input lighting to black.

This wipes out all bounced light for all previous iterations. Used when "starting over".

Parameters
[in]workspaceMemory

The input workspace this buffer is used in.

[in]buffer

The lighting buffer to clear.


Anchor
a384fa1598ec7809c14f95a660c2deda9
a384fa1598ec7809c14f95a660c2deda9

bool GEO_CALL Enlighten::CompareInputLightingBuffers

...

public: bool GEO_CALL CompareInputLightingBuffers
(
    Geo::Statistics & res,
    const InputLightingBuffer * bufA,
    const InputLightingBuffer * bufB
)

...

Compares Returns true if the lighting buffers could be compared.

Parameters
[inout]res

- The result of the comparison. Only written if the function succeeded.

[in]bufA

- The first InputLightingBuffer to compare.

[in]bufB

- The second InputLightingBuffer to compare.


Anchor
a7f03b62f97a07e87f15000e0c23a87d3
a7f03b62f97a07e87f15000e0c23a87d3

InputLightingBuffer* GEO_CALL Enlighten::CreateInputLightingBuffer

...

public: InputLightingBuffer *GEO_CALL CreateInputLightingBuffer
(
    void * memory,
    const InputWorkspace * inputWorkspace,
    PrecisionHint::Value precisionHint
)

...

Construct an InputLightingBuffer inside the memory provided.

Parameters
[in]memory

A block of memory (size determined by CalcInputLightingBufferSize) to store the lighting buffer

[in]inputWorkspace

The InputWorkspace for the system.

[in]precisionHint

The hint to what floating point precision to use.


Anchor
a9d7a58788c80fb8620e947489dc18e8c
a9d7a58788c80fb8620e947489dc18e8c

PrecomputedVisibilityWorkspace* GEO_CALL Enlighten::CreatePrecomputedVisibilityWorkspace

...

public: PrecomputedVisibilityWorkspace *GEO_CALL CreatePrecomputedVisibilityWorkspace
(
    void * memory,
    const InputWorkspace * workspaceMemory,
    const PrecomputedVisibilityData * precomputedVisibilityData
)

...

Construct an PrecomputedVisibilityWorkspace inside the memory provided.

Parameters
[in]memory

A block of memory (size determined by CalcPrecomputedVisibilityWorkspaceSize) to store the visibility workspace

[in]workspaceMemory

The input workspace memory block.

[in]precomputedVisibilityData

The block of precomputed visibilty data.


Anchor
a0e128414f1bcfc314ea099c86dd69231
a0e128414f1bcfc314ea099c86dd69231

bool GEO_CALL Enlighten::GenerateInverseSquaredLightFalloffTable

...

public: bool GEO_CALL GenerateInverseSquaredLightFalloffTable
(
    InputLightFalloffTable * lightTable,
    float lightFalloffDistance,
    float lightRadius
)

...

Helper function that generates a Falloff Table using an inverse squared light falloff function, closely approximating real world light falloff.

Light falloff is smoothly biased to zero as it approaches the cutoff.

Parameters
[out]lightTable

The Input Light Falloff Table to write to.

[in]lightFalloffDistance

The falloff distance the light table will represent, typically (m_Cutoff - m_Radius), must be > 0.

[in]lightRadius

The radius of the simulated light source, typically m_Radius or 1.0, must be > 0.


Anchor
a23a0a2877a8daa62418a25a7c9f90976
a23a0a2877a8daa62418a25a7c9f90976

bool GEO_CALL Enlighten::GenerateUnityCompatibleLightFalloffTable

...

public: bool GEO_CALL GenerateUnityCompatibleLightFalloffTable
(
    InputLightFalloffTable * lightTable
)

...

Helper function that generates a falloff table compatible with the Unity light falloff model.

Parameters
[out]lightTable

The input light falloff table to write to.


Anchor
ab7b43bf74d6e72cac480668be60e4cd3
ab7b43bf74d6e72cac480668be60e4cd3

bool GEO_CALL Enlighten::GenerateUnrealCompatibleLightFalloffTable

...

public: bool GEO_CALL GenerateUnrealCompatibleLightFalloffTable
(
    InputLightFalloffTable * lightTable,
    float falloffExponent
)

...

Helper function that generates a Falloff Table compatible with the Unreal light falloff model.

Parameters
[out]lightTable

The Input Light Falloff Table to write to.

[in]falloffExponent

The falloff exponent of the light, must be > 0.


Anchor
af056da4029ff9e4f726775e37748ab8c
af056da4029ff9e4f726775e37748ab8c

bool GEO_CALL Enlighten::GetInputLightingBufferLightValue

...

public: bool GEO_CALL GetInputLightingBufferLightValue
(
    const InputLightingBuffer * inputLightingBuffer,
    float lightValue,
    Geo::s32 clusterIdx
)

...

Fill the specified array with the current light value for the given cluster index.


Anchor
ad96162d76db8e043b8a6a934fc91c8aa
ad96162d76db8e043b8a6a934fc91c8aa

Geo::u32 GEO_CALL Enlighten::GetInputLightingBufferSize

...

public: Geo::u32GEO_CALL GetInputLightingBufferSize
(
    const InputLightingBuffer * inputLightingBuffer
)

...

Returns the size of the specified InputLightingBuffer object.

Parameters
[in]inputLightingBuffer

The InputLightingBuffer to query.

Returns

Required memory in bytes, 0xFFFFFFFF upon error.


Anchor
a6fc3e48b597bce7f9e3c6f156cdebc6d
a6fc3e48b597bce7f9e3c6f156cdebc6d

Geo::GeoGuid GEO_CALL Enlighten::GetInputLightingBufferSystemId

...

public: Geo::GeoGuidGEO_CALL GetInputLightingBufferSystemId
(
    const Enlighten::InputLightingBuffer * inputLightingBuffer
)

...

Get system id from InputLightingBuffer.

Parameters
[in]inputLightingBuffer

The InputLightingBuffer to query.


Anchor
a100416686ea51956f367f6676b165c5b
a100416686ea51956f367f6676b165c5b

bool GEO_CALL Enlighten::GetInputWorkspaceDebugIterator

...

public: bool GEO_CALL GetInputWorkspaceDebugIterator
(
    const InputWorkspace * inputWorkspace,
    Enlighten::InputWorkspaceDebugIterator & debugIterator
)

...

Return a debug iterator object in {debugIterator} which can be used to iterate through the systems debug points.


Anchor
a5aedbb4713a321dd16d3cc559d9906d2
a5aedbb4713a321dd16d3cc559d9906d2

bool GEO_CALL Enlighten::GetInputWorkspaceDebugPoint

...

public: bool GEO_CALL GetInputWorkspaceDebugPoint
(
    const InputWorkspace * inputWorkspace,
    InputWorkspaceDebugPoint * debugPoint,
    Geo::s32 index
)

...

Fill the specified debug data structure with the current values for the given input workspace sample point.

Does not include lighting.


Anchor
ad10736001649ac2dabe0a289492ed2ea
ad10736001649ac2dabe0a289492ed2ea

bool GEO_CALL Enlighten::GetInputWorkspaceLitDebugPoint

...

public: bool GEO_CALL GetInputWorkspaceLitDebugPoint
(
    const InputWorkspace * inputWorkspace,
    InputWorkspaceDebugPoint * debugPoint,
    Geo::s32 index,
    const InputLightingBuffer * lightValues
)

...

Fill the specified debug data structure with the current values for the given input workspace sample point.

Does not include albedo information, as this is part of the various albedo workspaces.


Anchor
a23c3e1e87ad765ff87e78673555726cd
a23c3e1e87ad765ff87e78673555726cd

bool GEO_CALL Enlighten::GetInputWorkspaceNormalArray

...

public: bool GEO_CALL GetInputWorkspaceNormalArray
(
    const InputWorkspace * inputWorkspace,
    Geo::v128 * normalsOut
)

...

Fills an array with the normals of all of the input points in an input workspace.

The array should be big enough to hold one vector for each point in the input workspace. The number of points is returned by GetNumberOfPointsInInputWorkspace().

Parameters
[in]inputWorkspace

The input workspace to use.

[out]normalsOut

Pointer to an array of vectors to write the normals to.

Info
titleSee Also

GetInputWorkspacePositionAndNormalArray()


Anchor
a852fd1fa027642157be61a4e4322dd62
a852fd1fa027642157be61a4e4322dd62

bool GEO_CALL Enlighten::GetInputWorkspaceNumPointsPerClusterArray

...

public: bool GEO_CALL GetInputWorkspaceNumPointsPerClusterArray
(
    const InputWorkspace * inputWorkspace,
    Geo::s32 * numPointsPerClusterArray
)

...

Fills the array with the number of points per cluster.

The points inside an input workspace are ordered and grouped by cluster, so you can identify which point belongs it which cluster from this information. You can also produce this information from GetInputWorkspaceDebugPoint() and GetInputWorkspaceLitDebugPoint(), but this implementation would be more efficient.

Parameters
[in]inputWorkspace

A valid input workspace.

[in]numPointsPerClusterArray

The array to fill. Must be at least as long as that returned by GetNumberOfClustersInInputWorkspace()

Returns

False on error, true otherwise.


Anchor
a65682c80b107fbade632cef0aa200182
a65682c80b107fbade632cef0aa200182

bool GEO_CALL Enlighten::GetInputWorkspacePositionAndNormalArray

...

public: bool GEO_CALL GetInputWorkspacePositionAndNormalArray
(
    const InputWorkspace * inputWorkspace,
    Geo::v128 * positionsOut,
    Geo::v128 * normalsOut
)

...

Fills arrays with the positions and normals of all of the input points in an input workspace.

This array can then be used for visibility computations (eg on the GPU).

Parameters
[in]inputWorkspace

The input workspace to use.

[out]positionsOut

Pointer to an array of vectors to write the positions to.

[out]normalsOut

Pointer to an array of vectors to write the normals to. Both arrays should be big enough to hold one vector for each point in the input workspace. The number of points is returned by GetNumberOfPointsInInputWorkspace().

Info
titleSee Also

GetInputWorkspacePositionArray()


Anchor
a2e6e9b7610fa757217994f52ec26e4b6
a2e6e9b7610fa757217994f52ec26e4b6

bool GEO_CALL Enlighten::GetInputWorkspacePositionArray

...

public: bool GEO_CALL GetInputWorkspacePositionArray
(
    const InputWorkspace * inputWorkspace,
    Geo::v128 * positionsOut
)

...

Fills an array with the positions of all of the input points in an input workspace.

This array can then be used for visibility computations (eg on the GPU). The array should be big enough to hold one vector for each point in the input workspace. The number of points is returned by GetNumberOfPointsInInputWorkspace().

Parameters
[in]inputWorkspace

The input workspace to use.

[out]positionsOut

Pointer to an array of vectors to write the positions to.

Info
titleSee Also

GetInputWorkspacePositionAndNormalArray()


Anchor
a1476905cdc08d0d036b49274f03ed9da
a1476905cdc08d0d036b49274f03ed9da

Geo::u32 GEO_CALL Enlighten::GetInputWorkspaceSize

...

public: Geo::u32GEO_CALL GetInputWorkspaceSize
(
    const InputWorkspace * inputWorkspace
)

...

Returns the size of the specified InputWorkspace object.

Returns

Memory used in bytes, 0xFFFFFFFF upon error.


Anchor
a0f21f409c07f600363b6b39ecaff923f
a0f21f409c07f600363b6b39ecaff923f

Geo::s32 GEO_CALL Enlighten::GetNumberOfClustersInInputWorkspace

...

public: Geo::s32GEO_CALL GetNumberOfClustersInInputWorkspace
(
    const InputWorkspace * inputWorkspace
)

...

Returns the total number of clusters in an input workspace.

Returns

Number of clusters, -1 upon error.


Anchor
a8819ad1c772cc0214e17b583daee3812
a8819ad1c772cc0214e17b583daee3812

Geo::s32 GEO_CALL Enlighten::GetNumberOfOutputBuckets

...

public: Geo::s32GEO_CALL GetNumberOfOutputBuckets
(
    const RadSystemCore * radCore
)

...

Returns the total number of output buckets.

Returns

Number of buckets, -1 upon error.


Anchor
a8c7d0e163a91b7e0abafcd7cac460024
a8c7d0e163a91b7e0abafcd7cac460024

Geo::s32 GEO_CALL Enlighten::GetNumberOfOutputPixels

...

public: Geo::s32GEO_CALL GetNumberOfOutputPixels
(
    const RadSystemCore * radCore
)

...

Returns the total number of output pixels being lit.

Returns

Number of pixels, -1 upon error.


Anchor
a94dfb3a821c80cddb23586d9e552d7f5
a94dfb3a821c80cddb23586d9e552d7f5

Geo::s32 GEO_CALL Enlighten::GetNumberOfOutputPixelsInBucket

...

public: Geo::s32GEO_CALL GetNumberOfOutputPixelsInBucket
(
    const RadSystemCore * radSysCore,
    const Geo::s32 & bucketIdx
)

...

Returns the total number of output pixels in the given bucket.

Returns

Number of pixels in bucket, -1 upon error.


Anchor
a78c2da3b3602b9e1463f970230ff46c9
a78c2da3b3602b9e1463f970230ff46c9

Geo::s32 GEO_CALL Enlighten::GetNumberOfPointsInInputWorkspace

...

public: Geo::s32GEO_CALL GetNumberOfPointsInInputWorkspace
(
    const InputWorkspace * inputWorkspace
)

...

Returns the total number of sample duster points in an input workspace.

Returns

Number of points, -1 upon error.


Anchor
a5c62e4065e5ea8a28decca6404e8a2f2
a5c62e4065e5ea8a28decca6404e8a2f2

Geo::s32 GEO_CALL Enlighten::GetNumberOfTreeClustersInInputWorkspace

...

public: Geo::s32GEO_CALL GetNumberOfTreeClustersInInputWorkspace
(
    const InputWorkspace * inputWorkspace
)

...

Returns the total number of tree clusters in an input workspace.

Returns

Number of tree clusters, -1 upon error.


Anchor
a5306e09492234a7abb423bbfe1445555
a5306e09492234a7abb423bbfe1445555

Geo::u32 GEO_CALL Enlighten::GetPrecomputedVisibilityDataSize

...

public: Geo::u32GEO_CALL GetPrecomputedVisibilityDataSize
(
    const PrecomputedVisibilityData * visibilityData
)

...

Returns the size of the specified PrecomputedVisibilityData object.

Returns

Memory used in bytes, 0xFFFFFFFF upon error.


Anchor
af2abec842d147dc098c261b3e06d6d99
af2abec842d147dc098c261b3e06d6d99

bool GEO_CALL Enlighten::GetSystemBoundingBox

...

public: bool GEO_CALL GetSystemBoundingBox
(
    const InputWorkspace * inputWorkspace,
    Geo::GeoBoundingBox & bb
)

...

Returns the axis-aligned bounding box of the set of input points in the input workspace.

Parameters
[in]inputWorkspace

The input workspace to compute the bounding box for.

[out]bb

The bounding box object to receive the system bounds.


Anchor
a880b981b978fe2369e24bb11e554aa21
a880b981b978fe2369e24bb11e554aa21

bool GEO_CALL Enlighten::GetSystemBounds

...

public: bool GEO_CALL GetSystemBounds
(
    const InputWorkspace * inputWorkspace,
    Geo::GeoBoundingBox & boundingBox
)

...

Retrieve the bounding volume of the system.

Parameters
[in]inputWorkspace

The input workspace for the system

[out]boundingBox

The bounding box for the system


Anchor
aa58254c1886fe823b04bfca9a45d8aeb
aa58254c1886fe823b04bfca9a45d8aeb

bool GEO_CALL Enlighten::SetDirectionalVisibility

...

public: bool GEO_CALL SetDirectionalVisibility
(
    const InputWorkspace * workspaceMemory,
    const PrecomputedVisibilityData * precomputedVisibilityData,
    PrecomputedVisibilityWorkspace * visibilityWorkspace,
    void * visibilityData,
    Geo::v128 lightDirection
)

...

Set visibility in an input workspace for a directional light, using precomputed visibility data.

Parameters
[in]workspaceMemory

The input workspace memory block.

[in]precomputedVisibilityData

The block of precomputed visibility data.

[in]visibilityWorkspace

The visibility workspace memory block.

[in]visibilityData

The visibility data to set, one bit per duster.

[in]lightDirection

The direction of the light source.


Anchor
a8c893cc371617ff98e06add76aedde73
a8c893cc371617ff98e06add76aedde73

bool GEO_CALL Enlighten::VerifyInputLightingBufferData

...

public: bool GEO_CALL VerifyInputLightingBufferData
(
    const InputLightingBuffer * inputLightingBuffer
)

...

Returns true if there are no NaN's or non-finite numbers in the specified InputLightingBuffer object.

Parameters
[in]inputLightingBuffer

The InputLightingBuffer to query.


Anchor
a9fef80cd5ed60b22433ba2e38dc3bc15
a9fef80cd5ed60b22433ba2e38dc3bc15

bool GEO_CALL Enlighten::WriteInputLightingBuffer

...

public: bool GEO_CALL WriteInputLightingBuffer
(
    const Enlighten::InputLightingBuffer * source,
    Enlighten::InputLightingBuffer * destination
)

...

Overwrite an InputLightingBuffer with another InputLightingBuffer.

Fails if the system ids or sample counts do not match.

Parameters
[in]source

- The InputLightingBuffer to read.

[inout]destination

- The InputLightingBuffer to write.


Anchor
ade22cda01083e0acba8b42d99eca5ff5
ade22cda01083e0acba8b42d99eca5ff5

eLightType

...

public: enum eLightType
{
    LIGHT_TYPE_INVALID = -1,
    LIGHT_TYPE_SPOT_LIGHT = 0,
    LIGHT_TYPE_POINT_LIGHT = 1,
    LIGHT_TYPE_DIRECTIONAL_LIGHT = 2,
    LIGHT_TYPE_RECTANGLE_LIGHT = 3,
    LIGHT_TYPE_FRUSTUM_LIGHT = 4,
    LIGHT_TYPE_BOXSPOT_LIGHT = 5,
    LIGHT_TYPE_NUM_TYPES
}

...

Different types of Enlighten input lights.

enumerators
LIGHT_TYPE_INVALID

Invalid light type.

LIGHT_TYPE_SPOT_LIGHT

Spot light.

LIGHT_TYPE_POINT_LIGHT

Point light.

LIGHT_TYPE_DIRECTIONAL_LIGHT

Directional light.

LIGHT_TYPE_RECTANGLE_LIGHT

Rectangular area light (only available on PC)

LIGHT_TYPE_FRUSTUM_LIGHT

Frustum light.

LIGHT_TYPE_BOXSPOT_LIGHT

BoxSpot light.

LIGHT_TYPE_NUM_TYPES