13.4. Creating 3D Symbols

The Style Manager helps you create and store 3D symbols for every geometry type to render in the 3D map view.

As of the other items, enable the 3d 3D Symbols tab and expand the signPlus button menu to create:

13.4.1. Point Layers


Fig. 13.26 Properties of a 3D point symbol

  • You can define different types of 3D Shape to use for point symbols. They are mainly defined by their dimensions whose unit refers to the CRS of the project. Available types are:

    • Sphere defined by a Radius

    • Cylinder defined by a Radius and Length

    • Cube defined by a Size

    • Cone defined by a Top radius, a Bottom radius and a Length

    • Plane defined by a Size

    • Torus defined by a Radius and a Minor radius

    • 3D Model, using a 3D model file (several formats are supported) that can be a file on disk, a remote URL or embedded in the project.

    • Billboard, defined by the Billboard height and the Billboard symbol (usually based on a marker symbol). The symbol will have a stable size. Convenient for visualizing 3D point clouds Shapes.

  • The Altitude clamping can be set to Absolute, Relative or Terrain. The Absolute setting can be used when height values of the 3d vectors are provided as absolute measures from 0. Relative and Terrain add given elevation values to the underlying terrain elevation.

  • The shading can be defined.

  • Under the Transformations frame, you can apply affine transformation to the symbol:

    • Translation to move objects in x, y and z axis.

    • Scale to resize the 3D shapes

    • Rotation around the x-, y- and z-axis.

13.4.2. Line layers


Fig. 13.27 Properties of a 3D line symbol

  • Beneath the Width and Height settings you can define the Extrusion of the vector lines. If the lines do not have z-values, you can define the 3d volumes with this setting.

  • With the Altitude clamping you define the position of the 3D lines relative to the underlying terrain surface, if you have included raster elevation data or other 3D vectors.

  • The Altitude binding defines how the feature is clamped to the terrain. Either every Vertex of the feature will be clamped to the terrain or this will be done by the Centroid.

  • It is possible to checkboxRender as simple 3D lines.

  • The shading can be defined in the menus Diffuse, Ambient, Specular and Shininess.

13.4.3. Polygon Layers


Fig. 13.28 Properties of a 3D polygon symbol

  • As for the other ones, Height can be defined in CRS units. You can also use the dataDefined button to overwrite the value with a custom expression, a variable or an entry of the attribute table

  • Again, Extrusion is possible for missing z-values. Also for the extrusion you can use the dataDefined button in order to use the values of the vector layer and have different results for each polygon:


    Fig. 13.29 Data Defined Extrusion

  • The Altitude clamping, Altitude binding can be defined as explained above.

  • There is an additional option to checkboxAdd back faces and checkboxInvert normals.

  • You can define checkboxEdges by Width and Color.

13.4.4. Shading the texture

Shading helps you reveal 3d details of objects which may otherwise be hidden due to the scene’s lighting. Ultimately, it’s an easier material to work with as you don’t need to worry about setting up appropriate scene lighting in order to visualise features.

Various techniques of shading are used in QGIS and their availability depends on the geometry type of the symbol:

  • Realistic (Phong): describes the way a surface reflects light as a combination of the Diffuse reflection of rough surfaces with the Specular reflection of shiny surfaces (Shininess). It also includes an Ambient option to account for the small amount of light that is scattered about the entire scene. Read more at https://en.wikipedia.org/wiki/Phong_reflection_model#Description

  • Realistic Textured (Phong): same as the Realistic (Phong) except that an image is used as Diffuse Texture. The image can be a file on disk, a remote URL or embedded in the project. The Texture scale and Texture rotation are required.

  • CAD (Gooch): this technique allows shading to occur only in mid-tones so that edge lines and highlights remain visually prominent. Along with the Diffuse, Specular, Shininess options, you need to provide a Warm color (for surface facing toward the light) and a Cool color (for the ones facing away). Also, the relative contributions to the cool and warm colors by the diffuse color are controlled by Alpha and Beta properties respectively. See also https://en.wikipedia.org/wiki/Gooch_shading

  • Embedded Textures with 3D models shape

13.4.5. Application example

To go through the settings explained above you can have a look at https://public.cloudmergin.com/projects/saber/luxembourg/tree.