This is the documentation for Enlighten.

How charts are identified


By default, Enlighten groups faces connected by at least one shared identical vertex into a single chartBy default, Enlighten considers vertices identical if they have the same position, normal, and input UV values, and does not group faces across a hard edge.

To control which attributes Enlighten should compare when determining identical vertices, in the geometry object use the mesh attributes: comparePositionscompareNormalscompareChartUvs or compareAlbedoUvs.

For example, to merge charts across hard edges, specify compareNormals=false

In the example below, vertices are linked together based on positions, normals and chart UVs, while ignoring normals and albedo UVs:

<geom id="1" name="Room1">
    <mesh name="Room1" filename=".\Room1.pim"
          direct="true" indirect="true" target="true"
          compareNormals="false"
    />
</geom>

Shared vertices

In a typical rendering pipeline, various data is associated with each mesh vertex. Each vertex has a position and normal and may have more than one set of UV coordinates. When two adjacent faces have a coincident vertex with identical data the vertex can be shared between both faces. An indexed triangle list allows sharing by assigning these coincident vertices the same index into the vertex array.

When two faces share a vertex with the same index, both faces will always be grouped into a single chart by Enlighten. This ensures that each shared vertex is assigned a single lightmap UV coordinate, and the final lightmap UV set can be indexed in the same way as the input vertex array.

A shared vertex can have only a single lightmap UV coordinate; all faces sharing the vertex are grouped into a single chart. Where a boundary between charts is desired the vertices must be duplicated in the vertex array. A simple and intuitive way to force such duplication is to author a seam in the chart UVs between the faces. Coincident vertices with the same position and normal cannot have the same index if they have different chart UVs.

Degenerate triangles

Degenerate triangles are triangles that represent lines or points and aren't visible when the mesh is drawn. Degenerate triangles are sometimes added to meshes by triangle strippers to allow two otherwise disconnected strips of triangles to be joined and rendered as a single strip. This isn't necessary when using indexed triangle buffers.

When your mesh contains a degenerate triangle that shares identical vertices with other faces, Enlighten groups the faces into a single chart. You can prevent this by omitting the degenerate triangle when constructing the triangle list in the mesh object.

If you suspect charts in a mesh are being merged due to degenerate triangles, use the GeoRadiosity Chart renderer and select Remove degenerates.