This is the documentation for Enlighten.
Lightmap UV charts
In UV mapping, triangles in a mesh are sometimes grouped into different connected regions, known as charts. 3D modelling tools use various names for this concept, including pelts, shells and islands.
The image below shows two ways to group triangles into charts when creating a lightmap UV map:
The bold lines indicate boundaries between charts. The version on the right is grouped into two separate charts. |
There may be a discontinuity in the indirect lighting at the boundary between the two adjacent charts. This occurs because the adjacent triangles no longer occupy a continuous region in the lightmap, and may have different lighting values.
How a mesh is split into charts determines where the seams in indirect lighting occur. Seams are desirable in some scenarios, such as where two surfaces meet at a right angle. The boundary between charts may cause unwanted seams when using lightmaps in other scenarios, such as on the surface of a sphere.
Forming charts
Enlighten groups triangles connected by at least one shared identical vertex into a single chart. By default, Enlighten considers vertices identical if they have the same position, normal, and input UV values. This results in chart boundaries where:
- there is a (possibly tiny) gap in the surface of the mesh
- two triangles meet at a hard edge (different vertex normals)
- there is a split between charts in the input UV mapping
If the material UV value is considered when determining identical vertices, unwanted boundaries between charts may be created where there is a discontinuity in material UV value.
Controlling charts
The artist can force charts to be split at a specific location by providing an input UV set as a basis for the lightmap UVs. In this scenario, Enlighten doesn't group triangles into a chart unless they're connected in the input UV set.
When the Automatic UV simplification method is used to generate lightmap UVs, the location of boundaries between charts is controlled by Auto UV parameters.
Visualization
To visualize how a mesh is split into charts, use the Chart Identification Visualisation in GeoRadiosity. After performing chart detection, each chart is shown in a different colour.
The images below show the effect of input UVs on the way charts are formed.
Charts formed when vertices with the same position and normal are linked | Charts formed when additionally considering input UVs |
When only the positions and normals are compared, fewer charts are formed. When the input UVs are considered, the charts are split where there is a split in the input UVs.