Help me to understand Epic's lighting scenarios

Hey All,

I’m really confused. One area that I’ve constantly struggled with is Lighting in the engine. I can never quite get lights to behave the way that I want them to, and I’m constantly running into issues such as having my light sources get Red Xed because I have too many in one area, or I get banding issues when I’m trying to use one light to fill a larger space (hoping to combat the Red X).
I just opened up the Particle Effects example to borrow some particles from there and I noticed that Epic somehow uses dozens of Stationary lights all really close together and they don’t get the Red X issue. It’s like the rules don’t apply somehow and I’m not understanding why.

Here’s an example:

I have 3 lights somewhat close to each other, all Stationary lights, and one of them gets the Red X.

And here’s a screen from Epic’s Map:

Here they have loads of lights, all close to each other, but no issue. Also, I don’t understand the benefit of the two point-lights stacked on top of each other near the bridge.

If anyone can help shine some light (oh yeah, I said it) on what the differences are, I’d greatly appreciate it :slight_smile:

Dont have the particle demo installed but you can have as many overlapping stationary lights as you want as long as they aren’t casting static (???) shadows.

Edit: Apparently its static shadows that need to be disabled, lightmass limitation I guess?

Wait a minute… so the static lights are dynamic? Doesn’t that kill performance? Isn’t that the whole point of lightmass and baked lighting? Why would there be a limit if it’s just baked out into a texture. I don’t think UDK had that limitation. Or maybe it just didn’t inform you about it as well?

Now that I looked at the example map again though,the lights must be acting as fill lights because the majority of them have Cast Shadows disabled. Wow, thank you for pointing me towards inspecting the light properties more. That’s really eye-opening.

Any idea why they sometimes place two lights right on top of each other? I’ve even seen some examples where there’s an entire cluster of lights together. It doesn’t really make sense to me.

Just a guess but I think stationary lights generate a different “type” of static shadow than static lights. Static lights can overlap with static shadows infinitely, so I am guessing what is happening is that stationary lights are baking their static shadows to a separate texture, where as static lights shadows just go straight into the lightmap (or are all getting baked to the same shadow map). I don’t remember UDK very well, but it may have had the same limitation. Other than the red x on the light, lightmass will throw out errors when you go to build lighting so perhaps that was the only warning.

I’m just wildly speculating at this point though.

No idea. Beyond checking the light properties of each and comparing, see if there are any differences I’d say perhaps one is using a light function for a specific effect. Might also be worth checking the level blueprint, perhaps one of them is being used for some effect there.

Use static, not stationary, unless you need character shadows.

In one of the tutorial videos, it informs there is a way to increase the limit of number of overlapping stationary / static lights. I’ve seen it in the project settings for mobile, but I’m not sure for non-mobile projects.

I suppose it could be that one of them is using a light function, but I have also seen examples from Epic where they used a giant cluster of point lights. I wish I could remember where I saw that. It would be so nice if one of the Epic devs came in here and explained the logic behind it.

Also, I’m pretty sure stationary lights don’t generate any kind of static shadow. They’re like partially dynamic lights because you can turn them on and off, but I don’t understand what makes them cheaper than full dynamic lights.

Yeah, but if it kills performance then it’s probably not a good solution. I’m more interested in understanding why it kills performance rather than figuring out a work around. There’s got to be a reason Epic limited it to 3 overlaps.

The digital human demo has clusters of spotlights but as far as I can tell it looked like it was just a way of simulating something along the lines of an area light without raytracing.

They definitely generate static shadows so long as it is enabled. I use it all the time to generate soft shadows for lights that can be turned on/off but don’t move such as mounted light fixtures.

I haven’t seen the digital human example yet. I can’t remember where I saw the light clusters, but it was in a level example, that much I remember. It may even have been Jordan Walker’s E-Honda map that he posted on polycount yonks ago.

hmmm. I guess they can generate lightmaps because of the fact that they don’t move? They also cast dynamic shadows though so they’ve always confused me. lol
Any lighting experts on the forum who could help clarify some confusion?