Point light not work if set to static

Hello, I would like to ask about using static point light

Whenever I set the light to static, the light just gone, I try to refresh but it still not showing.

Any idea?

Thereā€™s a current issue on this here:

It seems static lights only affect geometry marked static as well.

ok, itā€™s currently unreolved issue?

is there any workaround for this?

or i have to set to dynamic light for the time being?

Sounds like it was by design that static lights only affect models that are also marked as static.

If your models are not static, then the lights shouldnā€™t be static for now.

1 Like

I tried changing my model to dynamic (static unchecked), and use static light, it does not work either.

Btw Directional Light static is working, unlike point light and spot light.

Hi @EscalateBackend,

Are you saying that the static light does not fork for you whether the geometry is static or not?

If you are using non static models, lights should be non static too at the moment

Yes.

I tried some settings

non static mesh + dynamic light = it works
static mesh + dynamic light = it works

non static mesh + static light = does not work
static mesh + static light = it works ā†’ This is what Iā€™m looking forā€¦ Static lights to worksā€¦
Iā€™m trying this on a new project. https://playcanvas.com/editor/scene/1194475

So, currently the key is, if you want to use static light, use static mesh?

Waitā€¦ will try on my current project hope it will worksā€¦

Yes.

Still on that new project
it does not work againā€¦

static mesh + static light

I have refresh my page also, but still the light disappearedā€¦

image

It was prevously worked when I tried wrote my previous comment

Trying in the play modeā€¦
The static light does not appear in the editor but seems to be ligting properly in the play modeā€¦

I confirm that point light and spot light works in static mesh in play mode, but it does not appear in the editor, in both of my project.

I build and see that the static light also works. It just doesnā€™t show up in the editor.

I assume it is safe to use static light and static mesh, you just donā€™t see accurate result in the editor for the time beingā€¦ am I correct?

Hi @EscalateBackend,

This is because static lights are currently not working when a scene is destroyed and reloaded. There is an issue open for this here: Issue with Static Lights - #27 by mvaligursky

Refreshing your editor should bring them back, but even changing away from the scene and back again in the editor will break the static lights. Hopefully, we will see a fix soon.

1 Like

The longer term goal is to switch to clustered lighting. First version is out already, but does not support shadows ā€¦ so if you donā€™t need shadows, you could use this maybe:

Iā€™ve started on the shadows for this as well, but there are few other things that need to be done before I can finish that, so likely not for few more months: WIP rendering to shadow atlas for point and spot lights by mvaligursky Ā· Pull Request #3235 Ā· playcanvas/engine Ā· GitHub

So if you just need many lights without shadows, you could use it. See example here: PlayCanvas Examples

1 Like

No, refreshing my editor does not bring my static light backā€¦

I think for the time being, I will use dynamic lights to preview, and before I test play and build, I will change all of my light to staticā€¦ So far this technique seems to work

1 Like