[Lighting] Dark artefacts on parts of static mesh when baking lights.

Hi everyone,

I’m relatively new to Unreal Engine (and super new to lighting as well!) and I’m having some issues with lightmap and light baking.
I’ve modelled and textured an asset and brought it in the engine. So I believe I have a good UV layout for the lightmap.

Here’s the model (with UV map as well):

And here’s the (infamous!) shadow glitch, that is super visible on the keyboard part:
Computer_LightGlitch.jpg

My lightmap density is at 128, the mesh is static, and nothing on the UV map is overlapping, I don’t know what’s going on. I’ve watched videos on Youtube about lightmap and all, but I still can’t figure out what’s going on here…I’m sorry if it has already been talked about a million times before, I don’t know what to search for to find any solution.

If you need more information or screenshot to help, please let me know, I’ll send them as soon as I can.

Thanks in advance for the help guys, have a nice day!

JumanCreative

You need way more padding between UV islands at that lightmap resolution. Right now the UVs are so tightly packed that lightmass will paint the same texels for different positions of the surface, that’s where the artifacts come from. It checks if spot A on the mesh is in the shade or not. If yes then it paints that texel of the lightmap as black and it solves the position of the texel by using the UV map. Then it checks spot B on the mesh and its not in shade and it paints that spot as white. But since the UVs are so closely packed the UV coordinate resolves into the same texel coordinate as with spot A and you get overlap.

Try overlaying a 128x128 checker texture on your UV map, that way you can see how much space a single lightmap texel will take in the UV map.

Fully agree, I also think that you can also split those closed stripes you have.

Oh, I’m starting to understand, thank you, guys!
It brings some more questions to me though (you’ll probably see how much of a newbie I am haha):

  1. Can I increase the padding directly with the lightmap generation built inside of Unreal? Or do I need to get back in Blender to re-edit my UV map/lightmap?
  2. If I increase the padding, I assume the risk is that I’ll end up with a lower quality lightmap. Is there a process of laying out the UV that can allow me to have minimum padding so I can get the most of my lightmap, even at a 128px resolution?
What do you mean by closed stripes? What does it cause?
  1. Lightmap seems to add a lot of work to the overall process of making assets. Do you have a workflow that allows you to speed things up, eventually?

Thank you again for the clarifications, I’ll work on it and correct the issue!

About #4:

You can skip lightmapping entirely and use dynamic lighting.
Lightmaps are cheap to render, dynamic lights are not, but lightmaps eat a lot of extra memory.

Soooo if I’m correct about this, I can work with dynamic lighting all day to build my levels, and then I can make an optimization pass to have better performance and loading times for instance?
Thank you sir :slight_smile: