Problem with auto light mapped UV's and overlapping UV's

Anyone know how to get around the Auto Lightmap UV problem with overlapping UV’s?

I notice that if I import a static mesh and tick the auto lightmap uv option; if the UV space has overlapping UV’s, the engine doesn’t split them up, it just keeps them overlapped and the lightmaps come out completely black in the overlapped areas.

The auto lightmap generator is not perfect, so the best way is to create your lightmaps in your 3d program -> :// :slight_smile:

Yeah, that’s kinda what I was afraid to hear. I’ve seen that tutorial before, making perfect lightmaps by hand can be time consuming.

I wonder why Epic didn’t take overlapping UV’s into consideration when making the Auto lightmapping option?

Tips.

Try deleting the asset and re-import. Some times it works somethings it don’t

Check the assets UV in the viewer. It will at least tell you what surfaces are causing problems.

Mirrored surfaces can caused problems if the UV is wielded at the seam.

Thanks for the tips.

It would be nice if they added a tick box that allowed you to specify if your mesh had overlapping UV’s.

The overlapping UVs issue you’re having is that the generated Lightmap UVs that the editor does just repacks the UV channel 0 (texture UV). This takes the existing UV islands and spaces and stretches them to utilize the majority of the 0,1 space for your lightmap UV.

It does not create new seams for your existing UVs. For instance, if you create a cylinder mesh in your modeling program and do not break apart the faces into their own UV islands (ie a rectangle and two circles) the generated UVs in UE4 will not do this.

The truth of UVs is that they can be a time sink, but it’s a major process in 3D modeling that is a necessity. The auto generated UV can save you a bit of time if your texture UV has already been seamed and separated in a manner that fits within the limitations of the system.

Thanks for the clarification .

I understand the Engine will not create new seams, but what about something like a vehicle model. For example, I’d only model one wheel. I’d duplicate that wheel three more times and let the UV’s overlap each other. They are already laid out, seamed and what not. Could the engine then recognize that wheel as overlapping UV’s and space them out accordingly when it creates the Auto Lightmap UV?

It seems like if the engine is capable of identifying overlapping UV’s, it should be able to adjust them as well.

If you’ve laid out your UVs and overlapped these four wheels that are seamed correctly the generated UVs will space them accordingly. It’s no different than the example that I used with the cylinder, just imagine that I’ve got four of them and they are overlaid in the texture UV (channel 0). When the generated UVs are created, so long as the islands are created it will space them accordingly.

Also, this may have been mentioned before, once you’ve generated the lightmap uv make sure that it has actually been set. You can do this by looking at the Static Mesh settings tab > Lightmap Coordinate Index. Make sure that is set to 1 so that it utilizes your generated lightmap UV.