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 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.
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.