Why don't my static lights appear after building the scene?

So something weird is happening with my point lights. I have a dark hallway in my scene and I put a point light in it to light it up. The lights do show up so then I go and build the lighting however when I do that, the lights don’t show up when the build is complete. Why is that happening? The other strange thing is that some lights appear to be working after the build is finished but some lights are completely absent making certain rooms dark. So what is going on?

P.S I started having problems with the lights when I changed them all to static lights.

That sounds like a problem with the lightmaps. Until you build the lighting, Unreal is doing dynamic lighting so you get a preview of the scene. Once you do the build, it shows you the built static lighting, and that may be broken if the lightmaps aren’t set up correctly.

There are two things that tend to go wrong. The first is that your objects don’t have lightmaps at all, because they don’t have a suitable UV unwrap. For example, you might have a wall which is textured with a repeating brick pattern. Some of the UV coordinates will be greater than one, because otherwise the texture wouldn’t repeat. However this UV unwrap is not suitable for use with lightmapping, because obviously the lightmap is not a repeating pattern.

If you have this problem, you can generate an additional UV unwrap in the static mesh editor, save it to UV channel 1, and set that as the lightmap UV.

The other problem is that the objects have lightmaps, but the density is very low. The defaults for lightmap density tend to be on the low side, so it’s easy to end up in this position without realising. To test for this, click the dropdown where you select the view type (normally it will say ‘Lit’ because you that is the most common way of viewing the scene). Select Lightmap Density instead. You want your geometry to show up green; if you get lots of blues you need to increase the lightmap density in the static mesh editor.

So I’m a little confused over what I’m supposed to do. In the light settings I can’t find anything that says view type (also can’t find it in the mesh settings) so how do I change it? I never had this problem when my lights were just dynamic but I don’t need dynamic lights but all of a sudden static lights just don’t work. Should I just change it all back to dynamic lights?

For the lightmap density function, see:

Hopefully that page will make it clear how you select that function.

Static versus dynamic lighting is a difficult choice. I think for outdoor scenes, dynamic lighting is generally best. It allows a day and night cycle (with a moving sun) and static lightmaps can become very large. Indoors there tends to be more light sources and more indirect lighting, which would overwhelm the engine if you used all dynamic lights.

Well my game is indoors however like I said, the lights don’t show up. I do like the static lights that do show up because they’re much more “softer” than dynamic lights but in alot of dark places the static lights just don’t show up so I’m always switching back to dynamic lights just so they appear in my game.

If light doesn’t appear at all on particular meshes, probably there’s no lightmap UV map defined for that object. You need that even if you’re not applying materials using UVs.

Lightmap UVs can be problematic, but for simple cases you can create them in the static mesh editor.

Yes the shadows are softer with static lights—the indirect lighting brightens them a bit.

Ok here’s a better way to describe it. The lights do appear when I first place them in the level and then set their intensity and radius however after I build the lighting, the light disappears. So how would I fix that?

So where exactly do I create a lightmap UV map in the static mesh editor? The problem is when I set my lights to static it appears but when I build the lighting, it disappears.

Unfortunately I don’t have access to Unreal at the moment, but this answer may help you find the lightmap creation options:

If that doesn’t help I’ll have a look next time I’m on a computer with Unreal installed. I know it’s there, I’ve used it myself. :slight_smile:

Ok here’s something new. So at the moment I’m not sure what textures I’m going to use but right now I’m using M_metal_copper and static lights don’t work on that. There are also other textures like M_wood_oak and the static lights appear just fine on that texture. So for some reason it just doesn’t appear on the M_metal_copper texture. Why is that?

Okay first of all I tried importing a static mesh and creating a new lightmap UV unwrap. Basically the option to create a new unwrap needs to be set in the import options as described in the answer linked above. Once you’ve set that, you need to reimport the mesh. You can check whether the unwrap has been created by selecting the UV toolbar button. You should see the unwrap superimposed over the mesh.

M_metal_copper is going to be an odd case with lighting. Most of what you see will be reflections rather than diffuse scattering. Do you have SphereReflectionCapture actors to capture the reflections? If you don’t, you may well see peculiar results.

Large areas of reflective material can actually be quite troublesome. Raytracers can deal with mirrors in a physically accurate way, but those techniques are still too expensive for real time rendering in games. As a result, reflections in games are a bit of a hack, and the hack works better when the reflective surfaces are small and not too common.

I hope this has helped, but I think I’m going to drop out now. I’ve got my own game to write, and I’m not really an expert on Unreal—I’m just a user like you. I thought you were having a straightforward problem, but perhaps it’s more complicated, in which case you’d probably be better asking someone else!