x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

Product Version: UE 4.8
Tags:
more ▼

asked Jul 16 '15 at 07:21 AM in Rendering

avatar image

Brandon236
88 29 40 45

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered Jul 16 '15 at 10:10 AM

avatar image

PeteX
173 5 9 13

avatar image Brandon236 Jul 17 '15 at 01:29 AM

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?

avatar image PeteX Jul 17 '15 at 08:38 AM

For the lightmap density function, see:

https://docs.unrealengine.com/latest/INT/Engine/UI/LevelEditor/Viewports/ViewModes/index.html#lightmapdensity

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.

avatar image Brandon236 Jul 17 '15 at 07:32 PM

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.

avatar image PeteX Jul 17 '15 at 07:45 PM

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.

avatar image Brandon236 Jul 18 '15 at 10:04 AM

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.

avatar image PeteX Jul 18 '15 at 05:15 PM

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

https://answers.unrealengine.com/questions/24957/auto-generate-uv-lightmap-second-channel.html

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. :-)

avatar image Brandon236 Jul 19 '15 at 04:37 AM

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?

avatar image PeteX Jul 20 '15 at 04:32 PM

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!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question