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

The Card Suddenly Crashes #96

Closed VITCHEPF closed 2 years ago

VITCHEPF commented 2 years ago

Checklist:

Release with the issue: floor3d-card V.1.4.1-hf2

Last working release (if known):

Browser and Operating System: Chrome - Versão 99.0.4844.84 (Versão oficial) 64 bits

Windows 10 Pro - 21H2

CPU - Intel(R) Core(TM) i7-10700F CPU @ 2.90GHz 2.90 GHz RAM MEMORY: 16GB VIDEO CARD: AMD Radeon HD 6700 Series

Description of problem:

Suddenly the card started to freeze, not accepting commands for movements and not rendering anymore.

I realize that if I remove the command "Shadow: yes" the processing became "lighter" and work a litle bit more, but even so, sometimes it crashes suddenly.

I'm using a simple test 3D model, which previously worked perfectly, but after the updates below the problems started.

I cleared the CACHE many times.

It's as if the routine entered in a continuous loop, not processing the other commands.

The current versions I'm using of HA and Floor3d-Card are:

Versão do HA

Javascript errors shown in the web inspector (if applicable):

Additional information:

Please, see below the simple code used:

type: custom:floor3d-card
name: TEST
path: \local\test\
objfile: home.obj
mtlfile: home.mtl
backgroundColor: Black
camera_position:
  x: 24.59222162777573
  'y': 976.2868357773948
  z: -519.1469741516394
camera_rotate:
  x: -2.211661501528204
  'y': 0.005560582655216776
  z: 3.13413786140283
camera_target:
  x: 18.158772146296723
  'y': 48.89059850564385
  z: 172.5881135855753
style: 'width: 1100px; height: 500px'
entities:
  - entity: light.sala_smart_b1
    object_id: Lampada1_2
    type3d: light
    light:
      lumens: '800'
      color: yellow
  - entity: light.sala_smart_b2
    object_id: Lampada2_2
    type3d: light
    light:
      color: blue
      lumens: '800'
  - entity: light.sala_smart_b3
    object_id: Lampada3_2
    type3d: light
    light:
      color: white
      lumens: '800'
  - entity: light.sala_smart_b4
    object_id: Lampada4_2
    type3d: light
    light:
      color: red
      lumens: '800'
  - entity: light.sala_smart_b5
    object_id: Lampada5_2
    type3d: light
    light:
      color: purple
      lumens: '800'
shadow: 'no'                                  ### --> If YES stop automatically,  if NO work a little longer, but in the end it freezes too.###
extralightmode: 'no'
globalLightPower: '0.7'
sky: 'no'                              
object_groups:
  - object_group: ''
zoom_areas:
  - zoom: ''

SIMPLE 3D MODEL

Message Error: "Page Unresponsive (Wait or Exit)"

PAGINA TRAVA

adizanni commented 2 years ago

Hello @VITCHEPF, I've upgraded to 2022.4.1 to be sure we are in the same condition. So far I was not able to reproduce the crash issue but I'm still investigating

VITCHEPF commented 2 years ago

It was my mistake, the Floor-3D Card is working correctly!

I had to format my SSD and install a new Windows 10. After the installation, I didn't notice that the use of the graphics card's GPU was "disabled" by Windows.

I only noticed this problem by opening the Windows Task Manager (Ctrl + Shft + Esc) and monitoring the GPU usage when opening the HA card --> Floor-3D Card.

When I realized that the GPU of the graphic card was not being used by Chrome, I activated it through the procedure below:

See Below the Procedure to Activate in Chrome

Chrome browser disables some versions of GPU-acceleration device drivers and disabling of these device drivers might cause slowness in your Chrome browser. This slowness can be noticed when using Games, Graphis 3D Renderization or when watching youtube movies.

To fix that you can enable Override software rendering list option in Google Chrome browser which will enable GPU-acceleration.

1) Open Google Chrome browser 2) Enter chrome://flags in the address bar 3) Enter “software render” in the search bar. Then, enable the option Override software rendering list:

ATIVAR NO GOOGLE

4) Restart your browser

I would like to thank @adizzani for all the support he provided, and for this amazing tool that is the Floor-3D Card.

Thank you very much!

adizanni commented 2 years ago

@VITCHEPF thanks for the feedback. I was about to point you also in that direction, but it is not a common source of problems because browsers are already HW accelerated by default. I think that the card can be optimized, even without GPU, a good CPU should be able to handle a simple 3d rendering (especially without shadows).