adizanni / floor3d-card

Your Home Digital Twin: aka floor3d-card. Visualize Home Assistant state and perform actions using objects in a 3D home model based on Three.js.
https://github.com/adizanni/floor3d-card
MIT License
448 stars 65 forks source link

Light problem #143

Closed ozzy071988 closed 1 year ago

ozzy071988 commented 1 year ago

Hi!

I have a problem with light.

The lighting penetrates the walls and illuminates the room next door.

I remember in previous versions I didn't have this problem, the light stayed in the room

light issue

adizanni commented 1 year ago

Hello @ozzy071988, in order for lights to stop at walls you need to put shadow: 'yes' in the parameter of the card and /or in the parameter of the light.

ozzy071988 commented 1 year ago

Shadows for card solves the problem,

thank you

adizanni commented 1 year ago

@ozzy071988 bear in mind that when you use shadow, you cannot have too many lights in your scene (usually the limitation from the GPU is max 16 lights). Shadows requires a lot of computation. Unfortunately, at today, this is the worst limitation of the card. There are a few options in the card to overcome the limitation (you can play with several parameters, look at the doc).