Overlapping UVs, help me understand them!

I know this sort of question has been asked and answered on here before, I just don’t feel like I’m reaching anywhere near the level of understanding I need when I read the answers suggesting adding a second UV channel.

In the attached screenshot, I have a basic scene with a few starter pack meshes added. I dragged a material onto one of the items (a sphere) - you can see the errors regarding overlapping UV maps which I seem to have on the skybox and the material sphere. To try and resolve these errors, I checked the box marked “Generate Lightmap UVs” in the mesh editor for the sphere but I still get the error?

I don’t really get the problem to be honest!

  • The system uses a UV map to generate lighting right? I can’t actually see anything that looks odd about the material sphere - what exactly am I trying to fix?
  • Is Unreal doing it’s best to work out what to do here but I have to tweak the mesh in some way to help it create a proper light map?

I hope I’m not too vague, I just feel a little lost at the moment with something so fundamental so soon after starting to scratch the surface!

Hi Neil,

Sorry for your frustrations. Lightmaps can definitely bring that on! :slight_smile:

Looking at both those asset in my Content Browser I can see that they do not have properly setup LMs which would explain why you’re getting the Overlapping UVs issue.

For the Sky Sphere in this particular scene it’s not really an issue since it is so large and it’s has it’s “Cast Shadows” flag turned off.

For the Material Sphere we have a slightly similar issue with the LM.

Currently, using the Generate Lightmaps will NOT work properly with something like this because the UV has not been split in the first UV channel for the texture.

To give a brief overview of how the generated lightmaps is working.

When you select this option UE4 will look at the UV layout for the Texture and reorganize the UV islands so that there is no overlap an that the 0,1 UV space is being used fully.

When you have something like a closed UV island like a Sphere or Cylinder side that has not been split and flattened out you will see errors in the generated LM because UE4 does not split UV islands apart for you. It only reorganizes them.

I hope this helps and if you have any questions feel free to ask. :slight_smile:

Tim

Thanks Tim! Can you clarify a couple of things? Hopefully this is on-topic but I’ll create a new question if you think that’s appropriate:

For the Sky Sphere, is it possible to ignore the warning on that mesh only (as we know it isn’t going to affect me)

And where you talk about islands, UV space and flattening - that’s unwrapping? Because if I have read your answer correctly, the auto-generation of light maps uses the unwrapped UV texture map as a guide to make the light map?

For the Sky Sphere, is it possible to
ignore the warning on that mesh only
(as we know it isn’t going to affect
me)

This is correct. It would be annoying if you’re OCD and want to not have any error messages, but since it’s not affecting your scene in anyway by having it you can just ignore it. :wink:

And where you talk about islands, UV
space and flattening - that’s
unwrapping? Because if I have read
your answer correctly, the
auto-generation of light maps uses the
unwrapped UV texture map as a guide to
make the light map?

Yes, the UV islands are the chunks broken apart. I’m not sure if this correct terminology, it’s just what they were referred to when I was in school.

You got it on the second part! The lightmap generation looks at the unwrap of the texture UV and repacks it accordingly.

Tim