5

When I try to make 3D scene from DEM with Qgis2threejs it creates an empty HTML page. I also try to make 3D thematic map from shapefile with the same result.

I have also check my browser and it supports WebGL. I have use this plugin last year on the same computer last year, but since I updated the plugin I can't get it to work. Any suggestion would be great.

enter image description here

1
  • Sorry, works for me. Can you put your 3D scene online or test on another computer?
    – underdark
    Commented Jan 27, 2015 at 18:40

6 Answers 6

3

I had the same problem and I found quite an interesting answer:

The .html, .jsand.css files that the Qgis2threejs plugin generates are saved as files created on Unix/Linux, which means that they have different line endings than the ones created on DOS/Windows.

Unix systems represent a newline with LF (Line Feed), while DOS uses CR (carriage return) + LF at the end of the line code.

On UNIX:

   <html>LF
   <head>LF
   <meta charset="UTF-8">LF

On DOS/Windows:

   <html>CRLF
   <head>CRLF
   <meta charset="UTF-8">CRLF

What you need to do is to make an EOL Conversion (End Of Line) between Unix/Windows format to all the files that the plugin creates.

At least, that's what worked for me.

2

Actually, you just needed to check if your browser has WebGL support enabled or not. You can check your browser capability on http://get.webgl.org/

If the page say if your browser doesn't have it. You can install higher version of the browser that support it, or you can update your display driver.

It works for me. Hope it's work for you.

1

Open the JavaScript console by pressing Ctrl + Shift + J key (in case of Chrome) and take a look at error message and location where the error occurred. You can get some hints to know the cause of the problem. Then please open an issue to the plugin's repository on GitHub. If you cannot understand well, send me (plugin author) the set of exported data.

1

It might also be worth checking the attribute data in your shapefile. If there are carriage returns in some of the fields then these break the Javascript in the output file. The Javascript console in your browser should tell you what line is causing the error.

1
  • Hi, can you explain what carriage returns are please?
    – S.K.
    Commented Nov 26, 2019 at 13:14
1

I have the same issue, but I'm afraid none of the above apply to me. I'm working on Ubuntu 16.04 and Qgis 2.18 and I've been successfully using Qgis2threejs all the afternoon, to produce simple 3D views of just a simple raster layer on the DEM cut by a polygon layer. As I say, I've been doing it repeatedly with different layers and suddenly, the output began to appear white, even with the layers and settings that I used before. I've reinstalled Qgis2threejs and nothing, then I've rebooted my computer and nothing. Finally, I've made a new Qgis project and I got two successful 3D views (a trial one, uncut, and one I needes, cut). That's all, when I tried with two more raster layers nothing comes out... I checked the javascript console and I get the following message:

Duplicate point -156.510366312:-124.059030001 three.min.js:664:338 Warning, unable to triangulate polygon!

Repeated for many, many different points. I don't think it is a problem of my polygon layer either, as it is a simple square with four vertices. Any hint on what can I try next?
Best regards,
Asier

1
  • Any luck here? I am running the same OS and version of QGIS. This is my exact problem. Work great last month - will not work today despite reloads and restarts.
    – GBG
    Commented Jul 19, 2019 at 4:08
0

I had the same problem and I found quite an interesting answer:

The .html, .jsand.css files that the Qgis2threejs plugin generates are saved as files created on Unix/Linux, which means that they have different line endings than the ones created on DOS/Windows.

and some time zoom issue in qgis2threejs page

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.