Lighting seams between modular environment pieces

I’m having serious difficulties getting rid of lighting seams and uneven lighting in Unreal 4.10.1. My lightmaps are aligned to the proper grid and are spaced out enough and I’m still having this problem. The texture itself also tiles perfectly. Here’s the DL for the .FBX model that’s causing these errors in the engine (the forum attachment isn’t working for me):

What’s the problem here? I’m using both static and stationary lights, with a lightmap resolution of 64 (I’ve changed this to see if it helped, it didn’t) and a lightmap that is aligned to a 64x64 pixel grid. Can anyone shed any light on this issue? badum tss

Also, if it helps to mention, I’m using Substances for materials.

Thanks! :slight_smile:


I have attached a zip file which contains 2 meshes. Both files have UV fixed. I’ve also attached the built lighting preview of your mesh in-editor. You can check the fbx and see how the lightmap uv is done.

1.floor_std (original mesh with lightmap fixed)
2.floor_std2 (scaled up the mesh since it was really small for editor to recognize. Fixed lightmap)

Hope this helps.

Best Regards.

Thanks a ton! I see that the UVs have been moved off of a 64x64 grid and re-arranged. Can you explain to me your reasons for doing so and why this worked?

Also, I applied the model to my project and I’m still getting a degree of uneven lighting. Why is this?

This is quiet strange that you are still getting artifacts. Screenshot that I gave you was after lighting building in a default third person scene. Which mesh are you using for this scene your original mesh or the second mesh that was given?

Your UVs were not on grid or may be you were using some different value for grid adjustment. I use max so I had tweaked the grid distance to 0.05 and then pinned all the vertices to grid points.

Best Regards.

Thanks for continuing to discuss this. I’m using the mesh that you gave me. In my personal UVs that you fixed, the UVs were snapped to a 64x64 pixel grid, since my lightmaps are 64x64. I imported a 64x64 checker material and snapped each vertex to the “vertexes” connecting the pixels of the image.

The issue is that lighting on each mesh gets processed separately, and so things like smoothing don’t take the other meshes into account and you can get slight variations between meshes. In your case, you get no benefit by constructing things that way, instead you acctually make things slower because that increases the draw calls and doesn’t save memory. For such simple meshes it’s better to have a single mesh for the wall rather than trying to build it out of pieces. Modular is more for thing like windows/doors/pillars/props.

You’re absolutely right, and I realized that as my project expanded outside of a single interior room. I have, however, accomplished smooth lighting using this technique, and since the project is essentially done, would like to be able to light it smoothly.

You’d need to space to a 62x62 grid because UE4 cuts off a pixel on each side. That also causes issues if you align to a 62x62 grid and decided to jump up to 126x126, you’d have to go to 254x254 to stay matched up with the grids.

Also make sure you bake on production, and maybe try setting the indirect lighting quality to about 4 if you want the best results, but that will increase render times.

Still, lots of times that is not enough to completely eliminate light map seams, and the best and easiest options are to design your meshes and levels around avoiding having flat seams, that includes making a wall one mesh, covering seams with pillars and other props. It’s also better for performance to have several large meshes instead of a ton of tiny ones.

Thanks for the valuable advice! I will definitely keep all those points in mind going forward.

Is there any way to set up UVs so that they’re compatible with any lightmap resolution?

As said before; the seams that remain will go away if you up the indirect lighting quality, or change the NumHemisphereSamples in the baselightmass.ini file. But if you decide to go for the last option you will have to balance out some other values as well to get good results.
This topic has a lot of good information on changing the .ini file:

*Right-click “Creating single static mesh from selected actors” and replacing the single ones could be a workaround *(it happened again)
“Force Volumetric Lightmap” in the object settings might help