minorua / Qgis2threejs

3D map visualization and web export plugin for QGIS
http://minorua.github.io/Qgis2threejs/docs/
507 stars 92 forks source link

Qgis2threejs Exporter not showing any visualization #334

Open dangarciahe opened 6 months ago

dangarciahe commented 6 months ago

Hello :)

I'm having trouble with the real-time visualization of the exporter. When I go to Web -> Qgis2threejs -> Qgis2threejs Exporter, a windows does pop-up, but I don't see anything in the right panel. The "Preview" button is also grayed out. Tried playing around with several options, and even reinstalling the plugin, but had no luck. However, if I export to Web, a HTML file is generated and I can successfully visualize it in my Firefox web browser.

Tried both using a search-engine and looking into other Issues, but had not luck, at least not for Linux platforms (and I don't get the "Any 3D objects not registered. There is a compatibility issue with QGIS 3D view..." message that a lot of Windows users get, plus I don't have any 3D views open).

I don't know if it is related, but I wasn't able to enable OpenCL acceleration on my PC, that uses an AMD RX 6700XT in Manjaro Linux. Any suggestion as to how can I solve the issue is greatly appreciated

Below is a screenshot of the Exporter and my setup.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

QGIS version | 3.34.3-Prizren | QGIS code branch | Release 3.34 -- | -- | -- | -- Qt version | 5.15.12 Python version | 3.11.6 Compiled against GDAL/OGR | 3.8.2 | Running against GDAL/OGR | 3.8.4 PROJ version | 9.3.1 EPSG Registry database version | v10.098 (2023-11-24) GEOS version | 3.12.0-CAPI-1.18.0 Compiled against SQLite | 3.45.0 | Running against SQLite | 3.45.1 Compiled against PDAL | 2.6.2 | Running against PDAL | 2.6.3 PostgreSQL client version | 16.1 SpatiaLite version | 5.1.0 QWT version | 6.2.0 QScintilla2 version | 2.14.1 OS version | Manjaro Linux   |   |   |   Active Python plugins quick_map_services | 0.19.34 Qgis2threejs | 2.7.3 SRTM-Downloader | 3.2.2 processing | 2.12.99 db_manager | 0.1.20 MetaSearch | 0.3.6 grassprovider | 2.12.99

Qgis2thtreejs

minorua commented 6 months ago

The reason the preview button is grayed out is because the modules required for the preview are missing. Probably you can see the following message logged in the QGIS log panel: Both webkit widgets and web engine widgets modules not found. The preview gets disabled.

You can install python3-pyqt5.qtwebengine package using apt command to enable the preview on Ubuntu 23.04, but I don't know what package should be installed on Manjaro Linux.

dangarciahe commented 6 months ago

Thanks for the fast asnwer and the help!

I tried that, but I'm still having troubles:

I installed python-pyqt5-webengine, and the Both webkit widgets and web engine widgets modules not found. The preview gets disabled error dissapears, but now I get a Python error when opening QGIS or enabling the plugin: QtWebEngineWidgets must be imported or Qt.AA_ShareOpenGLContexts must be set before a QCoreApplication instance is created

I was able to reproduce the error by running from PyQt5 import QtWebEngineWidgets on QGIS's Python console; however, I am able to import the library just fine when running that same code on my computer (no QGIS).

I also tried compiling PyQt5 from the AUR Arch Linux repository as suggested by https://github.com/minorua/Qgis2threejs/issues/248#issuecomment-1387734795, but then QGIS crashes when opening the Qgis2threejs Exporter. Errors shown on crash at console are almost identical to those of https://github.com/ghtmtt/DataPlotly/issues/343.

The final workaround I tried was installing QGIS with Conda, instead of using Arch official repositories, as suggested in https://github.com/ghtmtt/DataPlotly/issues/343. However, now I get the error No 3D objects were rendered? There is a compatibility issue with QGIS 3D view. You need to close QGIS 3D view(s) and restart QGIS to use this preview. I have no 3D views open, and tried with a new profile and a new project, to no success. The "Preview" button is no longer grayed-out, though, and Qgis2threejs log panel doesn't show any error nor warning. Below is the setup of QGIS when using Conda instead.

Do you have any suggestion?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

QGIS version | 3.36.1-Maidenhead | QGIS code branch | Release 3.36 -- | -- | -- | -- Qt version | 5.15.8 Python version | 3.12.2 GDAL/OGR version | 3.8.4 PROJ version | 9.3.1 EPSG Registry database version | v10.098 (2023-11-24) GEOS version | 3.12.1-CAPI-1.18.1 SQLite version | 3.45.2 PDAL version | 2.7.0 PostgreSQL client version | unknown SpatiaLite version | 5.1.0 QWT version | 6.2.0 QScintilla2 version | 2.14.1 OS version | Manjaro Linux   |   |   |   Active Python plugins Qgis2threejs | 2.7.3 SRTM-Downloader | 3.2.2 processing | 2.12.99 db_manager | 0.1.20 MetaSearch | 0.3.6 grassprovider | 2.12.99