[bug] Lightmap color continuity issue

So… I’m not sure if I understood this correctly.

The cause of this lightmap color continuity issue is that I don’t have the edges of the meshes aligned to the grid in the UV? I suppose that there’s no other way to solve this… I think that this may be quite difficult with more complex meshes.

I got this problem with a few wall variations in my tileset, and I just wanted to check if I could solve this without fixing the UV of every wall.

Thanks for your help!

@anonymous_user_fd378872 Marcos

Wow, this is an old post!

UV tricks that are posted around about snapping to the grid or doing the grid size based on 1/LightmapResolution - 2 won’t likely show you any improvements either. It can help in some instances, but it’s not going to get rid of the shading differences 100%.

This particular issue is caused by indirect lighting with precomputed lighting. If the faces are not connected via the UV, lightmass will not know how to match the shading on the edges of each mesh since they are handled on different cpu threads when they are being processed. This problem doesn’t have a solution yet and I know it’s something that we’d like to work on fixing, but there isn’t any planned timeframe for it, unfortunately. The best option right now is to use a single floor mesh for a room/area or ones that can hide the shading artifact by using other geometry to cover the seams.

While adjusting the UVs can help to some degree, it’s not full-proof and can sometimes prove to be wasted time only to see it didn’t resolve the issue. Also, by using fewer modular planar pieces (walls, ceilings, floors) you reduce drawcalls. I’m not against modular design, but depending on the geometry and if it’s just a flat polygon with a normal map you’ll run into many more issues than.