Problem with light gradient being cast on static meshes

I have a set of static meshes which are used as part of a modular building system. Each panel is 400 units across and 400 units high. To make a wall, you just stack them next to each other. Unfortunately, this technique is having trouble with the lighting. Here is a sample screenshot:

You can see clearly see the boundaries of each mesh instead of having a smooth gradient across the span. In this example, the level is just a simple box room with a single point light in the center.

The static meshes have UV coords for both texture and the light map. Checking the lightmap density in the editor doesn’t show any problems. (You may also notice the ceiling, which is a BSP brush, has a smooth gradient as desired. So the problem seems to have something to do with using static meshes.) The material used for the wall doesn’t use UV mapping, so I don’t think it’s a material problem.

Any ideas?

Lightmass interpolates between multiple surface samples to create smooth results. The problem you are seeing is that this interpolation does not happen across the boundary between objects. (Someone from Epic stated they wanted to implement this a while back, but sadly it still hasn’t happened yet)

There are multiple methods you can use and combine to reduce this problem:

  • Mask the transition with mesh detail. When there’s a trim or some other geometric irregularity at the boundary you’re far less likely to notice.
  • Reduce the amount of boundaries. It looks like you could replace this wall with a single mesh that is simply scaled in one direction to match the length of the complete wall.
  • Lower your lightmass interpolation setting. (Going too low will result in splotchy results)
  • Raise your lightmass quality. Should help by itself and should allow lower interpolation values, but will have a significant impact on rebuild times.

For simple geometry like that you should not be constructing it out of multiple meshes, you lose performance due to the increase in draw calls, which is going to be more of an impact than the amount of memory that you’re saving by reusing meshes.

The geometry is simple on this side, but the other side is a detailed exterior wall. It would be nice to have a single object for the entire wall, but that kinda defeats the modular objective of the mesh.

Modular design isn’t always a good choice. If it’s saving only a little bit of memory at the expense of a high draw call count then that’s not the way to go.

The goal isn’t to save memory. (There’s not that many polys in the meshes.) The goal is to make life easier and flexible for the level maker. Making a model for every single wall is extremely time consuming and labor intensive.

Why not just split the inside and outside of the wall? Make it extra modular and then stretch the inside mesh across, while you repeat the one on the outside.

Here’s 2 topics you should read

That would make life easier. But I’ve had trouble with single sided meshes bleeding light.

If you still have an outside surface it shouldn’t bleed light, as long as it’s there it doesn’t matter if the mesh is joined together.