Lightning in a backrooms game

Hello, I just came to Unreal Engine 5 after several months of planning my backrooms themed game. I expected Unreal to handle lights very well compared to Roblox studio, in which I have tried to develop my game earlier, but found out it is almost the same. I have a problem with placing many lights in small space, because it gets very laggy(image 1). I already tried some simple optimization, played around with many settings, tired light baking, but everything is either laggy or looks really bad. Is there a good way to make it look good and less performance demanding at the same time? Besides that, I also have a problem with baking light maps, it looks weird and I am probably doing something wrong(image 2). Maybe it has something to do with the fact that my imported object appear black in the lightmap density view. Just in case it could be the problem, I am using the GPU lightmap plugin, because the normal bake doesnt work for me, the option to allow it is greyed out and I

wasnt able to solve it even with tutorials. The last thing I would want to ask is how to make these ceiling lights glare, but also not emit so much light around? I know lightning an entire scene with emissive objects is not a good idea, so how should I combine a real light source with a fake light source object (image 3,4)

5.4.2 has this cvar called r.ManyLights. this is a kinda stresstest for it. i’ll not rebuild the map to test it, but you could give it a shot.

if you use lumen… you should avoid loads of emissive lights. they will produce gi noise. they should all be rendered into a custom unlit/emission pass and bloomed seperately. the rectlights should give you some sort of noisy ambience.

just spitballing.

Having lots of lights with overlapping attenuation radio is very bad of performance. Having lots of dynamic shadow casting lights is also bad for performance.

Try to make sure the lights don’t overlap as much as possible, and disable dynamic shadows on most of them.

In deferred rendering, lots of non-shadow casting lights are not all that expensive as long as they don’t overlap too much.

Thanks for the advice. I have actually not started learning C++ in Unreal yet, just trying to make the basic things and leave this for later, so if you could explain what to do with the first thing you said, I would appreciate that. The emissive lights are the ones I want to get rid of, I just want to keep the glare close around the object.

Thanks, I turned the dynamic shadows off and it got me +2 fps, so atleast something. It is quite difficult to make the lights not overlap as I want the entire scene to be lit up, but I will think about it.

The skylight can increase the total light in the room cheaply. Also consider combining multiple small lights into a single large one.

The cvar glitchred mention is a console command. It is a setting you can toggle by entering the command in the editor console box, or by adding to the project ini file to make it permanent for the project. It’s not coding, more like typing in a cheat code in a game.

I already used big rectangular lights to fill the space while lightning up the whole scene. Thanks for the explanation

Also, do you think it’s better to use Lumen or baked lightmaps for a game like this? I have no idea what other developers use, but I looked at a backrooms game made in UE4 by Fancy studios that inspired me to start making this one and he has lots of lights in one place with a far visibility distance, so he must have used baking for that.

ue4 is defo all baked. no lumen in there. for performance reasons you should maybe bake the level. realtime lighting is taxing. not everybody gona be able to play it. you may have to learn to tweak lightmass. yeh…

Alright, I’ll go that way. I actually solved the issue with my baking in the meantime, but still everything looks a lot darker than with real lights and the shadows there are barely visible. I already turned my PC off, so I can show you what’s going on tomorrow (it’s 11 pm here)

my 2 cents…
don’t try to make your levels as real rooms with lots of ceiling lamps, meaning that you should try to separate the actual lighting that affect the room and the props (lamps, bulbs, ceiling lamp, etc)

make the props emmisive just for the purpose of seeing them bright and reduce and/or disable all the settings that affect the room lighting to a minimum. then use rect lights and/or point lights to fake the look of the props.

What do you mean ? It should look as dark or as bright as you want. Regardless of how many lights you have in the room. You have post processing settings where you can easily adjust the exposure from complete darkness to one million.

Regardless Lumen vs baked, Lumen should be only if you have certain dynamic things happening which should influence the GI/lighting of the environment. But in this kind of game everything should be baked, in which case the performance should be very good. And with baking you should be able to place as many lights as you want without any penalty.
The glare thing should be also adjustable from post process.

The ceiling lamps are here just for decoration and are set to a minimum value, I use the ectangular lights instead to light up the scene and there is like 1 rectangular light per 6 ceiling lights. The problem I have is that I don’t know how to reduce the value of the ceiling emissive lights, so they don’t serve as the ones that light up the scene, and make them glare at the same time, without affecting the enviroment. I looked on many discussions about how to make emissive materials “look emissive without being emissive”, but nothing worked.

I will send an image of what’s hapenning soon, but everything has just less contrast after baking, the walls where the light was shining brightly are then kidna dull and places with dark shadows are much lighter, almost the same color as the rest. So you’re saying baked maps should look exactly like when there were real lights? I thought it’s normal for baked maps to be much lower quality than real lights, that’s why I tried to avoid them and went for optimization of real lights with Lumen before.

real lightning


So actually the shadows dont get lighter, just everything that was light goes darker

First of all, what would be the reason you don’t want to use the actual lights on the ceiling for lighting ? Are the reasons artistical ? Or technical ?
I would just place static area lights on each light in the ceiling, before baking.

The first image, even though it looks a bit better you have some physical implausible shadows, like the sharp shadow from the right side column.
In the baked image the shadows are very soft /low resolution/ and I think you should watch some tutorials about how to increase the quality/resolution for baking.
For example maybe this one:
Bake Lighting FASTER with GPU Lightmass - by William Faucher

  • The important part is the one where you learn how to increase lightmap resolution.
    You can also find newer ones.

And in the second image you can of course just increase the overall brightness so you can match the first image.

Now its alright and I will use the ceiling lights as actual lights, just not when I thought I will use Lumen without baking before, it would have a large impact on the performance. I played around with baking today and I think I learned a lots of new things. I started a new project and tried it just with simple objects and materials. The reason for the dark baking was probably because I didnt have enough lightmap resolution and the shadows couldnt bake properly, but idk. The problem wasnt the dark visual itself, that can be easily solved by changing the brightness, but the absence of shadows. I actually watched the video, thats when I started using the plugin. I will try changing the resolution in the main project and see if the shadows get better. I also found out there is some problem with baking when I change the UV mapping, I started a new topic in the forum about that, so you can check it out.

Btw, do you know if its possible to have this kind of reflection along with baked maps somehow? I know its affected by the real time lightning, but just asking in case it would be possible by using some trick without losing fps like with real lightning.