Lightmap won't build, UV overlap

UE5 tells me that I have objects with overlapping UVs. The UVs do not overlap. Even if I tell UE to generate a new lightmap, increase the lightmap size to 2048, and assign the new lightmap in the coordinate index, it still gives me an overlapping error.

What should I do to fix this?

The lightmap should still build even with overlapping UVs, the mapcheck will just complain about it and you’ll get errors in the overlapping regions.

Most likely your geometry overlaps within islands or is mirrored, could also just be a really small triangle somewhere that is difficult to see. Basically issues that can’t be fixed by regenerating the lightmap UVs in the editor.

If you build with error coloring it should highlight where they are;
image

1 Like

Ok, thanks. I’ll turn that on to see if I can find it. If I do find it, how should I resolve the issue? Re-import the asset?

You can try but you’ll most likely have to re-unwrap it in your modeling software. Unreals lightmap generation algo can’t fix some errors and if it didn’t work the first time, I doubt reimporting it will help.

Unreal’s lightmap generation essentially just repacks an existing UV map, so if you have contiguous geometry that overlaps itself, you’ll have to fix that manually.

Unreal does have some UV tools in the modeling plugin that might be able to fix this though, I don’t know enough about them to really give you any guidance on that.

1 Like