Why do presice UV coordinates not seem correct in Lightmap Density view?

I’m trying to verify I’m creating optimal lightmap UVs. In the first image you see that I’ve unwrapped a simple cube. In my modeling program I set the texture size to 32x32. I positioned each cube face so that it’s aligned with the pixel boundaries and each face has an 8x8 textured area with 2 pixels of empty padding.

If I create a 32x32 checkered material and texture the cube everything looks correct in UE4 as shown in the second image.

However if I turn on Lightmap Density view the coordinates seem stretched and skewed slightly. For example in the third picture instead of 8x8 texels per face I’m getting something near 7.5x7.5 and they are not lined up as you would expect just like in the textured image above.

I’m exploring this because it seems like I’m having lightmap issues in my level that I shouldn’t. I’m wondering if it isn’t related to this somehow.

Is this perhaps related to this issue?

I already had this problem with UDK. Did you find an explanation or solution?

I believe I’ve understand what causes this now. Unreal will repack UVs from multiple meshes into a single UV unit grid so they can share a common lightmap texture (typically 1024x1024 each) for performance reasons.

I imagine they probably allow a little flexibility in the scale and positioning of these new UVs shells in cases where it could squeeze an objects lightmap UVs in at 95% scale rather than waste a chunk of lightmap texture space… Which would explain why I’m only getting something like 7.5x7.5 instead of 8x8 sides on my cube example above. It makes sense that when this is done the UVs might be slightly offset.