when i put the light in and set the visibility off, then pressed build the lights still on inside the room. why is this happening? i dont think it did that in previous versions of UE4.
The visibility setting in the World Outliner will not stop a light from baking it’s precomputed lighting. This just disables its visibility in your scene. Static Lighting is handled offline, so when it’s applied it’s assigned as a lightmap for the actor.
Afaik this hasn’t changed since any previous versions of the engine.
I didnt disable the visibility from the world outliner i disabled the visibility within the details panel. It somehow still bakes lighting. in the screenshot, i disabled the visibility on the details panel and then pressed build and still produces the lighting.
It’s still precomputed lighting and will be taken into account when building lighting. So, since it’s a Stationary Light the color can be changed dynamically and it can be visually disabled so that it’s not powered on, but any bounce light will still be applied.
In the gif below I’ve disabled the RED light after I’ve built the scene. You can see on the cube that the Light cast within the radius is gone, but the bounce light on the cube side is still there.
If you need to disable lighting all together for that room I would recommend using a Movable light.
ah I see. Thank you so much for clearing up my confusion. Aren’t Movable Lights expensive on the performance? its just that i will be creating lots of lights in which the player can switch on and off. is there any alternatives to movable Lights that removes the bounce light?
Movable lights are more expensive, but that is because the way they cast shadows, but if you keep things within check it’s not like the project will be crippled. For Point and Spot lights you keep the radius for them in check to what is needed. They will only cast shadows within that radius. The thing that makes movable lights expensive is that they shadow every triangle on the actors they shadow no matter the pixel size on the screen of the triangle. So this is where it gets expensive is if you have a lot of objects on screen that has a high vertex count and they are small on screen but being shadowed by a light they can add up. With baked lighting you don’t have to worry about that expense, only the expense of the lightmap resolution used that gets stored as a texture that is loaded into memory.
So if you’re switching on and off these lights, I don’t think it’ll be a big issue in most cases depending on how complex your scene is and how large the radius of your lights is. When they are switched off you don’t have to worry about the shadow casting since the light is not visible at that point.