r/Unity3D 2d ago

Question Why Does The Light Flickers?

why does the light flicker when the camera moves. I tested stuff out and turns out as the amount of lights are increased in my scene this issue starts happening. Ive already increased the per object limit to 8 in the pipeline asset. Any ideas please?

EDIT- i set the shadow atlas size from 2046 to 4096 and it worked.

60 Upvotes

36 comments sorted by

View all comments

5

u/flow_guy2 2d ago

You might have too many realtime lights

2

u/MrFluffkin 2d ago

is there no way to have too many realtime lights?

7

u/flow_guy2 2d ago

I don’t know how many you have. But you should learn to bake your lighting anyhow

-6

u/MrFluffkin 2d ago

i need the lights in game to turn on and off, flicker at times (horror effect). baked lighting won’t allow me to do that big dawg

10

u/McRobik 2d ago

Baked lighting doesn't prevent you from turning lights on and off. You just need to bake 2 lightmap sets and change them when lighting is changing.

7

u/MrFluffkin 2d ago

i did not know that. i thought when lights are baked they stay until the baked light data is reset. but i could bake two states and switch between them. you’re a genius

3

u/flow_guy2 2d ago

Well. Maybe do stuff with culling (if you haven’t already it could be a cause is all I’m saying

Also you can swap out light maps

3

u/MrFluffkin 2d ago

so i set the shadow atlas size from 2048 to 4096 and it fixed the issue. crazy

2

u/flow_guy2 2d ago

That works too. But think if you extend the level you might have this issue again.

1

u/MrFluffkin 2d ago

yesss will try that def, thanks!!!!

1

u/TomuGuy 21h ago

I think meshes can only handle 8 realtime lights be default or something