Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)

Enlighten API 3.10 Documentation
Results will update as you type.
  • Modules
    • module Enlighten
      • module Precompute
      • module Runtime
        • module Albedo Handling
        • module Core Runtime System
        • module Debugging Utilities
        • module High Level Runtime
        • module Input Lighting
          • module Emissive Environments
          • module Extended Input Lighting
          • module Implementation
          • module Projected Points
          • module Rectangle Lights
        • module Interpolation
        • module Monitoring functionality
        • module Transparency
        • module Utilities
    • module Infrastructure (GeoBase)
    • module Infrastructure (GeoCore)
  • Namespaces
  • Notes
    Calendars

You‘re viewing this with anonymous access, so some content might be blocked.
/
module Emissive Environments

    This is the documentation for Enlighten.

    module Emissive Environments

    Nov 21, 2019

    Functions to create and manage emissive environments and the associated input lighting buffers.

    Functions

    Name Description
    CalcEnvironmentInputLightingBufferSize(Geo::s32, PrecisionHint::Value)

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

    CalcNumEnvironmentLightValues(Geo::s32)

    Returns the total number of values in the emissive environment cluster tree.

    CreateEnvironmentInputLightingBuffer(void *, Geo::s32, PrecisionHint::Value)

    Construct an InputLightingBuffer inside the memory provided.

    SetEnvironmentLightValues(Enlighten::InputLightingBuffer *, const Geo::v128 *, Geo::s32)

    Sets the environment light values.


    Geo::u32 GEO_CALL Enlighten::CalcEnvironmentInputLightingBufferSize


    public: Geo::u32GEO_CALL CalcEnvironmentInputLightingBufferSize
    (
        Geo::s32 environmentResolution,
        PrecisionHint::Value precisionHint
    )


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

    Parameters
    [in] environmentResolution

    The resolution of the emissive environment.

    [in] precisionHint

    A hint as to the preferred precision, if available on the platform.


    Geo::s32 GEO_CALL Enlighten::CalcNumEnvironmentLightValues


    public: Geo::s32GEO_CALL CalcNumEnvironmentLightValues
    (
        Geo::s32 environmentResolution
    )


    Returns the total number of values in the emissive environment cluster tree.

    The cluster tree is formed by one root node plus six faces with a perfect tree of 4 children per node. A perfect tree is a tree where each node has the same number of children, and all leaf nodes are on the same level. The formula for the number of nodes per face for a perfect tree is: (number_of_children_per_node * num_leaf_nodes - 1) / (number_of_children_per_node - 1);


    InputLightingBuffer* GEO_CALL Enlighten::CreateEnvironmentInputLightingBuffer


    public: InputLightingBuffer *GEO_CALL CreateEnvironmentInputLightingBuffer
    (
        void * memory,
        Geo::s32 environmentResolution,
        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] environmentResolution

    The resolution of the emissive environment.

    [in] precisionHint

    A hint as to the preferred precision, if available on the platform.


    bool GEO_CALL Enlighten::SetEnvironmentLightValues


    public: bool GEO_CALL SetEnvironmentLightValues
    (
        Enlighten::InputLightingBuffer * env,
        const Geo::v128 * values,
        Geo::s32 resolution
    )


    Sets the environment light values.

    The required input is an N x N cube map of environment light values where N is the resolution. The values are laid out in the standard D3D cube map ordering, in v128 format (ie 4 x 32-bit float per value). More explicitly, this means the input buffer should contain 6 * N * N base values with 16 bytes each. The remaining values in the buffer are hierarchical averages for each face and an overall average for the entire cube map. These averages are computed internally by the SetValues function. All light values are in linear space.

    Direct3D DDS cube maps use the following face order and XYZ to UV transformation:

    face         major axis    uc     vc    ma
    ----------   ----------   ---    ---   ---
    POSITIVE_X      +rx       -rz    -ry    rx
    NEGATIVE_X      -rx       +rz    -ry    rx
    POSITIVE_Y      +ry       +rx    +rz    ry
    NEGATIVE_Y      -ry       +rx    -rz    ry
    POSITIVE_Z      +rz       +rx    -ry    rz
    NEGATIVE_Z      -rz       -rx    -ry    rz
    
    u = (uc/|ma| + 1) / 2 
    v = (vc/|ma| + 1) / 2
    

    , multiple selections available,
    {"serverDuration": 9, "requestCorrelationId": "edf7004a56c740ffa96d92b3ab805c7a"}