Hey,
i am currently trying to set all my lighting in my scene to static. as soon as i do that all of my lighting “disapears” and almost all materials go black.
Here is an ScreenShot:
BR
Hey,
i am currently trying to set all my lighting in my scene to static. as soon as i do that all of my lighting “disapears” and almost all materials go black.
Here is an ScreenShot:
BR
Hi @Sinlyu,
Are you baking any lightmaps with your static light? Would you be able to provide a project link?
Are you using batching?
@eproasim i dont bake any lightmaps.
@yaustar i did use batching, and disabled it after i saw the issue, but the issue still remained.
Hmm try refreshing the tab, sometimes it gets in a state where it renders incorrectly.
Also check if the lights and models are on the same layer?
i also noticed that my drawcalls went from around 180 - 200 to around 400 - 420
Hmm… I can’t replicate your black materials issue in a new project: https://playcanvas.com/editor/scene/1122796
Does it still happen if you use a new default material?
I think i found the issue, our Materials dont use “useSkybox”, non static lights do work fine, but as soon i enable the static property and the useSkybox flag is false, the material goes black.
Interesting that I’m not getting the same result with useSkybox disabled: https://playcanvas.com/editor/scene/1122796
Edit: Does the light have Affect Dynamic disabled?
Yea, it is disabled on most of the lights. But turning it on and off dosent do anything in that case.
That is the issue I believe. It’s a not great named property. If disabled, it doesn’t ‘light’ up any non lightmapped models
It will need to be enabled unless the entities are lightmapped.
Edit: Just read that enabling it doesn’t seem to change anything
I’m at a lost if that’s not the issue either then
Well i just turned it off and on for all lights and reloaded the editor. that worked!
Ah, nice that reloading the editor helped
Looks like it’s related to using non directional lights like Spot.
Issue created for this: https://github.com/playcanvas/engine/issues/3052
we have similar issue opened with some details on why the number of draw calls is increased
on the separate note, we’re working on different lighting solution which might replace / solve this in the future https://github.com/playcanvas/engine/pull/2990 - but that’s still way off to be done.