minorua / Qgis2threejs

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

test/data/testproject1.qgs fails to render in exported HTML page #340

Open jlpoolen opened 2 months ago

jlpoolen commented 2 months ago

There is in this project a directory test/data/ directory which appears to be something one may use to validate whether this Export works in a given environment. I attempted an export and nothing is appearing. I'm outlining what I did here with screenshots hoping there is some explanation as to what I did incorrectly or if there is something suggesting a problem with supporting libraries.

Staging The Test Files

Here is how I cloned the project and created a copy to test in.

Git Cloning the Project

I staged the project under /usr/local/src. Note I had to change permissions there before cloning the project.

cd /usr/local/src

jlpoole@debian1:/usr/local/src$ sudo chmod 777 .
jlpoole@debian1:/usr/local/src$ git clone https://github.com/minorua/Qgis2threejs.git
Cloning into 'Qgis2threejs'...
remote: Enumerating objects: 11699, done.
remote: Counting objects: 100% (911/911), done.
remote: Compressing objects: 100% (430/430), done.
remote: Total 11699 (delta 540), reused 773 (delta 475), pack-reused 10788
Receiving objects: 100% (11699/11699), 76.18 MiB | 12.19 MiB/s, done.
Resolving deltas: 100% (8484/8484), done.
jlpoole@debian1:/usr/local/src$

Create Test Directory

I then created a clean new directory and copies the test data files to the new location:

cd ~

jlpoole@debian1:~/qgis$ mkdir proj_sample
jlpoole@debian1:~/qgis$ cd proj_sample/
jlpoole@debian1:~/qgis/proj_sample$ cp /usr/local/src/Qgis2threejs/tests/data/* .
jlpoole@debian1:~/qgis/proj_sample$ 

Session in QGIS

I then started a fresh session of QGis. Before loading the project, I opened the Log Messages panel: View->Panels->Log Messages

There were two panels in Log Messages:

Plugins:
2024-04-20T12:07:26     INFO    Loaded Qgis2threejs (package: Qgis2threejs)
2024-04-20T12:07:26     INFO    Loaded QuickMapServices (package: quick_map_services)
2024-04-20T12:07:26     INFO    Loaded KML Tools (package: kmltools)
2024-04-20T12:07:26     INFO    Loaded DB Manager (package: db_manager)
2024-04-20T12:07:27     INFO    Loaded GRASS GIS provider (package: grassprovider)
2024-04-20T12:07:27     INFO    Loaded MetaSearch Catalog Client (package: MetaSearch)
2024-04-20T12:07:28     INFO    Loaded Processing (package: processing)
General:
2024-04-20T12:07:28     INFO    Application state:
             QGIS_PREFIX_PATH env var: 
             Prefix: /usr
             Plugin Path: /usr/lib/qgis/plugins
             Package Data Path: /usr/share/qgis
             Active Theme Name: default
             Active Theme Path: /usr/share/qgis/resources/themes/default/icons/
             Default Theme Path: :/images/themes/default/
             SVG Search Paths: /usr/share/qgis/svg/
              /home/jlpoole/.local/share/QGIS/QGIS3/profiles/default/svg/
             User DB Path: /usr/share/qgis/resources/qgis.db
             Auth DB Path: /home/jlpoole/.local/share/QGIS/QGIS3/profiles/default/qgis-auth.db

I opened file: ~/qgis/proj_sample/testproject1.qgs. There appears a third panel in Log Messages which contained:

Messages:
2024-04-20T12:09:41     INFO    Project file is older : This project file was saved by QGIS version 3.34.3-Prizren. When saving this project file, QGIS will update it to version 3.36.1-Maidenhead, possibly rendering it useless for older versions of QGIS.

The project appears to have successfully opened. 2024-04-20_11-59

I clicked the green triangle icon, Qgis2threejs Exporter, and got these messages:

    three.min.js (42): THREE.WebGLRenderer: OES_texture_float extension not supported.
    three.min.js (42): THREE.WebGLRenderer: WEBGL_depth_texture extension not supported.
    three.min.js (42): THREE.WebGLRenderer: OES_texture_half_float extension not supported.
    three.min.js (42): THREE.WebGLRenderer: OES_texture_half_float_linear extension not supported.
    three.min.js (42): THREE.WebGLRenderer: ANGLE_instanced_arrays extension not supported.
    three.min.js (42): THREE.WebGLRenderer: OES_texture_float_linear extension not supported.
    three.min.js (42): THREE.WebGLRenderer: EXT_blend_minmax extension not supported.
    three.min.js (42): THREE.WebGLRenderer: EXT_texture_filter_anisotropic extension not supported.
    three.min.js (42): THREE.WebGLRenderer: OES_texture_float extension not supported.
    three.min.js (42): THREE.WebGLRenderer: WEBGL_depth_texture extension not supported.
    three.min.js (42): THREE.WebGLRenderer: OES_texture_half_float extension not supported.
    three.min.js (42): THREE.WebGLRenderer: OES_texture_half_float_linear extension not supported.
    three.min.js (42): THREE.WebGLRenderer: ANGLE_instanced_arrays extension not supported.
    three.min.js (42): THREE.WebGLRenderer: OES_texture_float_linear extension not supported.
    three.min.js (42): THREE.WebGLRenderer: EXT_blend_minmax extension not supported.
    three.min.js (42): THREE.WebGLRenderer: EXT_texture_filter_anisotropic extension not supported.

Nothing showing on the viewer other than a color I had previously selected along with placeholder values for header and footers along with an error message:

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.

2024-04-20_12-17

Viewed the Layers tab and nothing was selected. So I selected everything in Exporter's Layers tab. No rendering changes. I have "Preview" selected.

Selected Scene->Reload. The appeared for a fraction of a second a blue background in the Exporter's Viewer panel, but then my previously set tan color appeared with nothing in it by the warning and sample header/footer.

The Export

I performed the following:

Log window appears with:

    Export started.
    1. Building scene...
    Z scale: 1.0
    2. Building pt1 layer...
    Object type is Sphere.
    0 feature.
    3. Building pt2 layer...
    Object type is Sphere.
    0 feature.
    4. Building pt3 layer...
    Object type is Sphere.
    0 feature.
    5. Building pt4 layer...
    Object type is Sphere.
    0 feature.
    6. Building pt5 layer...
    Object type is Sphere.
    0 feature.
    7. Building line1 layer...
    Object type is Line.
    0 feature.
    8. Building line2 layer...
    Object type is Line.
    0 feature.
    9. Building line3 layer...
    Object type is Line.
    0 feature.
    10. Building line4 layer...
    Object type is Line.
    0 feature.
    11. Building line5 layer...
    Object type is Line.
    0 feature.
    12. Building lineV layer...
    Object type is Line.
    0 feature.
    13. Building ne_10m_railroads layer...
    Object type is Line.
    0 feature.
    14. Building polygon1 layer...
    Object type is Polygon.
    0 feature.
    15. Building polygon2 layer...
    Object type is Polygon.
    0 feature.
    16. Building dem_srtm30 layer...
    17. Building Flat Plane layer...
    18. Copying library files...

    Export has been completed in 0.53 seconds.

    Output directory
    /home/jlpoole/qgis/proj_sample_export
    Data directory
    /home/jlpoole/qgis/proj_sample_export/data/index
    Scene file
    /home/jlpoole/qgis/proj_sample_export/data/index/scene.js
    Web page file
    /home/jlpoole/qgis/proj_sample_export/index.html

When I performed the export, in the "Log Messages" window, there appeared a fourth tab "Qgis2threejs" which contained two entries:

2024-04-20T12:13:31     INFO    Export settings loaded from file:/home/jlpoole/qgis/proj_sample/testproject1.qgs.qto3settings
2024-04-20T12:13:31     INFO    Opening Qgis2threejs Exporter...

The HTML Result

Here's a screenshot show the HTML page rendered in Debian's default browser: not the expected image. 2024-04-20_12-26

QGis Version

From the About page in QGis:

QGIS version
3.36.1-Maidenhead
QGIS code revision
48b84d03e4b
Qt version
5.15.8
Python version
3.11.2
GDAL/OGR version
3.6.2
PROJ version
9.1.1
EPSG Registry database version
v10.076 (2022-08-31)
GEOS version
3.11.1-CAPI-1.17.1
SQLite version
3.40.1
PostgreSQL client version
15.5 (Debian 15.5-0+deb12u1)
SpatiaLite version
5.0.1
QWT version
6.1.4
QScintilla2 version
2.13.3
OS version
Debian GNU/Linux 12 (bookworm)

Active Python plugins
Qgis2threejs
2.7.3
quick_map_services
0.19.34
kmltools
3.1.33
db_manager
0.1.20
grassprovider
2.12.99
MetaSearch
0.3.6
processing
2.12.99

What more can I provide? Is there a debug mode or something that will provide an insight into what is happening?

jlpoolen commented 2 months ago

Attached is the configuration file: testproject1.qgs.qto3settings which I appended ".txt" to so it would upload here. testproject1.qgs.qto3settings.txt

jlpoolen commented 2 months ago

I have staged the export directory at: https://salemdata.us/dev/qgis/qgis2threejs/proj_sample_export/ I changed index.html to index_original.html so that the directory may be listed. If you want to see what the page renders as, then use this: https://salemdata.us/dev/qgis/qgis2threejs/proj_sample_export/index_original.html