Uv channel 2 lightmap/ multi material setup,Uv overlapping question

I have a model with 6 materials on it, the uvs are not overlapping technically as each material is assigned to its own uv space. My question on the second uv channel for lightmaps is: Does the lightmap information get separated by material channel, or does my 6 materials have to be reorganized on the uv two together and not overlapping?,I have a model with 6 materials on it, the uvs are not overlapping technically as each material is assigned to its own uv space. My question on the second uv channel for lightmaps is: Does the lightmap information get seperated by material channel, or does my 6 materials have to be reorganized on the uv two together and not overlapping?

Hello Comatos,

When working with a mesh with multiple materials applied to that mesh you never want overlapping UV’s or lightmap UV’s. Try changing the resolution on the overall model to affect the lightmap settings globally for you six seperate materials. Be sure your UV’s are all correctly placed in the grid and spaced with a 2px or 4px buffer to avoid bleeding and lighting issues. Let me know if you resolve your issue after following these guides.

Here is some great documentation on lightmaps and how they function as a whole as well as ways to optimize your lightmaps: Although this provides examples in UDK, the basic principles are the same.

http://worldofleveldesign.com/categories/cat_udk.php#lightmapping

Thanks!

I guess I don’t understand the overlapping uvs, I always thought the main uvs could overlap if im doing separate areas of the mesh to increase resolution. The engine can distinguish these separate areas from the material channels. So it should be fine to have overlapping uvs to increase resolution on the normal materials. My question was just for the light map, and how it gets translated, It seems its not setup by material channels, but just setup from the one uv 2 channel. If that is the case, and im correct my uv channel two just needs to not overlap with all the uv shells, but uv 1 should be fine to setup 6 materials that are overlapping for increased resolution. Is that thinking correct, or am I wrong?

Hey Comatos,

You are correct in that the overlapping UV’s of the materials can occur, but in order for the lightmaps of a submaterial mesh to render correctly they must be spaced appropriately. This is because the light source cannot differentiate what is, and is not a different material. It lights the object as a whole mesh which is why the UV’s must be organized. I have posted a couple of pictures to help explain better what I mean. I hope this helps!

UV’s for multi-material object

UV’s for Lightmap

Mesh with multiple-materials on it

18047-in+game+mesh.png

Cheers!

Awesome that answers what I needed to know, I appreciate the help!

Happy to help, and let us know if you have any other questions!