Important

Translation is a community effort you can join. This page is currently translated at 34.43%.

14.4. Création de symboles 3D

Le Gestionnaire de style vous aide à créer et à stocker des symboles 3D pour chaque type de géométrie à rendre dans la carte 3D map view.

Comme pour les autres éléments, activez l’onglet 3d Symboles 3D et développez le menu du bouton symbologyAdd pour créer :

14.4.1. Couches de point

../../../_images/3d_point_symbol.png

Fig. 14.35 Propriétés d’un symbole de point 3D

  • 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: supported formats include wavefront .obj, .glTF and .fbx. Models can be a file on disk, a remote URL or embedded in the project. Community-created models are shared on the QGIS Hub at https://plugins.qgis.org/wavefronts.

    • 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 properties 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.

14.4.2. Couches de lignes

../../../_images/3d_line_symbol.png

Fig. 14.36 Propriétés d’un symbole de ligne en 3D

  • Sous les paramètres Largeur et Hauteur vous pouvez définir l” Extrusion des lignes vecteur. Si les lignes n’ont pas de valeurs z, vous pouvez définir les volumes 3d avec ce paramètre.

  • Avec restriction d’altitude vous définissez la position des lignes 3D par rapport à la surface du terrain sous-jacent, si vous avez inclus des données d’élévation raster ou d’autres vecteurs 3D.

  • L” Altitude binding définit comment l’élément est fixé au terrain. Soit chaque Vertex de l’élément sera fixé au terrain, soit cela sera fait par le Centroïde.

  • Il est possible de checkboxRendre comme des simples lignes en 3D.

  • The shading properties can be defined.

14.4.3. Couches polygone

../../../_images/3d_polygon_symbol.png

Fig. 14.37 Propriétés d’un symbole de polygone en 3D

  • Comme pour les autres, la Hauteur peut être définie en unités CRS. Vous pouvez également utiliser le bouton dataDefine pour remplacer la valeur par une expression personnalisée, une variable ou une entrée de la table d’attributs

  • Là encore, l” Extrusion est possible pour les valeurs z manquantes. Pour l’extrusion, vous pouvez également utiliser le bouton dataDefine afin d’utiliser les valeurs de la couche vecteur et obtenir des résultats différents pour chaque polygone :

    ../../../_images/3d_extrusion.png

    Fig. 14.38 Extrusion définie par les données

  • La Restriction altitude, l” Altitude binding peuvent être définis comme expliqué ci-dessus.

  • The Culling mode to apply to the symbol; it can be:

    • No Culling: this can help to avoid seemingly missing surfaces when polygonZ/multipatch data do not have consistent ordering of vertices (e.g. all clock-wise or counter clock-wise)

    • Front

    • or Back

  • The Rendered facade determines the faces to display. Possible values are No facades, Walls, Roofs, or Walls and roofs

  • checkbox Add back faces: for each triangle, creates both front and back face with correct normals - at the expense of increased number of vertex data. This option can be used to fix shading issues (e.g., due to data with inconsistent order of vertices).

  • checkbox Invert normals (experimental): can be useful for fixing clockwise/counter-clockwise face vertex orders

  • The shading properties can be defined.

  • Display of the checkbox Edges of the symbols can be enabled and assigned a Width and Color.

Indication

Combination for best rendering of 3D data

Culling mode, Add back faces and Invert normals are all meant to fix the look of 3D data if it does not look right. Typically when loading some data, it is best to first try culling mode=back and add back faces=disabled - it is the most efficient. If the rendering does not look correct, try add back faces=enabled and keep culling mode=no culling. Other combinations are more advanced and useful only in some scenarios based on how mixed up is the input dataset.

14.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. Use the Opacity slider to render semi-transparent objects in 3D. 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. Use the Opacity slider to render semi-transparent objects in 3D.

  • 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

14.4.5. Exemple d’application

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