Qgis2threejs
Qgis2threejs copied to clipboard
Experimental Qgis2threejs Plugin Layer for 2.5D Rendering
I just made a prototype of Qgis2threejs plugin layer for 2.5D rendering to investigate its possibility.
The Rendering Flow of the Plugin Layer (Orthographic Camera Mode)
- Send feature geometry data to Qt5 QWebView.
- Build 3D models with three.js library and render them with orthographic camera. Every top vertex of the extruded polygons is shifted by an amount proportional to its height.
- Receive the rendered image via QtWebKit bridge and draw it on map canvas.
Here are some advantages/disadvantages compared to the new 2.5D renderer of QGIS 2.14.
Advantage
- Correct rendering with depth test by graphics library
Disadvantages
- Slow speed
- Can not identify a feature on a vector layer
Maybe this is a detour, but is easy to walk for me. The code is already available on dev
branch. Can anyone find further possibilities from this way?
Comparison Between Core 2.5D Renderer and Qgis2threejs Plugin Layer
Core 2.5D Renderer:
Qgis2threejs Plugin Layer:
Image was created with GSI Tiles (pale) and Fundamental Geospatial Data of Japan.
Perspective camera mode added!
Orthographic camera:
Perspective camera:
Images were created with OpenStreetMap (© OpenStreetMap contributors, License).