Light map seams

Hi all,
Im working on a vr project. Therefore I need to bake lightmaps. But for some reason when baking lightmaps with lightmass I get seams on the edges of 2 models, when they are intersecting. Or I have several seams on larger models where the lightmap should have been connected.

I have 2 uv sets. uv set one for texture, uv set 2 for the lightmaps. When importing the model i uncheck create lightmap by ue4 and make sure that the lightmap index is set to one (if im right, an index of zero means uvset 1, an index of one means uvset 2). Somehow i still get the feeling ue4 does not select or uses the right lightmap from my model.
Also I have made sure that the lightmaps have some padding to prevent bleeding.
I have increased the size of the lightmap resolution. But it only sharpens the shadow.
The models I use are boxes. This is with reason because it blocks the light. It won’t when I use a plane.

Lightmap seams on large asset

Lightmap seams between 2 models

uv set 1 of large model

uv set 2 of large model

Model details of large model

Model details of smaller model

Model details of arch

I feel like I’m missing one tiny checkbox. Hopefully there is someone who can help me out.
Many thanks in advance

When baking, the system does it separately for each object and does not take into account the fact they might be joined.

You might be able to reduce the problem by tweaking lightmass:

indirect lighting scale to 0.1-0.15 and 0.6 for smoothness, also make sure you have an importance volume.

1 Like

Hi Clockwork, Thanks for the reply,
I guess my understanding of lightmaps is wrong. But how come that if a shadow is baked perfectly over 2 models I still see a seam when two models are close to each other?

In addition, when I see walls made of modular pieces or just large geo’s I don’t see any lightmap seams when two pieces are adjacent with each other. As far as I know ground, floors and walls are not one big piece of geo. But cut in several pieces. For example, the ground outside, let say a forest, road or street. Guess I’m missing something? Hopefully you have an opinion on this.

The seams of the ground are fixed at this moment. I’ve copied uvset2 to uvset 1. So for some reason UE4 still chose the previous version of uvset 1 even though I set it to use uveset 2 for the lightmaps.

Like I say, it doesn’t take adjacency of objects into account. It doesn’t understand they are all part of one wall / floor.

Did you try the param tweaks?

Yes, adjusted the parameters. But the seam was still visible.

A seam that evident is far more likely to be caused by bad normals than anything else.

In the model, select the 2 vertex that make the line, copy their normals. Select the adjacent ones in the other model and paste the normals.

Also view world normals view.
And check that all lightmaps have the same density via the optimization view mode.
To bake light on larger models you’ll need to set a larger ligbtmap which brings us to this bit…

With such a set of repeating geometry (arch)…
Why not instance one of those walls and just add several at the appropriate places in engine rather than create a model that’s essentially unable to occlude?

Technically the same for the floor. If it’s the exact same geometry tiled several times. Doing so in engine will be better.

1 Like

Weird thing is I’ve checked the normals of those vertex/ points. Im switching back and forth from Maya to Houdini to create these models.

With lightmap density you mean the resolution of the lightmap. And the size of the checkerboard pattern shown on the model during optimization mode.

Instancing of repeated models is a good thing to keep in mind for optimization. The curve of the placement of those archs was done with a spline and exported so it was easier to place with maintaining the curve.

Yes.

Nothing stops you from placing models over a dummy one used to keep proper spacing. You just have to remove it afterwards.

I do that for almost anything since it’s way better to see large buildings in the 3d program to adjust things…
Usually I assemble the lowest lod size possible and use actor merge to create distance impostors from the separate items.

1 Like

Thank you for your insight!