USING: UE 5.4.4
GOAL: I am creating a dynamic mesh and a dynamic texture. I need the texture UV map to have no overlap (as it would for a lightmap).
PROBLEM: Using “Auto Generate Patch Builder Mesh UVs” I end up with an island that when unwrapped overlaps itself.
ALREADY TESTED:
- Using XAtlas instead of PatchBuilder: This is very slow to run and yields a tattered UV map.
- Repack using Conformal or SpectralConformal: This results in a loss or resolution where UV triangles become very small, but can still yield overlap.
- Generating Lightmap UVs: same generation → same problem, bigger padding size
- Manually adding seams to the self-overlapping island: this solves the problem - so I just need to automate this step!
REQUEST:
It seems likely that many of the pieces (maybe all!) needed to address this exist within UE. The problem of course is that “to command the creature you must know its true name” so what I am looking for are links to documentation, or paths to “documentation” (code).
PLAN OF IMPLEMENTATION:
- Identify overlapping triangles. Since lightmaps can warn about this, it seems like a solution already exists somewhere.
- Group adjacent triangles with overlap. I can just use vertex index to determine this. But, I’m guessing that a data structure already is defined somewhere that does this.
- Create a seam to separate the overlap islands. Here, I should only duplicate internal vertices. Since island edges are drawn it seems like a solution exists to identify boundary edges and vertices.
( Ryan Schmidt, if you’re on this forum, thank you for building an amazing library! )