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.
/
Level of detail and baking

    This is the documentation for Enlighten.

    Level of detail and baking

    Nov 21, 2019

    Introduction

    If your scene uses multiple level of detail (LOD) meshes in a geometry object then the baking API will use this information to ensure that these objects do not self-shadow between different LODs. Different mesh LOD levels do not have to have their own lightmap but can do so by making use of the per-mesh lightmap functionality.

    HLBS scene markup

    Baking uses the same geometry as the precompute, and so shares the same .geom XML format. Adding lmName and lmType attributes to each <mesh> tag is usually the best way to get lower level of detail lightmaps to use a lower resolution.

    Sample scene

    In this scene there are two objects with level of detail information. There are two objects of interest, each composed of a pyramid (high LOD) and a cube (low LOD). Clearly these are not good examples of level of detail meshes, but show the effect quite clearly. GeometryA is on the left, and has an invisible low detail LOD used as the target mesh (cube) and a single detail mesh (pyramid). GeometryB is on the right, with a visible low detail LOD used as the target mesh, and a high detail LOD as a detail mesh.



    GeometryA.geom
    <geom id="" name="GeometryA" version="3">
    	<mesh name="pCubeShape1" filename=".\pCubeShape1.pim" lmName="GeomA" lmType="64x64" direct="true" indirect="true" target="true" lodLevel="-1" />
    	<mesh name="pPyramidShape2" filename=".\pPyramidShape2.pim" lmName="GeomA" lmType="512x512" direct="false" indirect="true" target="false" lodLevel="0" />
    </geom>
    

    GeometryB.geom
    <geom id="" name="GeometryB" version="3">
    	<mesh name="pCubeShape1" filename=".\pCubeShape1.pim" lmName="GeomB" lmType="64x64" direct="true" indirect="true" target="true" lodLevel="1" />
    	<mesh name="pPyramidShape2" filename=".\pPyramidShape2.pim" lmName="GeomB" lmType="512x512" direct="false" indirect="true" target="false" lodLevel="0" />
    </geom>
    

    The scene then specifies the two halves of a u-shaped box for the world, and places GeometryA and GeometryB instances. Each instance has a defined lmName attribute, and this is combined with any lmName attributes at mesh level to give the final lightmap name. See Per-mesh lightmaps.

    <scene name="LevelOfDetail" version="1">
    	<instance name="ubox_left" systemId="1" paramSet="Interior" geometry="ubox_left" type="Radiosity" lmName="A" lmType="512x512" position="-1000.0 0.0 0.0" rotation="0.0 0.0 0.0 1.0" />
    	<instance name="GeometryA" systemId="1" paramSet="Interior" geometry="GeometryA" type="Radiosity" lmName="GA" position="-1000.0 -500.0 0.0" rotation="0.70710678 0.0 0.0 0.70710678" />
    	<instance name="ubox_right" systemId="2" paramSet="Interior" geometry="ubox_right" type="Radiosity" lmName="B" lmType="512x512" position="1000.0 0.0 0.0" rotation="0.0 0.0 0.0 1.0" />
    	<instance name="GeometryB" systemId="2" paramSet="Interior" geometry="GeometryB" type="Radiosity" lmName="GB" position="1000.0 -500.0 0.0" rotation="0.70710678 0.0 0.0 0.70710678" />
    </scene>
    

    Combining the lightmap names from instance and mesh gives us 6 final lightmaps created, these are:

    Lightmap generated

    Geometry

    Mesh

    A_512x512

    ubox_left

    All

    B_512x512

    ubox_right

    All

    GA_GeomA_512x512

    GeometryA

    Pyramid

    GA_GeomA_64x64

    GeometryA

    Cube

    GB_GeomB_512x512

    GeometryB

    Pyramid

    GB_GeomB_64x64

    GeometryB

    Cube

    Final output

    , multiple selections available,
    {"serverDuration": 10, "requestCorrelationId": "057b2e5811ce49798605583266c00bce"}