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"

How to turn on/off stationary lights to full darkness

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

Light On

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?

Light Off

I don't know how to resolve this, if you could help me I would be very thankful :)

Sorry if there's already a thread answering this, I couldn't find any solution! Oh, and sorry for my bad english!!

Product Version: UE 4.12
more ▼

asked Aug 03 '16 at 03:43 PM in Rendering

avatar image

1 1 2 3

avatar image GreenHowitzer Feb 19 '19 at 01:12 AM

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

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hi Ghalandar,

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.

I hope this helps!


more ▼

answered Aug 03 '16 at 05:38 PM

avatar image

Tim Hobson ♦♦ STAFF
49k 886 99 875

avatar image Ghalandar Aug 03 '16 at 06:17 PM

Thank you for your help Tim! 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: https://youtu.be/8hq3QAho42c

PS: If a stationary light Indirect Light Intensity is set to 0, it's the same as a dynamic light?

avatar image Tim Hobson ♦♦ STAFF Aug 03 '16 at 07:53 PM

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.

(comments are locked)
10|2000 characters needed characters left
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