Problem with a Light2D

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By namik1_

Hi guys. I have in my scene, named “Torch” light2D node. here is the properties.

And i added some torch on the scene and see that.

if i place many torches nearby, its getting much brighter. but signle torch’s light is not so bright. How i can fix that “much bright”?!

Thx, and sorry for my bad eng ^)

:bust_in_silhouette: Reply From: max.marauder

You have mode set to Add, this means light from all sources is added to each other.
If you set it to Mix, it will calculate the average instead.

Okay, thank. That work good! But it’s another problem.

if i place many torches, shadows in object sprites getting darker… Look. How i can fix this? (that shadows was drawed on the sprites)

namik1_ | 2022-08-11 11:57

I would try to put shadows in separate sprites, create a custom CanvasItemMaterial for them, and set its light_mode to LIGHT_MODE_LIGHT_ONLY.
See CanvasItemMaterial for reference.

max.marauder | 2022-08-11 12:16

thank you, i will try it later, and response you! :slight_smile:

namik1_ | 2022-08-11 12:18

okay, i put in the shadow sprite material CanvasItemMaterial and set the light mode to light only, and it doesn’t solve the problem, if i quit light2d area, shadow become invisible, but if i go to the torch, shadow also getting darker. ^(

namik1_ | 2022-08-11 13:27

wow, it works if i set light mode to unshaded, thanks for help!

namik1_ | 2022-08-11 13:29