Overlapping Lightmap UV's are not registered

Hi Vawx,

We have reproduced your issue, and have entered a bug report that you can keep track of using the link below:

Thank you for your report, and for providing concise and clear repro information.

Please refer to that link for any further updates regarding this issue.

Have a great day!

I have been working on an editor tool to diagnose some general asset problems and I noticed that in UStaticMesh there is a function to detect out of bounds / overlapping lightmap uv’s but no matter what I do, I cannot get any errors for overlapping UV’s, only out of bounds.

TArray<FString> MissingUVErrors;
TArray<FString> BadUVErrors;
TArray<FString> UVSuccessMessages;
Mesh->CheckLightMapUVs(Mesh, MissingUVErrors, BadUVErrors, UVSuccessMessages);

Mesh is a reference to a UStaticMesh Object.

CheckLightmapUVs( ) will check for overlapping or out of bounds error messages. On the image below, it does return one BadUVErrors in the FString array but when I debug through the function, it is because the result is based on:

bool result1 = IsPointInTriangle(CurTriangleUVCentroid, OtherTriangleUVs );
bool result2 = IsPointInTriangle(OtherTriangleUVCentroid, CurTriangleUVs );

if( result1 || result2)
{
    ++OverlappingLightMapUVTriangleCountOUT;
    ++TriangleOverlapCounts[ CurTri ];
    ++OverlappingLightMapUVTriangleCountOUT;
    ++TriangleOverlapCounts[ OtherTri ];
}

IsPointInTriangle( ) isn’t ever returning true.

As a secondary option, below is an image that comes back with zero errors and a “success” message:

1 Get a reference to a UStaticMesh object that has a LightmapUVCoordinateIndex set to 1 (should be by default)
2 Make sure that there is overlapping UV’s in the lightmap uv.
3 Call CheckLightMapUVs( ) on the mesh.

RESULT:

MissingUVErrors, BadUVErrors will hold no results.
UVSuccessMessages will.