QGIS Processing scripts, models and plugins for X3D export
Steps to try out:
- get a DEM (for example from ned.gov, or https://github.com/andreasplesch/QGIS-X3D-Processing/raw/master/examples/output/n35w120utmWGS84_200x200nd999.tif)
- load into qgis
- crop and downsample to ca. 500x500 pixels, warp to longlat WGS84 (not necessary for sample DEM)
- set additional no data value in Properties - Transparency (to 0 in above DEM)
- get all processing scripts and models from here: https://github.com/andreasplesch/QGIS-X3D-Processing/archive/master.zip
- load into qgis, by copying into USER/.qgis2/processing/scripts|models
- run raster2x3dom02 model, imagery is not optional, use DEM as imagery
- open resulting html file
- use single band pseudo color style if selected
- support discrete and linear (interpolated) interpolation options
- adopt color ramp and intervals from style
- add accurate picking: done
- added directional lighting: default orientation is from hillshade style azimuth and altitude, done
- multidirectional option also supported, done
- added svg knob to web page to interactively control directional light if available, with touch support
- separate out sub-model: shape from dem, done
- expose light intensity (brightness) to model, done
- headlight toggle ('x' key'), done
- control toggle ('z' key), done
- time slider to set sun position, done
- finalize DEM raster to GeoElevationGrid: better metadata from qgis, doc strings
- perhaps option to enable wrap around by repeating first column after last column, for globes
- document other scripts
- geoOrigin option: DEF/USE, needs to be first, include optionally with empty scene and update when appending ?
- use wiki for example processing workflow
- passive picking: add crosshair at center and report values from there. For mobile.
- add draping of other raster as texture: think about how to modularize
- warp to crs of other raster script
- crop/enlarge to extent of other raster script
- save as jpg script (probably not useful): use rasterlayer.previewAsImage(full size), then Qimage.save: done
- color contour option: use 1d texture and generated UVs where U is normalized elevation: done
- extrude polygons from vector layer by height attribute or constant
- need to be in projected crs, then just use first point as reference, and first point geographic coordinates for geolocation
- GeoLOD option: use gdal tile functionality for both DEM and imagery ...
use PdUp/PgDown to change perspective, drag circle to hill shade, slide to set sun position, z to toggle
small
https://rawgit.com/andreasplesch/QGIS-X3D-Processing/master/examples/output/n35w120nedWGS84_200x200tex.html https://rawgit.com/andreasplesch/QGIS-X3D-Processing/master/examples/output/n35w120_NationalAtlas/n35w120_200x200.html
large (takes a couple minutes to display):
medium (topo30 resampled to 600x300, 100x v.e.)
https://rawgit.com/andreasplesch/QGIS-X3D-Processing/master/examples/output/topo30_600x300tex.html
map draping (texture mapping)
color contours (Pseudo Color Single Band Style)
using cobweb with pure X3D