Merge UV islands (relaxed)
API function: algo.mergeUVIslandsRelaxed
This function attempts to reduce the number of UV islands in a model by merging those corresponding to contiguous regions. Conversely to algo.mergeUVIslandsAffine, the set of deformations that can be applied to an island which must be stitched to another one is not limited to linear transformations. Instead, arbitrary local deformations can be applied and each merging operation comes along with a local reparametrization in order to reduce distortions in the resulting merged island.

The implementation is based on this research paper.
Tip
This process is particularly useful for complex and/or dense models generated by photogrammetry, which often delivers textures with highly fragmented UV layouts. For CAD models, prefer algo.mergeUVIslandsAffine.
Example
Here is the example of a 3D model reconstructed by photogrammetry. The initial UV layout (left) is highly fragmented (lot of very small isolated UV islands). The merging drastically reduces the number of islands (right), from 4864 initially to 254.
![]() |
![]() |
The following image shows the UV space reprojected over the 3D surface before and after the merging process. As can be seen, the island count reduction does not introduce noticeable excessive distortions in the parametrization.
Parameters
Occurrences
List of occurrences to process.
Channel
UV channel to run the island merging on.
Target island count
Stopping criterion: the island merging runs until the provided number of islands is reached.
If set to 0
, the algorithm just runs until no more valid merging is possible.
Energy threshold
The maximum unwrapping energy allowed during local reparametrization for a merging to be considered as valid.
Force isolated faces
If set to true
(default), UV islands consisting in a single isolated face completely enclosed in another island are forced to be merged, without reparametrization.