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
471 stars 67 forks source link

Light problem #143

Closed ozzy071988 closed 2 years ago

ozzy071988 commented 2 years 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 2 years 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 2 years ago

Shadows for card solves the problem,

thank you

adizanni commented 2 years 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).