How to avoid long diagonal seams in baked lightmaps

This might be a Blender question, but I’m wondering what the best practice is to avoid these long diagonal seams on flat geometry that often results from carving more complex shapes into environment geometry.


You can see the edges in the mesh above, and the seams that appear in the baked lightmaps that I want to fix below:

Any tips would be appreciated. Thanks in advance!

Hi. Are the lightmaping UVs generated by Unity or are they custom?

I’m not sure. I created the mesh and imported it as an obj.

Looking at the import settings I had ‘Generate Lightmap UVs’ unchecked. I’ll see what happens if I check that and play with the settings.

I haven’t learned the optimal workflow for creating environment assets that will be receiving lightmaps yet.

If your models do not have custom ligtmaping UVs, you need to enable Generate Lightmaping UVs in the model import settings.
If you are just starting with lightmapping in Unity, I suggest you take a look at these tutorials.

https://www.youtube.com/watch?v=KJ4fl-KBDR8

https://www.youtube.com/watch?v=hMnetI4-dNY

Also UGuruz has good tutorials about lightmaping too. Like this one for example

https://www.youtube.com/watch?v=WFye3k4bvEc

1 Like

I’ll check these out. Thanks! @Nicrom

1 Like

I think most of the suggestions are not quite right. I think the huge ngon is causing you troubles.

Try making it make sense as quads

etc.

Unity triples the mesh when importing and the way this huge ngons is, there will be very thin and long triagles, which will cause issues. Try adding some more geometry to it.

Or try to triple it in blender and then tweak the edges until they make sense?

There’s no easy solution I think, but I think this is the actual problem.

After you’ve done that, either generate your own UVs or use Unity to generate the UVs, both solutions should work (although generating UVs on your own is always better).

1 Like

I ended up going wild with the knife tool, adding lots of tris and quads manually, seen here:

Then I also deleted the UVs in blender and Unwrapped them again.

End result in Unity:

Thanks @AcidArrow and @Nicrom for your help!

2 Likes