How to prepare the geometry to avoid light leaking on large pieces?

Hi,

I have a question regarding how to properly prepare the geometry to avoid light leaking. If I have a complex or too large object that I need to split to get a better resolution on my UV/lightmaps, should I make a solid geometry out of each part making extra geometry on my modeling software, or each part can be open as long as they are together on Unreal with no gaps?

I made a quick test and it looks fine without the extra geometry, but I want to make sure that I won’t have a problem if I work this way on a big project. Please, let me know if you have experience with this.

Thanks!

Hi, anyone?

Maybe an example helps. Let’s say that I have an L shape solid mesh that I want to split to get a better resolution UVs. Should I have:

  • two shapes with six faces each (so two solid meshes that I will have to remap again),
  • or two shapes with five faces each would work nice (with no light leaking) as long as they touch each other?

Thanks

a picture would help explain better. But why do you have to split your mesh to give it multiple materials?

Hi,

I’m attaching some pictures for clarity. As I said before I may want to split a mesh to get a better resolution UV maps as Unreal is not very good handling UDIMS, not to apply multiple materials to a mesh (I may or may not apply the same material to the different meshes).

Let’s say that I want to separate the hand from the arm in the example attached, and I want to prevent light leaking. Should I close the gap at the end of the hand and at the end of the arm with extra geometry (so there would be two overlapping polygons from different meshes)? Or, I can leave the meshes of the arm and the hand “open” as long as the two different meshes are together, touching each other in Unreal? Again I want to learn how to make it properly to avoid light leaking.

*Please note that this is just an example to illustrate my question it has nothing to do with the size of the hand and the arm.

Thanks

Generally you want to cap geometry, like that, to avoid leaking.

Although you are better off assigning multiple materials to a mesh, instead of splitting it, if you just want higher resolution textures.

Also designing meshes that will bake well with lightmass is a large part of it.

I’m a bit confused. If I apply different textures to the same mesh I’m going to get the same resolution that is the resolution of the UVmap / lightmap, right?

Let’s say that I want to apply the same texture to the whole piece, but the resolution is not good enough. If I just apply the same texture to two parts of the same mesh I would get the same resolution. I will need to have UV islands with more density to get a better resolution.

You can stack 2 “different” UV maps on top of each other and not have them interfere because they are using different texture.

Let’s say you UV map an arm and leg separately, give them separate textures. You can merge them, merge the UV channel, have them overlapping, but assign them different materials and it’ll work perfectly well. (Or you can offset one of the models UVs by 1 so they aren’t visually overlapping, but effectively does the same thing).

@ZacD That’s right. It seems that you can offset the UVs and make a kind of UDIM distribution of the UVs. I made a test and it seems that it works fine even with complex UVs and multiple materials. The problem with it is that the lightmap is still the same quality as Unreal requires all the UV islands to be on the same UV map for the lightmap. Anyway, it is good to know that you can play safely in terms of texture resolution. Let me know if you think I’m missing something.