In my game I have a house that has 12 rooms each with ceiling, lamp lights and so on.That’s about 39 lights that I can turn and off but because they are all set to movable it is killing performance. Is there any way to be able to turn on and off lights in game without them being set to movable?
Use Stationary Lights.
Stationary LIghts are intended to be in One Place, but change in Brightness or Color.
However, Only 4 Stationary Lights may overlap! If more than 4 overlap, they will turn dynamic!
I just tried stationary lights and it looks terrible. Almost like a unity game. Even when I turn off the all the lights when I’m using stationary the room is brightly lit. It looks like it has baked lighting onto the desk that can’t be turned off. Is there any other option because I’m not using stationary?
Stationary lights off
Mobility lights off
it is possible to turn stationary lights off if they do not contribute to indirect lighting, but light probes will still have information from when lights were on. did you try movable lights that use distance field shadows?
I did but the shadows get all weird based on the distance I am at.
and if I walk a little closer
I tried playing around with the ray start offset but no matter what value I chose I get a weird variation of the spotlight effect depending how far away I am.
Check mesh distance field visualization for any unexpected results, make sure lights are not inside any distance fields.
How can I check the mesh distance field?
Is your building a single mesh or are the walls all each individual meshes?
It’s a mixture. Walls and rooms are single set but floors and ceilings are modular.
check that they represent objects more or less closely. if they do and light is not placed within distance fields it should work correctly.
That’s why your distance field shadows look like ■■■■. Anyway, you shouldn’t need them.
How are the lightmap UVs unwrapped?