Lighting is weird on the edges of my modular building blocks

Hey Mr.Goatsy,

So in the second link you provided Tim H. provided a final image with some settings to try to help resolve modular lighting issues like the one you are reporting.

You said you have already tried the following, but those settings should be giving you a different result. Be sure your Lightmap UVs are snapped to the grid and padded correctly first.

Then try the settings below:

LM Resolution: 64
Light Build Quality: Production

World Settings:
Static Lighting Level Scale: 0.1
Indirect Lighting Quality: 2
Indirect Lighting Smoothness: 0.6

Try these settings and let me know if you need additional information.

Thanks,

I have had this problem a while now, when I place 2 or more exact same meshes next to each other(they are tiling) and I built lighting it looks like this:

That is a stationary light with shadows.

Why does it does that? The only fix I found so far is merging the meshes into one, but that is suboptimal and I rather not do it.

The things that I have tried are the following:

  1. Exported to Blender and created a second UV map - This zoomed the textures in and rotated them.
  2. https://answers.unrealengine.com/questions/34702/bug-lightmap-color-continuity-issue.html
  3. Modular Asset Lighting Problem - Rendering - Unreal Engine Forums

But that will really increase build time wouldn’t it?

I tried it out and it does seem to fix it but the build time went up by about 1000% even at medium quality, so this fix is also suboptimal.

Is there anything else I can try?

So now what you can do is begin scaling the Static Light Level back up in iterations until you get the right results with minimal build length time. Your first solution of combining the modular meshes is actually your best solution.

Once you have the modular assets in place and how you would like, you can combine them to reduce mesh draw calls which will also resolve your lighting issue. This is a typical workflow and using this process is a good way to optimize your project and clean up the lighting.

Thanks,

H

If I put the min lightmap resolution at 64 and the light map resolution also at 64 weird black lines are visible at the border, so that needs to be at at least 128 or 256, is there also a fix for that?

Not sure how applicable this guide is to UE4, but following the principle of not putting UV borders between pixels coupled with adjusting indirect lighting smoothing, I was able to minimize the issue, referenced in the question, to the point where it is was almost unnoticeable.

Do note, that you should mind size of your lightmap in a such way, that lightmap UV seams never fall in between pixels. Roughly estimate intended lightmap size for particular object, 64x64, for example and unwrap it using pixel snapping. Grid step for this would be 1/64=0.015625. Then, if you want to adjust lightmap resolution in the engine, you can do so via power of two value, and your snapping will preserve for higher or lower lightmap resolution.
And always leave some sort of padding for your lightmap unwrap, not only between UV shells, but also UV islands and 0-1 borders.

If you don’t want to bother with this precision during unwrap, or if you are still getting noticable seam, consider hiding it under some sort of trim geometry, or plan your modular kit so that border faces join always at some sort of angle.

I always use the UV map generated by UE4 unless it is a complicated custom mesh which in this case it isn’t.

My lightmaps are always a multiplication of 64 so that isn’t the problem.