I have a problem to generate the lightmap UV set for a big object. I can create multiple material slots for the necessary texture details in Maya and it doesn’t matter if the UVs overlap in the UE4 for the textures. My problem is that this does not work for the light map creation as overlapping looks bad. I can set up a very(!) high light map resolution to make it work but there must be a better solution?
Is there a way to use a lightmap per material ID where the overlapping is no problem? Like you would import all mesh parts separately?
Any other hints for lightmap creation on a big object?
What is the big object? How big is it? You will probably have to break it up into multiple meshes.
In this case it is a house, in and outside with multible rooms. The problems are especially small details like the rain gutters. But in general, if things get complicated you need to import them seperatly, no way to use the lightmap per material ID?
Make sure you’re not using too many materials, each one you apply to a mesh will increase the draw calls and lower performance, try to do as much in a single material as possible.
The automatic unwrap feature uses your existing UV’s and simply runs a good flattening algorithm on them to a new UV channel, if you don’t have the UV’s split well then it won’t do any good. Realistically, you just need to set up your lightmap UV’s in your 3D software beforehand.
Thanks a lot for your answers.
@darthviper107 I already setup the lightmap UV’s in Maya. The problem is, if I import it to the engine it gets combined and the lightmap UV set can not have overlapping UV shells as the UVs for the textures, which can have overlapping UV’s as it is used per material ID, right? Do you know what I mean? So If I would want to use a lower lightmap resolution I need to import multiple mesh part separately in order to have multiple lightmap UV set and an overall lower lightmap resolution.
If you have separate meshes in Maya and then export to UE4 there’s the Combine Meshes option which will then import them as a single static mesh, your lightmap UV’s would then be overlapping. Most likely in that situation you wouldn’t be able to get high enough detail in the lightmap anyway because of the large surface area. So the alternative is to either not combine all of the meshes, or you need to combine them in Maya and then repack the lightmap UV’s so that they aren’t overlapping.
That is exactly the point! I was hoping for an option, to use seperat lightmap UVs based on the material ID but there seems to be no way.
Thanks for the clarification.
You can’t, it uses 1 lightmap per object