Problems with lights

Good evening, it’s me again bothering you :sweat_smile:, I’m having problems with my stage lighting. to give them context, I created a small room called “Room”.


This room has lights to illuminate the stage and it works very well.

So I decided to make it a “template” so I can create it from an array, but when I create it, it doesn’t light up correctly.

does anybody know how I can fix it? :pensive:
SCENE: PlayCanvas | HTML5 Game Engine

Until now the solution that I found is that many lights cause that distortion in the textures
so i reduced the number of lights per room from 9 to 1 per room and it looks good.


Though it no longer gives it that horror maze effect I was planning :pensive:

I looks like they all have shadows enabled? And this many shadow maps in a single atlas is causing the bias issue you see. Possible improvments:

  • disable shadows unless needed
  • increase the resolution of the shadow atlas
  • tweak the shadow bias values (increase) on the lights

See this for how to do the first two:
https://developer.playcanvas.com/en/user-manual/graphics/lighting/clustered-lighting/#editor-options

2 Likes

You could also play with how shadow resolution is allocated to the lights. By default, they all get the same size from the atlas, but you can do something like this from the script:

This creates a fixed number of shadow slots from the atlas, with different sizes … and lights nearby would get high res then far away. Also, lights really far won’t get shadows. Read about this in the same link as above.

this.app.scene.lighting.atlasSplit = [3, 2, 2, 2, 3];

2 Likes

Thanks for answering, yes I’ll be seeing it, I’m new to this thing about lights and the environment, thanks alot :grin: @mvaligursky

1 Like