Lighting error when building

Hi there,

So i’ve been trying to import some models for a while now, progressively getting through until i reach another error. The one i can’t seem to find a solution for though is this: My models look fine when the level hasn’t been built yet, however once i build it they come up with very jagged/unusual looking shadows which for the life of me i cannot seem to fix.

I originally was unwrapping both UV channels in 3dsmax, however when i unwrapped the first channel it would mess up all the textures. After reading up a bit about it i figured if i just unwrap the 2nd channel and leave the first one as-is, there wouldn’t be a texture issue and i can use the 2nd channel for lightmapping (not sure if im correct on this).

However when i try import with any combination of settings really, i get this same issue over and over. I would post my import settings but to be honest i’ve tried so many combinations i’m not even sure which one would work. Generate UV’s/Import LOD’s dont change anything at all, changing the lightmap resolution inside the static mesh editor doesn’t help, and disabling texture streaming in the Render settings didn’t help either, so to be honest i’m totally stuck.

Any help would be greatly appreciated.

Typical workflow will have the first UV channel for your material and the second for your lightmap. When you import, disable the option to automatically generate lightmap UV’s (since this will create an additional UV channel)
By default it will then use the second channel for the lightmaps. After that you need to change the lightmap resolution for the object, by default it is 64 (64x64 pixels) which is usually too low. Open the static mesh from the content browser and find the lightmap resolution in the properties on the right.
You can also change the lightmap resolution for an object in a level by selecting it and going to the properties and changing the Override Lightmap Resolution setting in the Lighting section for that object–however that will only apply to the actor in the level and not to other copies or the static mesh in the content browser.

Thanks for such a fast response! I had a feeling it might be the lightmap, but with so many things potentially wrong it was a bit hard to tweak everything. I’m not really sure about what to do from here though. I’ve set the lightmap resolution to 1024 which from what i can tell is pretty high, there still seems to be some small spots with tiny issues but i figure those might go away once i get into material editing. In the process of trying to figure it out on my own, i discovered i have none of these issues if i export the FBX as individual meshes instead of combining them all together in 3DS Max and exporting it as 1 static mesh. The only reason i was doing that in the first place is because i was under the assumption that 1 static mesh would be a lot less intensive than multiple meshes, but if i have to set the lightmap resolution super high to fix this issue, which is the better of two evils?

The number of objects will have an impact on performance because it increases draw calls. For simple objects it’s best to combine objects but there can be cases where a high resolution lightmap isn’t good enough for a mesh and you have to split it up to use multiple lightmaps.
The shadows on your mesh are due to the edges of the door which are in shadow where the pixels from there are bleeding to the outside, you can fix it by either deleting faces that are covered like that or split them to a new UV island in your lightmap UV’s which will prevent those pixels from bleeding over.

However–if your vehicle is going to be moving around then you don’t need lightmaps at all since lightmaps are for static lighting.

I see, thank you so much for all the help, i really appreciate it :slight_smile:
The car is intended to be static, it’s just for parking outside of houses etc. so the lightmaps are necessary. I bumped up the lightmap res to 2048 and all those bleeding pixels are gone too, but i’ll try tweak the faces in a new UV island and see how that works too. Is there any sort of rule-of-thumb for knowing when a lightmap resolution is just way too high-res to be viable though? Obviously this is just a car in a blank project so everything is going quickly and smooth, but i imagine if i’m doing something really inefficient, once i get to hundreds of meshes it will start becoming a really big issue.

Rarely should you go up to 2048 resolution, that’s a lot for just a prop. What would help is to modify the car mesh to remove stuff like the door edges and then render those details to a normal map, that would allow you to use lower resolution lightmaps and save on geometry and you wouldn’t have to deal with lighting issues. What you ultimately do is try to optimize things as much as you can to a level you’re comfortable with a quality compromise.

Thank you so much for the help :slight_smile: