I posted this question at answerhub but I didn’t get any response so I’m trying here instead. Lights (point light in this case) looks fine when I move them around the scene or change parameters for them. Like in this picture, the light spreads smoothly over the building (a static mesh) and looks somewhat realistic.
Then I hit the Build button. And the shadows become blunt and sharp. There’s no smooth spreading of light anymore. I can then move the light around a little, or change a parameter and the light suddenly pops back to normal as in the picture above. But this is what it looks like after I hit Build.
I get a feeling that I’m doing something fundamentally wrong here. But I tried increasing the lightmap resolution on the mesh to ridicilous values. It’s actually at 2048 in the last picture. Plus, the light looks super fine in the first picture. It just wont stay like that after I hit build.
The problem is probably with lightmap resolution. Because objects are static, their lightning can be prebuild. The resolution of lightmap, however, is probably too low, or the lightmaps are not properly set. Try increasing the resolution of lightmaps on your objects and rebuild (Lightmap resolution on your mesh). If you use non-uniform scaling, you will also also get lightning artefacts so try to avoid it on static meshes.
How large is the mesh and what do the light map UVs look like?
[/QUOTE]
The model has some 10,000 vertices. And below is the light map UV (I think? Light map UV maps are vaguely documented, but as far I undestand it UV channel 1 is the light map UV). I highlighted the main building mesh in red so you have a chance to see what you’re looking at. The walls and the cieling, that is.
What puzzles me and what’s very confusing is that the light looks fine before I hit build (see first picture in my original post above). So, Unreal is obviously capable of generating proper lighting on the mesh. I mean, it’s there. I can see it! Why oh why can’t the light stay exactly like that after I build the scene?!
Your lightmap UV’s are bad, but for the light you also need to increase the radius to create softer lights (lights with larger surface area create softer shadows).
The issue with your lightmaps is that you have too much stuff there, even with a high resolution lightmap you will struggle to get enough detail. Besides that, the UV islands are too close together and you have too many varying sizes which both will cause issues. Try and split the mesh into separate pieces, start with something like the walls as a single mesh and see if that gives you enough lightmap detail. It looks like you have a lot more than just that hallway there so maybe split off the hallway to one object.
What you say makes perfect sense. But what I don’t get is that Unreal in fact is fully capable of render smooth lights and shadows as I move the light around (picture 1 in my original post). It looks more than fine to me. Why does it convert the lighting to absolute **** when I hit Build?! Is there no way to keep the lights the way they appear in picture 1??!
You can set the light to moveable and rely on static lighting. But if you want the best looking lighting for interior shots and the best performance, you’ll want to use baked lighting. When you bake lighting, it’s literally saving the lighting information to a texture.
When you move the light around it’s showing realtime preview shadows, which do not depend on lightmap resolution. When you build the lighting, it bakes the lighting into lightmaps which are literally like textures that are applied to the meshes, so the amount of detail in the lightmap depends on the lightmap resolution. Each object gets only one lightmap so that’s why having so much geometry in a single object causes the lightmap to be low-quality. The benefit of using lightmaps are that you can do a lot of high quality lighting processing beforehand and get effects like bounce lighting (GI) which you can’t get with realtime lights. Realtime lights also have a bigger impact in game performance. So by using lightmaps, you get higher quality lighting with better performance, the only issue is that it’s not real-time.
Thank you very much for that explanation! Now I get how it works a little bit better, and it makes more sense to me now. I should obviously divide my objects in smaller subobjects and assemble it back in Unreal. Thank you again!