Now being updated for Qgis2threejs version 2.2.
Qgis2threejs exporter window has Layers panel on the left side and preview on the right side.
In this plugin, the word “export settings” means all configuration settings for a 3D scene, which consist of world settings, camera settings, each layer settings and so on. You can configure them via Scene menu, Layers panel and Export to Web dialog.
In the Layers panel, each layer item has a checkbox on its left. Check the checkbox to add the layer to current scene. To open layer properties dialog and configure settings for the layer, double-click on the layer item or click on Properties from context menu (right click menu).
Export settings are automatically saved to a
.qto3settings file under the same directory
as the currently open project file if you are working with a project file. When you open the exporter later,
the export settings of the project will be restored.
If you don’t want to use preview, uncheck Preview checkbox in the lower right corner of the window. For example, you might want to uncheck it to avoid waiting for updating 3D objects in the scene for each export settings update,
Scene settings dialog controls some basic configuration settings for current scene.
Scene - Scene Settings... menu entry to open the dialog.
Base size (width)
Size (width) in 3D world that corresponds to the map canvas width. The default value is 100.
Vertical exaggeration factor. This value affects terrain shape and z positions of all vector 3D objects. This also affects 3D object height of some object types with volume. Object types to be affected:Point : Cylinder, Cube, ConePolygon : Extruded
3D objects of the following types have volume, but their heights aren’t affected by this factor:Point : SphereLine : Pipe, Cone, Box
The default value is 1.0.
Vertical shift for all objects. If you want to export high altitude and narrow area, you should adjust the object positions to be displayed at the center of browser by changing this value. If you set the value to -1000, all objects are shifted down by 1000 in the unit of map CRS.
Select either sky-like gradient or a solid color for the scene background. Default is Sky.
Display of coordinates
Latitude and longitude (WGS84)option is selected, coordinates of clicked position on a 3D object are displayed in longitude and latitude (WGS84). If Proj4js doesn’t support current map CRS, this option is disabled.
Renders closer objects as bigger and farther objects as smaller.
Rendered object size doesn’t depend on the distance from the camera.
OrbitControls is available.
|Ctrl||Mouse / Keys||Touch|
|Orbit||Left mouse||One-finger move|
|Zoom||Middle mouse, or mousewheel||Two-finger spread or squish|
|Pan||Right mouse, or left mouse + ctrl/metaKey, or arrow keys||Two-finger move|
- North arrow
Adds an arrow that indicates the direction of grid North.
- Footer label
Adds a label to lower-left corner of the page.
Select a DEM resolution from several levels. This resolution is used to resample the DEM, but is not for texture.
This option enlarges output DEM by placing DEM blocks around the main block of the map canvas extent. Size can be selected from odd numbers in the range of 3 to 9. If you select 3, total 9 (=3x3) blocks (a center block and 8 surrounding blocks) are output. Roughening can be selected from powers of 2 in the range of 1 to 64. If you select 2, grid point spacing of each surrounding block is doubled. It means that the number of grid points in the same area becomes 1/4.
Clip DEM with polygon layer
Clips the DEM with a polygon layer. If you have a polygon layer that represents the area that elevation data exist or represents drainage basins, you might want to use this option.
You can choose from map canvas image, layer image, a image file or a solid color.
Map canvas image
Render a texture image with the current map settings for each DEM block.
Render a texture image with the selected layer(s) for each DEM block.
Textures the main DEM block with existing image file such as PNG file and JPEG file. TIFF is not supported by some browser. See Image format support for details.
To select a color, press the button on the right side.
Increases the size of image applied to each DEM block. This option is enabled when either
Map canvas imageor
Layer imageis selected. You can select a ratio to map canvas size from 100, 200 and 400 (%). Image size in pixels follows the percent.
Sets opacity of DEM object. 100 is opaque, and 0 is transparent.
Transparent background (When map canvas image or layer image is chosen)
Makes image background transparent.
Enable transparency (When image file is chosen)
Enables image transparency.
Adds a shading effect to DEM surface.
This option adds sides and bottom to each DEM block. The z position of bottom in the 3D world is fixed. You can adjust the height of sides by changing the value of vertical shift option in the World panel. If you want to change color, edit the output JS file directly.
This option adds frame to the DEM. If you want to change color, edit the output JS file directly.
Visible on Load
Whether the layer is visible on page load or not.
Vector layers are grouped into three types: Point, Line and Polygon. Common settings for all types:
Altitude is distance above zero-level.
- Relative to a DEM layer
Altitude is distance above surface of selected DEM.
You can use an expression to define altitude of objects above zero-level or surface of selected DEM layer. This means that object altitude can be defined using field values. The unit is that of the map CRS.
A numeric value, field or more complex expression (QGIS expressions).
- Z value / M value
Uses z coordinate or m value of each vertex. the evaluated value is added to it.
These options can be chosen when the layer geometries have z coordinates or m values. Cannot be chosen when the object type is Extruded or Overlay (polygon).
Usually, there are options to set object color and transparency. Refer to the links below for each object type specific settings. The unit of value for object size is that of the map CRS.
Select the features to be exported.
All features of the layer are exported.
Features that intersect with map canvas extent
Features on the map canvas are exported.
This option is available with Line/Polygon layer. If checked, geometries are clipped by the extent of map canvas.
Attribute and label
If the export attributes option is checked, attributes are exported with feature geometries. Attributes are displayed when you click an object on web browser.
If a field is selected in the label combobox, a label is displayed above each object and is connected to the object with a line. This combo box is not available when layer type is line.
Point layers in the project are listed as the child items. The following object types are available:
Sphere, Cylinder, Cone, Box, Disk, Plane, Model File
Line layers in the project are listed as the child items. The following object types are available:
Line, Pipe, Cone, Box, Profile
Output directory and HTML Filename
Exporting starts when you press the Export button. When the exporting has been done and Open exported page in web browser option is checked, the exported page is opened in default web browser (or a web browser specified in Exporter Settings).
Select a template from available templates:
This template is a 3D viewer without any additional UI library.
This template has a dat-gui panel, which makes it possible to toggle layer visibility, adjust layer opacity and add a horizontal plane movable in the vertical direction.
This is a template for mobile devices, which has mobile friendly GUI, device orientation controls and AR feature. In order to use the AR feature (Camera and GPS), you need to upload exported files to a web server supporting SSL.
- Magnetic North Direction
- Magnetic North direction clockwise from the upper direction of the map, in degrees. This value will be set to 0 if map canvas is rotated so that magnetic North direction is same as the map upper direction. Otherwise, the value should be determined taking account of grid magnetic angle (angle between grid North and magnetic North) and map rotation. Used to determine device camera direction.