3D Point Symbols

From Maria GDK Wiki
Revision as of 13:37, 1 August 2024 by Ths (talk | contribs)
Jump to navigation Jump to search

3D Point symbols can be attached to both tracks and draw object points in 3D. They can be rendered as simple billboard Icons, as 3D models, optionally with text labels or a combination of these.

These options are controlled through the Styling engine in a styling category called `3DModel`. The following is an example of such as style:

<stylecategory name="TrackSymbol">
    <style>

      <compositeitem name="3D">
        <valueitem name="RelativeToGround" value="true"/>
      </compositeitem>

      <compositeitem name="Icon">
        <valueitem name="SymbolKeyField" value="symbol.2525code"/>
        <valueitem name="Symbology" value="MilStd2525"/>
        <valueitem name="ElevationOffset" value="50.0"/>
        <valueitem name="Opacity" value="0.5"/>
      </compositeitem>

      <compositeitem name="3DModel">
        <valueitem name="ModelId" value="huge_duck" />
        <valueitem name="ModelScale" value="2.0" />
        <compositeitem name="GroundLine">
          <valueitem name="Color" value="255,255,255,255"/>
        </compositeitem>
        <compositeitem name="TextLabel">
          <valueitem name="FontName" value="Arial Black"/>
          <valueitem name="FontSize" value="18.0"/>
          <valueitem name="Color" value="255,255,255,255"/>
          <valueitem name="OutlineColor" value="0,0,0,255"/>
          <valueitem name="OutlineThickness" value="2"/>
          <valueitem name="Background" value="128,127,127,127"/>
          <compositeitem name="LabelText1">
            <valueitem name="Fields" value="name,ais.name"/>
          </compositeitem>
        </compositeitem>
      </compositeitem>
      ....
   </stylecategory>

Global parameters for 3D

The *3D* style item controls general parameters that affect various aspects of the 3D rendering.

Name Description
RelativeToGround All altitiude values are taken to be relative to the ground at the object position. May be overridden by specific fields such as *altitudeMSL*.
ClampToGround (OBSOLETE) Same as *RelativeToGround*. Use that instead.


Styling the Icon

The 3D Icon is styled similarly to the *CoreSymbol* item, but with some 3D specific value items:

Name Description
SymbolKeyField Controls which data field to use for setting the symbol ID.
Symbology Which symbol standard to use for the symbol. See here for full description
SymbologyField Use this field in the data to determine which symbology to use. Setting Symbology explicitly will always override.
ElevationOffset Place all 3D symbols this many meters above the terrain.
Opacity Transparency of the 3D Icon. Note that this does not affect either the text label or 3D model, if specified.

Styling the 3D Model

You can attach a 3D model to a track or draw object symbol point with the "3DModel" style item.

Name Description
ModelId Assign the given 3D model ID to the point symbol. The ID given must match a model registered in the 3D Model Manager, See [| INative3DRenderingManager].
ModelScale Scale factor for the 3D model.
GroundLine Draw a vertical line from the 3D model to the ground.