Spot Light Weirdness

I’m generating 85 spot lights in a scene at runtime. Certain groups of them can be switched on or off. When I move around, something weird happens with the direct and ambient lighting. The first image shows how things look normally:


If I move up a bit, the whole scene starts looking like it’s illuminated elsewhere, and in addition the previous light seems to disappear:

As I move things are getting brighter:

Eventually I reach a place where all of the light seems ambient:

I’ve tried messing with the general “lighting settings” (the separate tab) but every variation shows this same behavior. Lowering the lights’ spot angle or range seems to resolve it, but it winds up at unreasonably small levels:

Any tips on how to avoid this?

You can use the render mode to force per pixel lighting. Important lights are sampled per pixel, whereas auto tries to find a good balance between per pixel lights, vertex lights and lights baked into SH. There’s also the setting in the quality tab about per pixel lights. This page Unity - Manual: Forward rendering path provides a bit more information about how unity handles many lights.

1 Like

That resolved the issue. Many thanks.

1 Like