Issue with Static Lights

Just wanted to check if there was any movement on this. I have a set of static lights and geometry, but what’s weird is that the first time the scene is loaded, the static lights light the area correctly, but after leaving the scene and returning. They no longer work.

do your static lights need shadows? If not, you could use clustered lights instead … that’s where we’re heading with the engine - but the shadows are still missing there.

Hi @mvaligursky,

Unfortunately, yes. The Static lights produce shadows. Any ideas why it works the first time the scene is loaded?

Nope, no ideas … I have not worked on that part of the code base … it’d need some investigation. Would you have a simple repro we could use?

Unfortunately I’m a bit strained for time today as I try to work through some issues with the project. I will do my best to get one tomorrow.

1 Like

Hi @mvaligursky,

Here is a repro: https://playcanvas.com/editor/scene/1194604

Use Spacebar to change scenes. Scene1 has dynamic lights and geometry, while Scene2 is static. You will see that the first time Scene 2 is loaded the lights are rendered, but every subsequent return to the scene does not render the static lights.

Before I changed Scene1 to be dynamic, and had both of them static, I noticed that after loading Scene1 all of the Static lights would stop working even when Scene2 was loaded for the first time.

It makes me wonder if something is clearing the list of static lights array/object at the app level and never repopulating it.

I hope this is helpful!

2 Likes

Thanks, I’ll have a look when I get some time. I created an issue for it here:

3 Likes