Hello, I’m new in UE4 and I’m making an horror game for my final degree project. All my game occurs in one house, so one level, and I’m trying to make the house “very detailed” trying to achieve the P.T. or Allison road feeling.
So, I want to be able to turn the lights on and off. Dynamic lights do this job perfectly, but perfomance cost is insane when I have a lot of lights, even now when I dont have too many props. I tried stationary lighting, looked like just what I needed, but I encountered this issue. When lights are On all looks good (ignore my lightmap issues, I really need to learn how to make them…):
When I turn the lights off (I set the visibility to false from my lightswitch blueprint) some of the lighting dissapears, but the objects are still illuminated?
With Stationary light types you can only change the intensity of the light and change the color, but any baked lighting for them is not removed since it is precomputed. You have a couple of options here. You can set the Indirect Light Intensity for the Stationary light to a lower value or 0 before you build lighting. This will limit the baked lighting that comes with the stationary light. If you want to keep the baked lighting but cut it off completely when the light is off l you could set up a Post Process Volume around your room and lower the Global Illumination: Intensity down to 0 through Blueprints when the light is disabled.
Thank you for your help ! Now I understand better how stationary lights work. I tried your first solution but it didnt quite hit the mark because, as you said, it limited the baked lighting too much. I tried your second solution and Iike it! But I’m having some problems.
So, the second solution worked as expected when I’m inside the Volume, but when the character gets out of this volume and enters the general volume affecting all the level, GI returns back to normal and I everything lightens up again. Also, when I’m inside the “Light Off Volume” GI changes for all the level. I don’t know if i explained myself, this is a video of whats happening: - YouTube
PS: If a stationary light Indirect Light Intensity is set to 0, it’s the same as a dynamic light?
If a stationary light Indirect Light
Intensity is set to 0, it’s the same
as a dynamic light?
It would act like one but it doesn’t automatically make it a dynamic light.
Post Process:
This is just something you’ll have to design around to get what you want or make some choices with how you want lighting to be handled and controlled.
As a final suggestion, you could simply make the dynamic and then use a non-shadow casting low-intensity light or lights placed around the room to fake bounce light where need when it’s lit and disable all of those when you turn the main source light off.
You may also want to play around with the Min Roughness setting depending on reflective surfaces, the option for Use Inverse Squared and Light Falloff Exponent to get some more consistent results as well. It becomes art tweaks really at this point with what you want it to look like.
terrible engine design that you cant do this to multiple houses in a town at once.
Lets say you have 5 homes and you want to turn off the lights for only two of them they will interfere with each other one will turn off the other and vice versa