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 SDK 3.10 Documentation
Results will update as you type.
  • Welcome to Enlighten
  • How Enlighten works
  • Artist workflow
  • Install Enlighten
  • Libraries
  • Implementation guide
  • Technical reference
    • Output formats
    • Albedo handling
    • Lightmap lighting models
    • Light probe evaluation
    • Local IBL reflections
    • Light visibility data
    • Custom direct lights
    • Precompute pipeline
    • Low level precompute API
    • Debugging the precompute
    • The low level runtime
    • Baked lighting
      • Baking with the High Level Build System
        • Baking parameters
        • Bake lighting configuration
        • Bake instance types
        • Per-mesh lightmaps
        • Vertex baking
        • Level of detail and baking
        • Directionality and baking
        • Transparency and baking
        • Baking file types
        • Baking light masks
        • Final Gather
      • Baking with the low level bake API
    • Performance tuning
    • Technical troubleshooting
    • Terrain LOD
    • Probe LOD
    • Lightmap LOD
  • Advanced techniques
  • Tools
  • Enlighten Mobile
  • White papers
  • Third-party licences
  • Release notes
    Calendars

You‘re viewing this with anonymous access, so some content might be blocked.
/
Directionality and baking

    This is the documentation for Enlighten.

    Directionality and baking

    Nov 21, 2019

    In order to support view-dependent effects such as specular reflections, Enlighten supports directionality in the baking API. You can use three different methods:

    1. Directional light maps — As well as obtaining direct and indirect lighting for a given pixel from the normal direction dictated by the underlying geometry, you can specify other lighting normals in order to model off-axis surface geometry generated by, for example, normal maps. For each such additional lighting normal, Enlighten shades a direct and an indirect lightmap. This allows you to specify multiple arbitrary directions, enabling you to use methods such as the Half-Life 2 basis (PDF link).
    2. Baked directional irradiance — Enlighten also generates an additional texture that stores the dominant light direction in the same way as offered by the directional irradiance method at run-time. For baking, this texture is computed for both indirect and direct lighting.
    3. Intensity output textures — Instead of storing irradiance in the output light maps, Enlighten can also the intensity of a light in the direction of the dominant light. Used together with the directional light texture, this enables relighting using any possible BRDF. This can be enable by calling the SetOutputIsIntensity() method in IBakeInputProperties or setting outputIsIntensity in the bake parameters when using the HLBS.

    If only a low-frequency normal texture and no specularity is used, then baking the result of the normal map into the light map is an option with no runtime costs. Enlighten will only bake light maps if enabled in the materials file by setting the useForBaking attribute of the normal texture to true. For the low-level API, the normal texture is used if it is set on the material passed into the Enlighten::IBakeInputSystem::AddGeometry.

    Directional light maps

    Directional lightmaps (lightmaps using other lighting normals like the Half-Life 2 basis) are widely used and supported by other baking solutions and game engines. As such, this method should work well as a drop-in replacement.

    Low level precompute API

    To supply the extra lighting normals, an Enlighten::IBakeInputGeometryLightingNormals object is supplied to Enlighten::IBakeInputSystem::AddGeometry. The object contains a lighting normal object Enlighten::IBakeInputMeshLightingNormals for each mesh in the geometry.

    Half-Life 2 basis

    In order to model any arbitrary surface in three dimensions according to the discussion above, a minimum of three vectors is required per pixel. By selecting three mutually orthonormal vectors you obtain a minimum basis set; that is, a maximally-efficient set of directions using this minimum number of vectors (see http://www2.ati.com/developer/gdc/D3DTutorial10_Half-Life2_Shading.pdf, page 10). If you specify more directions, you can obtain greater fidelity for off-axis geometry; however, if you use the High Level Build System, the Half-Life 2 basis is enforced.

    HLBS

    When the enableDirectionality attribute has been set, the High Level Build System automatically uses the normal and tangents stored with the geometry to create a Half-Life 2 basis for each of the vertices. The HLBS creates four baked outputs for each of the direct and indirect lighting cases; one for the normal direction and one for each of the three Half-Life 2 vectors in the basis.

    Baked directional irradiance

    Storing the dominant lighting direction in addition to the irradiance lightmap is a more memory effective solution then the directional light maps. It also permits seamlessly switching between the runtime and baked solution. On the other hand, baked directional irradiance isn't as effective as directional light maps at modelling light from different directions with different colours.

    Low level precompute API

    The directional irradiance texture can be retrieved from the Enlighten::IBakeOutputSystemIndirect and Enlighten::IBakeOutputSystemDirect objects using the Enlighten::IBakeOutputSystemIndirect::GetDirectionalIrradianceTexture and Enlighten::IBakeOutputSystemDirect::GetDirectionalIrradianceTexture methods.

    HLBS

    The extra directional information is always generated and is output in the same place as the irradiance textures. The texture filename consists of the lightmap name, plus a _Dir suffix.

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