Versions Compared

Key

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

In order to bounce light from geometry, Enlighten needs some description of the surface colour - the "albedo" of the surface.

Enlighten will use the albedo colour to modulate the input lighting to compute the colour of the bounce light.

Classes

NameDescription
Enlighten::ClusterAlbedoWorkspaceMaterialData

Constitutes the precomputed material data for a system.

Enlighten::SurfaceColourDynamicity

A set of initialisers for the dynamicity of surface colours.

Enlighten::TextureResolutionScale

Specify the albedo/emissive texture resolution relative to the light map resolution.

Typedefs

NameDescription
Geo::GeoRGBXTextureElement CpuTextureElement

Structure defining the memory layout of CPU texture data used by Enlighten for texture albedo and emissive.

Geo::u64 SurfaceSelection

Selects a set of surfaces within a system.

Functions

NameDescription
CalcAlbedoBufferSize(const Enlighten::InputWorkspace *)

Calculate the size of the AlbedoBuffer for a system.

CalcDynamicMaterialWorkspaceSize(const ClusterAlbedoWorkspaceMaterialData *)

Calculate the size of the DynamicMaterialWorkspace.

CalcEmissiveBufferSize(const Enlighten::InputWorkspace *)

Calculate the size of the EmissiveBuffer for a system.

CalcTransparencyBufferSize(const Enlighten::InputWorkspace *)

Calculate the size of the TransparencyBuffer for a system.

CreateAlbedoBuffer(const Enlighten::InputWorkspace *, void *)

Create an AlbedoBuffer for a system.

CreateCompositeMaterialId(Geo::u16, Geo::u16, Geo::u32)

Determine the specific material ID for a given instance, mesh and 32-bit material ID.

CreateDynamicMaterialWorkspace(const ClusterAlbedoWorkspaceMaterialData *, void *)

Create a DynamicMaterialWorkspace which is used for dynamic updates of material colours at runtime.

CreateEmissiveBuffer(const Enlighten::InputWorkspace *, void *)

Create an EmissiveBuffer for a system.

CreateTransparencyBuffer(const Enlighten::InputWorkspace *, void *)

Create a TransparencyBuffer for a system.

EncodeRGBM(float *, float)

Utility function for converting floating point values to the RGBM format.

GetClusterAlbedoWorkspaceMaterialDataSize(const Enlighten::ClusterAlbedoWorkspaceMaterialData *)

Returns the size of the specified ClusterAlbedoWorkspaceMaterialData object.

GetClusterAlbedoWorkspaceMaterialIds(const Enlighten::ClusterAlbedoWorkspaceMaterialData *)

Returns a list of all material Ids referenced by this albedo workspace.

GetClusterAlbedoWorkspaceNumMaterials(const Enlighten::ClusterAlbedoWorkspaceMaterialData *)

Returns the number of material Ids referenced by this albedo workspace.

GetDebugAlbedoValue(const Geo::u32, const AlbedoBuffer *, Geo::v128 &)

Get the cluster albedo value of a debug point from an AlbedoBuffer.

GetDebugEmissiveValue(const Geo::u32, const EmissiveBuffer *, Geo::v128 &)

Get the cluster emissive value of a debug point from an EmissiveBuffer.

GetDebugTransparencyValue(const Geo::u32, const TransparencyBuffer *, float &)

Get the cluster transparency value of a debug point from an TransparencyBuffer.

GetTextureSize(const Enlighten::RadSystemCore *, const TextureResolutionScale::Value, Geo::s32 &, Geo::s32 &)

Returns the required dimensions of the albedo and emissive textures for a given radiosity core.

GetTextureSize(const TextureResolutionScale::Value, Geo::s32, Geo::s32, Geo::s32 &, Geo::s32 &)

Inline function that returns the required dimensions of the albedo and emissive textures for a given a texture width and height.

InitialiseAlbedoBufferFromColoursPerPoint(DynamicMaterialWorkspace *, const Enlighten::ClusterAlbedoWorkspaceMaterialData *, const InputWorkspace *, const Geo::v128 *, const Geo::s32, AlbedoBuffer *)

Sets the albedo colours for an AlbedoBuffer based on the individual sample points.

InitialiseAlbedoBufferFromMaterialWorkspace(DynamicMaterialWorkspace *, const Enlighten::ClusterAlbedoWorkspaceMaterialData *, AlbedoBuffer *)

Sets the albedo colours for an AlbedoBuffer from a materialWorkspace.

InitialiseAlbedoBufferFromTexture(DynamicMaterialWorkspace *, const Enlighten::ClusterAlbedoWorkspaceMaterialData *, const Enlighten::InputTextureSamplerParameters *, const TextureResolutionScale::Value, AlbedoBuffer *)

Sets the albedo colours for an AlbedoBuffer from an albedo texture expected in RGBA format in gamma-2 colour space.

InitialiseEmissiveBufferFromColoursPerPoint(DynamicMaterialWorkspace *, const Enlighten::ClusterAlbedoWorkspaceMaterialData *, const InputWorkspace *, const Geo::v128 *, const Geo::s32, EmissiveBuffer *)

Sets the emissive colours for an EmissiveBuffer based on the individual sample points.

InitialiseEmissiveBufferFromMaterialWorkspace(DynamicMaterialWorkspace *, const Enlighten::ClusterAlbedoWorkspaceMaterialData *, EmissiveBuffer *)

Sets the emissive colours for an EmissiveBuffer from a materialWorkspace.

InitialiseEmissiveBufferFromTexture(DynamicMaterialWorkspace *, const Enlighten::ClusterAlbedoWorkspaceMaterialData *, const Enlighten::InputTextureSamplerParameters *, float, const TextureResolutionScale::Value, EmissiveBuffer *)

Sets the emissive colours for an EmissiveBuffer from an emissive texture expected in RGBM format in linear colour space.

InitialiseEmissiveBufferFromTextureFp16(DynamicMaterialWorkspace *, const Enlighten::ClusterAlbedoWorkspaceMaterialData *, const Enlighten::InputTextureSamplerParameters *, const TextureResolutionScale::Value, EmissiveBuffer *)

Sets the emissive colours for an EmissiveBuffer from an emissive texture expected in FP16 format in linear colour space.

InitialiseInstanceEmissiveAsDynamic(DynamicMaterialWorkspace *, const Enlighten::ClusterAlbedoWorkspaceMaterialData *, const Geo::u16)

Initialise all the materials of an instance in the DynamicMaterialWorkspace as dynamic.

InitialiseMaterialDynamicity(DynamicMaterialWorkspace *, const Enlighten::ClusterAlbedoWorkspaceMaterialData *, const SurfaceSelection &, SurfaceColourDynamicity)

Initialise a material component in the DynamicMaterialWorkspace as static or dynamic.

InitialiseMaterialEmissiveAsDynamic(DynamicMaterialWorkspace *, const Enlighten::ClusterAlbedoWorkspaceMaterialData *, const Geo::u64 &)

Initialise a material emissive component in the DynamicMaterialWorkspace as dynamic.

InitialiseSystemEmissiveAsDynamic(DynamicMaterialWorkspace *, const Enlighten::ClusterAlbedoWorkspaceMaterialData *)

Initialise all the materials in the DynamicMaterialWorkspace as dynamic.

InitialiseTransparencyBufferFromColoursPerPoint(DynamicMaterialWorkspace *, const Enlighten::ClusterAlbedoWorkspaceMaterialData *, const InputWorkspace *, const float *, const Geo::s32, TransparencyBuffer *)

Sets the transparency for a TransparencyBuffer based on the individual sample points.

InitialiseTransparencyBufferFromMaterialWorkspace(DynamicMaterialWorkspace *, const Enlighten::ClusterAlbedoWorkspaceMaterialData *, TransparencyBuffer *)

Sets the values for a TransparencyBuffer from a materialWorkspace.

InitialiseTransparencyBufferFromTexture(DynamicMaterialWorkspace *, const Enlighten::ClusterAlbedoWorkspaceMaterialData *, const Enlighten::InputTextureSamplerParameters *, const Geo::s32, const Geo::s32, const TextureResolutionScale::Value, TransparencyBuffer *)

Sets the values for a TransparencyBuffer from a the alpha channel in the albedo texture in RGBA format.

IsAlbedoBufferInitialiseRequired(const DynamicMaterialWorkspace *)

Determine if the buffer needs to be initialised.

IsEmissiveBufferInitialiseRequired(const DynamicMaterialWorkspace *)

Determine if the buffer needs to be initialised.

IsTransparencyBufferInitialiseRequired(const DynamicMaterialWorkspace *)

Determine if the buffer needs to be initialised.

MakeInstanceSurfaceSelection(Geo::u16)

All surfaces matching the specified instance.

MakeSingleSurfaceSelection(Geo::u16, Geo::u16, Geo::u32)

The surface matching the instanceId, meshIndex and materialId combination.

MakeSystemSurfaceSelection()

All surfaces in the system.

SetMaterialAlbedoColour(DynamicMaterialWorkspace *, const Enlighten::ClusterAlbedoWorkspaceMaterialData *, const SurfaceSelection &, const Geo::v128 &)

Set the colour of a material selection within the DynamicMaterialWorkspace.

SetMaterialEmissiveColour(DynamicMaterialWorkspace *, const Enlighten::ClusterAlbedoWorkspaceMaterialData *, const SurfaceSelection &, const Geo::v128 &)

Set the emissive colour of a material selection within the DynamicMaterialWorkspace.

SetMaterialTransparency(DynamicMaterialWorkspace *, const Enlighten::ClusterAlbedoWorkspaceMaterialData *, const SurfaceSelection &, float)

Set the transparency of a material selection within the DynamicMaterialWorkspace.

UpdateAlbedoBuffer(DynamicMaterialWorkspace *, const Enlighten::ClusterAlbedoWorkspaceMaterialData *, Enlighten::AlbedoBuffer *)

Update an AlbedoBuffer from the DynamicMaterialWorkspace.

UpdateEmissiveBuffer(DynamicMaterialWorkspace *, const Enlighten::ClusterAlbedoWorkspaceMaterialData *, Enlighten::EmissiveBuffer *)

Update an EmissiveBuffer from the DynamicMaterialWorkspace.

UpdateTransparencyBuffer(DynamicMaterialWorkspace *, const Enlighten::ClusterAlbedoWorkspaceMaterialData *, Enlighten::TransparencyBuffer *)

Update a TransparencyBuffer from the DynamicMaterialWorkspace.


Anchor
ad814ddee2a53823f5d644b1049886075
ad814ddee2a53823f5d644b1049886075

Geo::u32 GEO_CALL Enlighten::CalcAlbedoBufferSize

...

public: Geo::u32GEO_CALL CalcAlbedoBufferSize
(
    const Enlighten::InputWorkspace * inputWorkspace
)

...

Calculate the size of the AlbedoBuffer for a system.

Parameters
[in]inputWorkspace

A valid InputWorkspace for a system

Returns

The size in bytes of the AlbedoBuffer. Return 0xFFFFFFFF if an error occurred.


Anchor
a467f608a829baac9df9c1a4962dbea7c
a467f608a829baac9df9c1a4962dbea7c

Geo::u32 GEO_CALL Enlighten::CalcDynamicMaterialWorkspaceSize

...

public: Geo::u32GEO_CALL CalcDynamicMaterialWorkspaceSize
(
    const ClusterAlbedoWorkspaceMaterialData * materialData
)

...

Calculate the size of the DynamicMaterialWorkspace.

Parameters
[in]materialData

Pointer to the precompute material data.

Returns

The size of the DynamicMaterialWorkspace in bytes. Returns 0xFFFFFFFF if an error occurred.


Anchor
a97e5bb2ae97aade884046f139db90010
a97e5bb2ae97aade884046f139db90010

Geo::u32 GEO_CALL Enlighten::CalcEmissiveBufferSize

...

public: Geo::u32GEO_CALL CalcEmissiveBufferSize
(
    const Enlighten::InputWorkspace * inputWorkspace
)

...

Calculate the size of the EmissiveBuffer for a system.

Parameters
[in]inputWorkspace

A valid InputWorkspace for a system

Returns

The size in bytes of the EmissiveBuffer. Return 0xFFFFFFFF if an error occurred.


Anchor
a6390c86efc5b5c2cd478ab877f6a5190
a6390c86efc5b5c2cd478ab877f6a5190

Geo::u32 GEO_CALL Enlighten::CalcTransparencyBufferSize

...

public: Geo::u32GEO_CALL CalcTransparencyBufferSize
(
    const Enlighten::InputWorkspace * inputWorkspace
)

...

Calculate the size of the TransparencyBuffer for a system.

Parameters
[in]inputWorkspace

A valid InputWorkspace for a system

Returns

The size in bytes of the TransparencyBuffer. Return 0xFFFFFFFF if an error occurred.


Anchor
a871dea25f117d3324ae46b1ace3fca3d
a871dea25f117d3324ae46b1ace3fca3d

Enlighten::AlbedoBuffer* GEO_CALL Enlighten::CreateAlbedoBuffer

...

public: Enlighten::AlbedoBuffer *GEO_CALL CreateAlbedoBuffer
(
    const Enlighten::InputWorkspace * inputWorkspace,
    void * mem
)

...

Create an AlbedoBuffer for a system.

This AlbedoBuffer is used as input to the IndirectInputLightingStage.

Parameters
[in]inputWorkspace

A valid InputWorkspace for a system

[in]mem

A pointer to 16 byte aligned memory of size returned by CalcAlbedoBufferSize()

Returns

The complete and valid AlbedoBuffer object. Returns NULL if an error occurred.


Anchor
aff79b8635bc6cdf700814a244f9544ef
aff79b8635bc6cdf700814a244f9544ef

Geo::u64 Enlighten::CreateCompositeMaterialId

...

public: Geo::u64 CreateCompositeMaterialId
(
    Geo::u16 instanceId,
    Geo::u16 meshIdx,
    Geo::u32 baseMaterialId
)

...

Determine the specific material ID for a given instance, mesh and 32-bit material ID.

See the Material IDs & GUIDs page in the User Guide for further details.


Anchor
af6d040adf6cc8a4e6cdc55b84e46807c
af6d040adf6cc8a4e6cdc55b84e46807c

DynamicMaterialWorkspace* GEO_CALL Enlighten::CreateDynamicMaterialWorkspace

...

public: DynamicMaterialWorkspace *GEO_CALL CreateDynamicMaterialWorkspace
(
    const ClusterAlbedoWorkspaceMaterialData * materialData,
    void * mem
)

...

Create a DynamicMaterialWorkspace which is used for dynamic updates of material colours at runtime.

Each system with dynamic materials will require one of these objects.

Parameters
[in]materialData

A pointer to the precompute material data.

[in]mem

A pointer to the memory where the DynamicAlbedoWorkspace will be constructed. This block of memory must be at least CalcDynamicMaterialWorkspaceSize() bytes.

Returns

A valid DynamicMaterialWorkspace object. Returns NULL if an error occurred.


Anchor
aedc691c056acf5c55cd7f86b8bd69ed1
aedc691c056acf5c55cd7f86b8bd69ed1

Enlighten::EmissiveBuffer* GEO_CALL Enlighten::CreateEmissiveBuffer

...

public: Enlighten::EmissiveBuffer *GEO_CALL CreateEmissiveBuffer
(
    const Enlighten::InputWorkspace * inputWorkspace,
    void * mem
)

...

Create an EmissiveBuffer for a system.

This EmissiveBuffer is used as input to the IndirectInputLightingStage.

Parameters
[in]inputWorkspace

A valid InputWorkspace for a system

[in]mem

A pointer to 16 byte aligned memory of size returned by CalcEmissiveBufferSize()

Returns

The complete and valid EmissiveBuffer object. Returns NULL if an error occurred.


Anchor
af1b9059629ce123b7a18d170ad6d0d2e
af1b9059629ce123b7a18d170ad6d0d2e

Enlighten::TransparencyBuffer* GEO_CALL Enlighten::CreateTransparencyBuffer

...

public: Enlighten::TransparencyBuffer *GEO_CALL CreateTransparencyBuffer
(
    const Enlighten::InputWorkspace * inputWorkspace,
    void * mem
)

...

Create a TransparencyBuffer for a system.

This TransparencyBuffer is used as input to the IndirectInputLightingStage.

Parameters
[in]inputWorkspace

A valid InputWorkspace for a system

[in]mem

A pointer to 16 byte aligned memory of size returned by CalcTransparencyBufferSize()

Returns

The complete and valid TransparencyBuffer object. Returns NULL if an error occurred.


Anchor
ac577903e8f46bd76c3ffe856c141a557
ac577903e8f46bd76c3ffe856c141a557

CpuTextureElement GEO_CALL Enlighten::EncodeRGBM

...

public: CpuTextureElement GEO_CALL EncodeRGBM
(
    float * rgb,
    float MaxRange
)

...

Utility function for converting floating point values to the RGBM format.


Anchor
a13999d5f25c006b3040d990237ff3901
a13999d5f25c006b3040d990237ff3901

Geo::u32 GEO_CALL Enlighten::GetClusterAlbedoWorkspaceMaterialDataSize

...

public: Geo::u32GEO_CALL GetClusterAlbedoWorkspaceMaterialDataSize
(
    const Enlighten::ClusterAlbedoWorkspaceMaterialData * materialData
)

...

Returns the size of the specified ClusterAlbedoWorkspaceMaterialData object.

Note that this includes the size of the two child RadDataBlocks.

Returns

Memory used in bytes, 0xFFFFFFFF upon error.


Anchor
ac4c804421bbe07573177c445061d7114
ac4c804421bbe07573177c445061d7114

const Geo::u64* GEO_CALL Enlighten::GetClusterAlbedoWorkspaceMaterialIds

...

public: const Geo::u64 *GEO_CALL GetClusterAlbedoWorkspaceMaterialIds
(
    const Enlighten::ClusterAlbedoWorkspaceMaterialData * materialData
)

...

Returns a list of all material Ids referenced by this albedo workspace.

The length of the returned array can be found using GetClusterAlbedoWorkspaceNumMaterials().

Parameters
[in]materialData

The albedo workspace material data to query.


Anchor
a326f37782c2a8fac33fc43906fce9097
a326f37782c2a8fac33fc43906fce9097

Geo::s32 GEO_CALL Enlighten::GetClusterAlbedoWorkspaceNumMaterials

...

public: Geo::s32GEO_CALL GetClusterAlbedoWorkspaceNumMaterials
(
    const Enlighten::ClusterAlbedoWorkspaceMaterialData * materialData
)

...

Returns the number of material Ids referenced by this albedo workspace.

Parameters
[in]materialData

The albedo workspace material data to query.

Returns

The number of materials referenced, -1 upon error.


Anchor
a089d68b9e0db83b803ff3bf5b522470a
a089d68b9e0db83b803ff3bf5b522470a

bool GEO_CALL Enlighten::GetDebugAlbedoValue

...

public: bool GEO_CALL GetDebugAlbedoValue
(
    const Geo::u32 debugClusterIdx,
    const AlbedoBuffer * albedoBuffer,
    Geo::v128 & outValue
)

...

Get the cluster albedo value of a debug point from an AlbedoBuffer.

Parameters
[in]debugClusterIdx

Index of the cluster

[in]albedoBuffer

The input AlbedoBuffer to query.

[out]outValue

The value in the buffer for the given debug point. returns true on success or false if an error occured.


Anchor
a4ff60d9e30708dffa1354c94e37e3189
a4ff60d9e30708dffa1354c94e37e3189

bool GEO_CALL Enlighten::GetDebugEmissiveValue

...

public: bool GEO_CALL GetDebugEmissiveValue
(
    const Geo::u32 debugClusterIdx,
    const EmissiveBuffer * emissiveBuffer,
    Geo::v128 & outValue
)

...

Get the cluster emissive value of a debug point from an EmissiveBuffer.

Parameters
[in]debugClusterIdx

Index of the cluster

[in]emissiveBuffer

The input EmissiveBuffer to query.

[out]outValue

The value in the buffer for the given debug point. returns true on success or false if an error occured.


Anchor
adae46d154aedfcf3ddbc49a7842ee584
adae46d154aedfcf3ddbc49a7842ee584

bool GEO_CALL Enlighten::GetDebugTransparencyValue

...

public: bool GEO_CALL GetDebugTransparencyValue
(
    const Geo::u32 debugClusterIdx,
    const TransparencyBuffer * transparencyBuffer,
    float & outValue
)

...

Get the cluster transparency value of a debug point from an TransparencyBuffer.

Parameters
[in]debugClusterIdx

Index of the cluster

[in]transparencyBuffer

The input TransparencyBuffer to query.

[out]outValue

The value in the buffer for the given debug point. returns true on success or false if an error occured.


Anchor
a7afd5232e1dcb0b351ab96ad6363c005
a7afd5232e1dcb0b351ab96ad6363c005

bool GEO_CALL Enlighten::GetTextureSize

...

public: bool GEO_CALL GetTextureSize
(
    const Enlighten::RadSystemCore * radSystemCoreIn,
    const TextureResolutionScale::Value scale,
    Geo::s32 & widthOut,
    Geo::s32 & heightOut
)

...

Returns the required dimensions of the albedo and emissive textures for a given radiosity core.

This is a replacement for GetTextureAlbedoSize()

Parameters
[in]radSystemCoreIn

The radiosity core to compute the texture dimensions for.

[in]scale

The desired texture resolution scale.

[out]widthOut

The width of the albedo and emissive textures, -1 upon error.

[out]heightOut

The height of the albedo and emissive textures, -1 upon error. returns true on success or false if an error occurred.


Anchor
a9b4aaca88f1ac5e16258671f6ef57665
a9b4aaca88f1ac5e16258671f6ef57665

void Enlighten::GetTextureSize

...

public: void GetTextureSize
(
    const TextureResolutionScale::Value scale,
    Geo::s32 widthIn,
    Geo::s32 heightIn,
    Geo::s32 & widthOut,
    Geo::s32 & heightOut
)

...

Inline function that returns the required dimensions of the albedo and emissive textures for a given a texture width and height.


Anchor
af75423e508e9452d16af6b773f0dc199
af75423e508e9452d16af6b773f0dc199

bool GEO_CALL Enlighten::InitialiseAlbedoBufferFromColoursPerPoint

...

public: bool GEO_CALL InitialiseAlbedoBufferFromColoursPerPoint
(
    DynamicMaterialWorkspace * materialWorkspace,
    const Enlighten::ClusterAlbedoWorkspaceMaterialData * materialData,
    const InputWorkspace * inputWorkspace,
    const Geo::v128 * pointAlbedoColours,
    const Geo::s32 numPoints,
    AlbedoBuffer * albedoBuffer
)

...

Sets the albedo colours for an AlbedoBuffer based on the individual sample points.

You can use Enlighten::GetNumberOfPointsInInputWorkspace() to get the number of points in a system, and Enlighten::GetInputWorkspacePositionAndNormalArray() to get their positions and normals.

Parameters
[in]materialWorkspace

A pointer to the DynamicMaterialWorkspace for the system.

[in]materialData

A pointer to the precompute material data.

[in]inputWorkspace

The input workspace for the system.

[in]pointAlbedoColours

The albedo colours to set for the points. Each colour component should be between [0..1]. Values outside this range will be clamped internally. The size of this array must be equal to or larger than the value in numPoints. These values are expected in linear colour space.

[in]numPoints

Number of sample points provided. It must match the number of points in the input workspace.

[in]albedoBuffer

The AlbedoBuffer which is being initialised.

Returns

True on success or false if an error occurred.


Anchor
aa84e309dd7b8561960bfb6900a8dc858
aa84e309dd7b8561960bfb6900a8dc858

bool GEO_CALL Enlighten::InitialiseAlbedoBufferFromMaterialWorkspace

...

public: bool GEO_CALL InitialiseAlbedoBufferFromMaterialWorkspace
(
    DynamicMaterialWorkspace * materialWorkspace,
    const Enlighten::ClusterAlbedoWorkspaceMaterialData * materialData,
    AlbedoBuffer * albedoBuffer
)

...

Sets the albedo colours for an AlbedoBuffer from a materialWorkspace.

Parameters
[in]materialWorkspace

A pointer to the DynamicMaterialWorkspace for the system.

[in]materialData

A pointer to the precompute material data.

[in]albedoBuffer

The AlbedoBuffer which is being initialised.

Returns

True on success or false if an error occurred.


Anchor
a07be65d2c64b7d9f1c150c1bbfd5c510
a07be65d2c64b7d9f1c150c1bbfd5c510

bool GEO_CALL Enlighten::InitialiseAlbedoBufferFromTexture

...

public: bool GEO_CALL InitialiseAlbedoBufferFromTexture
(
    DynamicMaterialWorkspace * materialWorkspace,
    const Enlighten::ClusterAlbedoWorkspaceMaterialData * materialData,
    const Enlighten::InputTextureSamplerParameters * textureParams,
    const TextureResolutionScale::Value resolutionScale,
    AlbedoBuffer * albedoBuffer
)

...

Sets the albedo colours for an AlbedoBuffer from an albedo texture expected in RGBA format in gamma-2 colour space.

Parameters
[in]materialWorkspace

A pointer to the DynamicMaterialWorkspace for the system.

[in]materialData

A pointer to the precompute material data.

[in]textureParams

Parameters used for sampling the albedo texture on the CPU.

[in]resolutionScale

An enumeration representing the size of the albedo texture relative to the lightmap resolution. Can be FullResolutionScale or HalfResolutionScale.

[in]albedoBuffer

The AlbedoBuffer which is being initialised.

Returns

True on success or false if an error occurred.


Anchor
a6da1117c50535a87b2f2de34ac759bf2
a6da1117c50535a87b2f2de34ac759bf2

bool GEO_CALL Enlighten::InitialiseEmissiveBufferFromColoursPerPoint

...

public: bool GEO_CALL InitialiseEmissiveBufferFromColoursPerPoint
(
    DynamicMaterialWorkspace * materialWorkspace,
    const Enlighten::ClusterAlbedoWorkspaceMaterialData * materialData,
    const InputWorkspace * inputWorkspace,
    const Geo::v128 * pointEmissiveColours,
    const Geo::s32 numPoints,
    EmissiveBuffer * emissiveBuffer
)

...

Sets the emissive colours for an EmissiveBuffer based on the individual sample points.

You can use Enlighten::GetNumberOfPointsInInputWorkspace() to get the number of points in a system, and Enlighten::GetInputWorkspacePositionAndNormalArray() to get their positions and normals.

Parameters
[in]materialWorkspace

A pointer to the DynamicMaterialWorkspace for the system.

[in]materialData

A pointer to the precompute material data.

[in]inputWorkspace

The input workspace for the system.

[in]pointEmissiveColours

The albedo colours to set for the points. Each colour component should be between [0..1]. Values outside this range will be clamped internally. The size of this array must be equal to or larger than the value in numPoints. These values are expected in linear colour space.

[in]numPoints

Number of sample points provided. It must match the number of points in the input workspace.

[in]emissiveBuffer

The EmissiveBuffer which is being initialised.

Returns

True on success or false if an error occurred.


Anchor
ac9472ad17d7b91dee6eb7a88b21d07cf
ac9472ad17d7b91dee6eb7a88b21d07cf

bool GEO_CALL Enlighten::InitialiseEmissiveBufferFromMaterialWorkspace

...

public: bool GEO_CALL InitialiseEmissiveBufferFromMaterialWorkspace
(
    DynamicMaterialWorkspace * materialWorkspace,
    const Enlighten::ClusterAlbedoWorkspaceMaterialData * materialData,
    EmissiveBuffer * emissiveBuffer
)

...

Sets the emissive colours for an EmissiveBuffer from a materialWorkspace.

Parameters
[in]materialWorkspace

A pointer to the DynamicMaterialWorkspace for the system.

[in]materialData

A pointer to the precompute material data.

[in]emissiveBuffer

The EmissiveBuffer which is being initialised.

Returns

True on success or false if an error occurred.


Anchor
a1565faeba1f2dd866a667c0d73c78ead
a1565faeba1f2dd866a667c0d73c78ead

bool GEO_CALL Enlighten::InitialiseEmissiveBufferFromTexture

...

public: bool GEO_CALL InitialiseEmissiveBufferFromTexture
(
    DynamicMaterialWorkspace * materialWorkspace,
    const Enlighten::ClusterAlbedoWorkspaceMaterialData * materialData,
    const Enlighten::InputTextureSamplerParameters * textureParams,
    float fixedPointMaximum,
    const TextureResolutionScale::Value resolutionScale,
    EmissiveBuffer * emissiveBuffer
)

...

Sets the emissive colours for an EmissiveBuffer from an emissive texture expected in RGBM format in linear colour space.

Parameters
[in]materialWorkspace

A pointer to the DynamicMaterialWorkspace for the system.

[in]materialData

A pointer to the precompute material data.

[in]textureParams

Parameters used for sampling the albedo texture on the CPU.

[in]fixedPointMaximum

The maximum value representable by the fixed point RGBM format.

[in]resolutionScale

An enumeration representing the size of the albedo texture relative to the lightmap resolution. Can be FullResolutionScale or HalfResolutionScale.

[in]emissiveBuffer

The EmissiveBuffer which is being initialised.

Returns

True on success or false if an error occurred.


Anchor
a2715400f6866060e6b6a7bbdedbe8a31
a2715400f6866060e6b6a7bbdedbe8a31

bool GEO_CALL Enlighten::InitialiseEmissiveBufferFromTextureFp16

...

public: bool GEO_CALL InitialiseEmissiveBufferFromTextureFp16
(
    DynamicMaterialWorkspace * materialWorkspace,
    const Enlighten::ClusterAlbedoWorkspaceMaterialData * materialData,
    const Enlighten::InputTextureSamplerParameters * textureParams,
    const TextureResolutionScale::Value resolutionScale,
    EmissiveBuffer * emissiveBuffer
)

...

Sets the emissive colours for an EmissiveBuffer from an emissive texture expected in FP16 format in linear colour space.

Parameters
[in]materialWorkspace

A pointer to the DynamicMaterialWorkspace for the system.

[in]materialData

A pointer to the precompute material data.

[in]textureParams

Parameters used for sampling the albedo texture on the CPU.

[in]resolutionScale

An enumeration representing the size of the albedo texture relative to the lightmap resolution. Can be FullResolutionScale or HalfResolutionScale.

[in]emissiveBuffer

The EmissiveBuffer which is being initialised.

Returns

True on success or false if an error occurred.


Anchor
a71f286f2eeb4dedc72d1153b689456e8
a71f286f2eeb4dedc72d1153b689456e8

bool GEO_CALL Enlighten::InitialiseInstanceEmissiveAsDynamic

...

public: bool GEO_CALL InitialiseInstanceEmissiveAsDynamic
(
    DynamicMaterialWorkspace * materialWorkspace,
    const Enlighten::ClusterAlbedoWorkspaceMaterialData * materialData,
    const Geo::u16 instanceId
)

...

Initialise all the materials of an instance in the DynamicMaterialWorkspace as dynamic.

This is used to distinguish dynamic material values from static values when initialising or reconstructing the EmissiveBuffer. If a material albedo component is not initialised as dynamic, any calls to SetMaterialEmissiveColour() will require the EmissiveBuffer to be re-initialised.

Parameters
[in]materialWorkspace

A pointer to the DynamicMaterialWorkspace for the system.

[in]materialData

A pointer to the precompute material data.

[in]instanceId

The instance ID to set the emissive for.

Returns

True on success or false if an error occurred. This does not imply whether or not the instance was found.


Anchor
a9ef914cc783a46ec8f6666bd55c66bf4
a9ef914cc783a46ec8f6666bd55c66bf4

bool GEO_CALL Enlighten::InitialiseMaterialDynamicity

...

public: bool GEO_CALL InitialiseMaterialDynamicity
(
    DynamicMaterialWorkspace * materialWorkspace,
    const Enlighten::ClusterAlbedoWorkspaceMaterialData * materialData,
    const SurfaceSelection & selection,
    SurfaceColourDynamicity dynamicity
)

...

Initialise a material component in the DynamicMaterialWorkspace as static or dynamic.

This is used to distinguish dynamic material values from static values when initialising or reconstructing the AlbedoBuffer. If a material component is not initialised as dynamic albedo, any calls to SetMaterialAlbedoColour() will require the AlbedoBuffer to be re-initialised. If a material component is not initialised as dynamic emissive, any calls to SetMaterialEmissiveColour() will require the EmissiveBuffer to be re-initialised. If a material component is not initialised as dynamic transparency, any calls to SetMaterialTransparency() will require the TransparencyBuffer to be re-initialised.

Parameters
[in]materialWorkspace

A pointer to the DynamicMaterialWorkspace for the system.

[in]materialData

A pointer to the precompute material data.

[in]selection

The selection of surfaces to set the state for.

[in]dynamicity

The dynamicity to initialise the material component with.

Returns

True on success or false if an error occurred. This does not imply whether or not the material was found.


Anchor
ac43e198d68355b90ea0fabcf3a2ff71b
ac43e198d68355b90ea0fabcf3a2ff71b

bool GEO_CALL Enlighten::InitialiseMaterialEmissiveAsDynamic

...

public: bool GEO_CALL InitialiseMaterialEmissiveAsDynamic
(
    DynamicMaterialWorkspace * materialWorkspace,
    const Enlighten::ClusterAlbedoWorkspaceMaterialData * materialData,
    const Geo::u64 & materialId
)

...

Initialise a material emissive component in the DynamicMaterialWorkspace as dynamic.

This is used to distinguish dynamic material values from static values when initialising or reconstructing the EmissiveBuffer. If a material emissive component is not initialised as dynamic, any calls to SetMaterialEmissiveColour() will require the EmissiveBuffer to be re-initialised.

Parameters
[in]materialWorkspace

A pointer to the DynamicMaterialWorkspace for the system.

[in]materialData

A pointer to the precompute material data.

[in]materialId

The material 64 bit material ID to set the emissive for.

Returns

True on success or false if an error occurred. This does not imply whether or not the material was found.


Anchor
ab98dd373c1ce65e712b1bbb9a4908a1a
ab98dd373c1ce65e712b1bbb9a4908a1a

bool GEO_CALL Enlighten::InitialiseSystemEmissiveAsDynamic

...

public: bool GEO_CALL InitialiseSystemEmissiveAsDynamic
(
    DynamicMaterialWorkspace * materialWorkspace,
    const Enlighten::ClusterAlbedoWorkspaceMaterialData * materialData
)

...

Initialise all the materials in the DynamicMaterialWorkspace as dynamic.

This is used to distinguish dynamic material values from static values when initialising or reconstructing the EmissiveBuffer. If a material albedo component is not initialised as dynamic, any calls to SetMaterialEmissiveColour() will require the EmissiveBuffer to be re-initialised.

Parameters
[in]materialWorkspace

A pointer to the DynamicMaterialWorkspace for the system.

[in]materialData

A pointer to the precompute material data.

Returns

True on success or false if an error occurred.


Anchor
a9739399f5711e8f5da58b627cef4ab58
a9739399f5711e8f5da58b627cef4ab58

bool GEO_CALL Enlighten::InitialiseTransparencyBufferFromColoursPerPoint

...

public: bool GEO_CALL InitialiseTransparencyBufferFromColoursPerPoint
(
    DynamicMaterialWorkspace * materialWorkspace,
    const Enlighten::ClusterAlbedoWorkspaceMaterialData * materialData,
    const InputWorkspace * inputWorkspace,
    const float * pointTransparencyValues,
    const Geo::s32 numPoints,
    TransparencyBuffer * transparencyBuffer
)

...

Sets the transparency for a TransparencyBuffer based on the individual sample points.

You can use Enlighten::GetNumberOfPointsInInputWorkspace() to get the number of points in a system, and Enlighten::GetInputWorkspacePositionAndNormalArray() to get their positions and normals.

Parameters
[in]materialWorkspace

A pointer to the DynamicMaterialWorkspace for the system.

[in]materialData

A pointer to the precompute material data.

[in]inputWorkspace

The input workspace for the system.

[in]pointTransparencyValues

The transparency values to set for the points. Each value should be between [0..1]. Values outside this range will be clamped internally. The size of this array must be equal to or larger than the value in numPoints. These values are expected in linear colour space.

[in]numPoints

Number of sample points provided. It must match the number of pointsg in the input workspace.

[in]transparencyBuffer

The TransparencyBuffer which is being initialised.

Returns

True on success or false if an error occurred.


Anchor
a5e6cf2042437ef1322faac1033cb3377
a5e6cf2042437ef1322faac1033cb3377

bool GEO_CALL Enlighten::InitialiseTransparencyBufferFromMaterialWorkspace

...

public: bool GEO_CALL InitialiseTransparencyBufferFromMaterialWorkspace
(
    DynamicMaterialWorkspace * materialWorkspace,
    const Enlighten::ClusterAlbedoWorkspaceMaterialData * materialData,
    TransparencyBuffer * transparencyBuffer
)

...

Sets the values for a TransparencyBuffer from a materialWorkspace.

Parameters
[in]materialWorkspace

A pointer to the DynamicMaterialWorkspace for the system.

[in]materialData

A pointer to the precompute material data.

[in]transparencyBuffer

The TransparencyBuffer which is being initialised.

Returns

True on success or false if an error occurred.


Anchor
a474141076139cd1909111ce2fc4d8196
a474141076139cd1909111ce2fc4d8196

bool GEO_CALL Enlighten::InitialiseTransparencyBufferFromTexture

...

public: bool GEO_CALL InitialiseTransparencyBufferFromTexture
(
    DynamicMaterialWorkspace * materialWorkspace,
    const Enlighten::ClusterAlbedoWorkspaceMaterialData * materialData,
    const Enlighten::InputTextureSamplerParameters * textureParams,
    const Geo::s32 pixelStrideInBytes,
    const Geo::s32 alphaOffsetInBytes,
    const TextureResolutionScale::Value resolutionScale,
    TransparencyBuffer * transparencyBuffer
)

...

Sets the values for a TransparencyBuffer from a the alpha channel in the albedo texture in RGBA format.

In the alpha channel 0 represents fully transparent and 255 represents fully opaque in linear space.

Parameters
[in]materialWorkspace

A pointer to the DynamicMaterialWorkspace for the system.

[in]materialData

A pointer to the precompute material data.

[in]textureParams

Parameters used for sampling the albedo texture on the CPU.

[in]pixelStrideInBytes

The stride between pixels in the texture.

[in]alphaOffsetInBytes

The byte offset to the first alpha element.

[in]resolutionScale

An enumeration representing the size of the albedo texture relative to the lightmap resolution. Can be FullResolutionScale or HalfResolutionScale.

[in]transparencyBuffer

The TransparencyBuffer which is being initialised.

Returns

True on success or false if an error occurred.


Anchor
ab884bd6696d835e0d9331d78166eb21e
ab884bd6696d835e0d9331d78166eb21e

bool GEO_CALL Enlighten::IsAlbedoBufferInitialiseRequired

...

public: bool GEO_CALL IsAlbedoBufferInitialiseRequired
(
    const DynamicMaterialWorkspace * materialWorkspace
)

...

Determine if the buffer needs to be initialised.

An initialised buffer can require re-initialisation if a static colour changes or the dynamic-ness of a material changes.

Parameters
[in]materialWorkspace

A pointer to the DynamicMaterialWorkspace for the system.

Returns

True if the buffer needs to be initialised.


Anchor
aaa3de7908ab69c7573d09124dd199fd6
aaa3de7908ab69c7573d09124dd199fd6

bool GEO_CALL Enlighten::IsEmissiveBufferInitialiseRequired

...

public: bool GEO_CALL IsEmissiveBufferInitialiseRequired
(
    const DynamicMaterialWorkspace * materialWorkspace
)

...

Determine if the buffer needs to be initialised.

An initialised buffer can require re-initialisation if a static colour changes or the dynamic-ness of a material changes.

Parameters
[in]materialWorkspace

A pointer to the DynamicMaterialWorkspace for the system.

Returns

True if the buffer needs to be initialised.


Anchor
ad3f1acc6c3e579c46f9b961d8e65f203
ad3f1acc6c3e579c46f9b961d8e65f203

bool GEO_CALL Enlighten::IsTransparencyBufferInitialiseRequired

...

public: bool GEO_CALL IsTransparencyBufferInitialiseRequired
(
    const DynamicMaterialWorkspace * materialWorkspace
)

...

Determine if the buffer needs to be initialised.

An initialised buffer can require re-initialisation if a static colour changes or the dynamic-ness of a material changes.

Parameters
[in]materialWorkspace

A pointer to the DynamicMaterialWorkspace for the system.

Returns

True if the buffer needs to be initialised.


Anchor
ad728363d83efb4049e40cd90430e717a
ad728363d83efb4049e40cd90430e717a

SurfaceSelection Enlighten::MakeInstanceSurfaceSelection

...

public: SurfaceSelection MakeInstanceSurfaceSelection
(
    Geo::u16 instanceId
)

...

All surfaces matching the specified instance.


Anchor
af22e2311abd1b2760fb9a038f4309b15
af22e2311abd1b2760fb9a038f4309b15

SurfaceSelection Enlighten::MakeSingleSurfaceSelection

...

public: SurfaceSelection MakeSingleSurfaceSelection
(
    Geo::u16 instanceId,
    Geo::u16 meshIndex,
    Geo::u32 materialId
)

...

The surface matching the instanceId, meshIndex and materialId combination.


Anchor
aee8f5edb6eb6804aa01d000fa00d4b15
aee8f5edb6eb6804aa01d000fa00d4b15

SurfaceSelection Enlighten::MakeSystemSurfaceSelection

...

public: SurfaceSelection MakeSystemSurfaceSelection()

...

All surfaces in the system.


Anchor
ad462910fee24eda392580eaea86d1c0d
ad462910fee24eda392580eaea86d1c0d

bool GEO_CALL Enlighten::SetMaterialAlbedoColour

...

public: bool GEO_CALL SetMaterialAlbedoColour
(
    DynamicMaterialWorkspace * materialWorkspace,
    const Enlighten::ClusterAlbedoWorkspaceMaterialData * materialData,
    const SurfaceSelection & selection,
    const Geo::v128 & newAlbedoColour
)

...

Set the colour of a material selection within the DynamicMaterialWorkspace.

If the selection has been previously setup as dynamic (using InitialiseMaterialAlbedoAsDynamic()), the AlbedoBuffer will need updating using UpdateAlbedoBuffer(). If the selection is static however, the AlbedoBuffer will need re-initialising using InitialiseAlbedoBufferFromMaterialWorkspace().

Parameters
[in]materialWorkspace

A pointer to the DynamicMaterialWorkspace for the system.

[in]materialData

A pointer to the precompute material data.

[in]selection

The selection of surfaces to set the albedo for.

[in]newAlbedoColour

The colour to set the material to. This is expected to be in linear colour space.

Returns

True on success or false if an error occurred.


Anchor
a00f35c98da5439988cac9fd1c89bc26c
a00f35c98da5439988cac9fd1c89bc26c

bool GEO_CALL Enlighten::SetMaterialEmissiveColour

...

public: bool GEO_CALL SetMaterialEmissiveColour
(
    DynamicMaterialWorkspace * materialWorkspace,
    const Enlighten::ClusterAlbedoWorkspaceMaterialData * materialData,
    const SurfaceSelection & selection,
    const Geo::v128 & newEmissiveColour
)

...

Set the emissive colour of a material selection within the DynamicMaterialWorkspace.

If the selection has been previously setup as dynamic (using InitialiseMaterialEmissiveAsDynamic()), the EmissiveBuffer will need updating using UpdateEmissiveBuffer(). If the selection is static however, the EmissiveBuffer will need re-initialising using InitialiseEmissiveBufferFromMaterialWorkspace().

Parameters
[in]materialWorkspace

A pointer to the DynamicMaterialWorkspace for the system.

[in]materialData

A pointer to the precompute material data.

[in]selection

The selection of surfaces to set the emissive for.

[in]newEmissiveColour

The colour to set to the emissive component of the material. This is expected to be in linear colour space.

Returns

True on success or false if an error occurred.


Anchor
a101f78c3164fcc1e0f6d1789850e4420
a101f78c3164fcc1e0f6d1789850e4420

bool GEO_CALL Enlighten::SetMaterialTransparency

...

public: bool GEO_CALL SetMaterialTransparency
(
    DynamicMaterialWorkspace * materialWorkspace,
    const Enlighten::ClusterAlbedoWorkspaceMaterialData * materialData,
    const SurfaceSelection & selection,
    float newTransparency
)

...

Set the transparency of a material selection within the DynamicMaterialWorkspace.

If the selection has been previously setup as dynamic (using InitialiseMaterialTransparencyAsDynamic()), the TransparencyBuffer will need updating using UpdateTransparencyBuffer(). If the selection is static however, the TransparencyBuffer will need re-initialising using InitialiseTransparencyBufferFromMaterialWorkspace().

Parameters
[in]materialWorkspace

A pointer to the DynamicMaterialWorkspace for the system.

[in]materialData

A pointer to the precompute material data.

[in]selection

The selection of surfaces to set the transparency for.

[in]newTransparency

The transparency to set the material to. This is expected to be in linear space.

Returns

True on success or false if an error occurred.


Anchor
a64a7925cb885476df84ad0ebedf91cdd
a64a7925cb885476df84ad0ebedf91cdd

bool GEO_CALL Enlighten::UpdateAlbedoBuffer

...

public: bool GEO_CALL UpdateAlbedoBuffer
(
    DynamicMaterialWorkspace * materialWorkspace,
    const Enlighten::ClusterAlbedoWorkspaceMaterialData * materialData,
    Enlighten::AlbedoBuffer * albedoBuffer
)

...

Update an AlbedoBuffer from the DynamicMaterialWorkspace.

This will preserve values that were initialised with static data (ie ColourPerPoint or Texture).

Parameters
[in]materialWorkspace

A pointer to the DynamicMaterialWorkspace for the system.

[in]materialData

A pointer to the precompute material data.

[in]albedoBuffer

A valid AlbedoBuffer where the results will be written to. This buffer is used as input to the IndirectInputLighting stage.

Returns

True on success or false if an error occurred.


Anchor
ab226d2b8eaf2d4310b85f377ac99c4c3
ab226d2b8eaf2d4310b85f377ac99c4c3

bool GEO_CALL Enlighten::UpdateEmissiveBuffer

...

public: bool GEO_CALL UpdateEmissiveBuffer
(
    DynamicMaterialWorkspace * materialWorkspace,
    const Enlighten::ClusterAlbedoWorkspaceMaterialData * materialData,
    Enlighten::EmissiveBuffer * emissiveBuffer
)

...

Update an EmissiveBuffer from the DynamicMaterialWorkspace.

This will preserve values that were initialised with static data (ie ColourPerPoint or Texture).

Parameters
[in]materialWorkspace

A pointer to the DynamicMaterialWorkspace for the system.

[in]materialData

A pointer to the precompute material data.

[in]emissiveBuffer

A valid EmissiveBuffer where the results will be written to. This buffer is used as input to the IndirectInputLighting stage.

Returns

True on success or false if an error occurred.


Anchor
a202b2271b54724f9d32130805db0dd6d
a202b2271b54724f9d32130805db0dd6d

bool GEO_CALL Enlighten::UpdateTransparencyBuffer

...

public: bool GEO_CALL UpdateTransparencyBuffer
(
    DynamicMaterialWorkspace * materialWorkspace,
    const Enlighten::ClusterAlbedoWorkspaceMaterialData * materialData,
    Enlighten::TransparencyBuffer * transparencyBuffer
)

...

Update a TransparencyBuffer from the DynamicMaterialWorkspace.

This will preserve values that were initialised with static data (ie ColourPerPoint or Texture).

Parameters
[in]materialWorkspace

A pointer to the DynamicMaterialWorkspace for the system.

[in]materialData

A pointer to the precompute material data.

[in]transparencyBuffer

A valid TransparencyBuffer where the results will be written to. This buffer is used as input to the IndirectInputLighting stage.

Returns

True on success or false if an error occurred.