# Settings

## Settings

<table>
<tr><td>

<img src="./media/ButtonSettings.png" width="44" height="44">

</td><td>

UDiTH **Settings** offer a wide range of configuration options and allow you to customise many aspects of the application.

</td></tr>
</table>

#### 3D Layers

<img src="./media/Settings3Dlayers.png" width="350" height="">

You can show or hide selected objects.

#### Attribute Options

<img src="./media/SettingsAttributeOptions.png" width="350" height="">

1. **Empty attributes** shows or hides attributes that have no values.
2. **Configure priority attributes** determines which attributes are shown first, and in which order, when you hover over an object.

<img src="./media/image164.png" width="" height="">

3. **Preview attribute limit** determines how many attributes can be previewed when hovering over a 3D object.
4. **Limit for automatic labelling** determines how many labels can be shown at the same time in the 3D view.

#### Units

<img src="./media/SettingsUnits.png" width="350" height="">

Choose the unit to be displayed when measuring or adding objects.

> This does not apply to attribute information.

#### 3D User Interface
**(navigation and drawings)**

<img src="./media/Settings3Duserinterface.png" width="350" height="">

- **Common views cube** shows or hides the navigation cube in the upper-right corner of the 3D view.
- **Minimap** shows or hides the minimap in the bottom-right corner of the 3D view.
- **2-sided ISO perspective** determines the side towards which 2-sided ISOs face.
- **Use Common Views XYZ-Mode** changes the view cube labels from compass directions, such as North and South, to Cartesian XYZ labels.
- **360° Panorama** shows or hides the red spheres that indicate panorama positions.

##### UI Options

You can adjust the scale of the user interface from `0.6` to `2.0` and change the attribute font size from `2` to `6`.

> Changes to these settings take effect immediately, but you must save them in a configuration file if you want to keep them after closing UDiTH.

#### 3D Rendering

<img src="./media/Settings3Drendering.png" width="350" height="">

Option height map for **Texture mode** (Normal, Height Map, No Texture) creates a height map for the 3D model and colours objects accordingly.

<img src="./media/image167.png" width="431" height="450">

**Use camera position as light source** works similarly to a flashlight.

**Use old camera rotation behaviour** changes the camera behaviour back to that of older UDiTH versions, rotating around the centre of the screen instead of around an object.

**Hide movement indicators** hides the spheres that show the point around which the camera is rotating.

#### Color Options

<img src="./media/Settingscoloroptions.png" width="350" height="">

Here you can change the colours or patterns of the specified objects.

#### Day and Night Cycle

<img src="./media/SettingsDayandnightcycle.png" width="350" height="">

<img src="./Media/Icons_Numbers/01.png" width="16" height="16"> UDiTH includes a day/night cycle with shadow simulation. You can decide at which time the simulation starts.

<img src="./Media/Icons_Numbers/02.png" width="16" height="16"> The time multiplier increases the speed at which time passes in the 3D view.

#### Expert Settings

Advanced users can adjust the cache size, the maximum number of triangles, and the maximum camera range to suit their needs.

<img src="./media/SettingsExpert.png" width="350" height="">

<table>
<tr><td>

<img src="./media/Icons_Numbers/01.png" width="16" height="16"> **Triangles limit**

</td><td>

Limits the maximum number of triangles the system can load.

</td></tr>
<tr><td>

<img src="./media/Icons_Numbers/02.png" width="16" height="16"> **Render quality level**

</td><td>

**Low:** 30 FPS. **Medium:** 30 FPS with ambient occlusion. **High:** 60 FPS with ambient occlusion and shadows.

</td></tr>
<tr><td>

<img src="./media/Icons_Numbers/03.png" width="16" height="16"> **Memory mesh cache size (triangles)**

</td><td>

Limits the model cache size by the number of accessible **triangles**.

</td></tr>
<tr><td>

<img src="./media/Icons_Numbers/04.png" width="16" height="16"> **Memory model cache size (bytes)**

</td><td>

Limits the model cache size by the number of accessible **bytes**.

</td></tr>
<tr><td>

<img src="./media/Icons_Numbers/05.png" width="16" height="16"> **PDF projection max render jobs**

</td><td>

This setting refers to PDF rendering while zooming in and out. It limits the number of parallel rendering jobs or panels.

</td></tr>
</table>

#### About

<img src="./media/SettingsAbout.png" width="350" height="">

<table>
<tr><td>

**Show licences:**

</td><td>

Opens a new tab with legal information about the software and licences used in UDiTH.

</td></tr>
<tr><td>

**Viewer version:**

</td><td>

Shows the version of UDiTH you are using.

</td></tr>
<tr><td>

**Model version:**

</td><td>

Shows the version of the model you are using.

</td></tr>
<tr><td>

**Builder version:**

</td><td>

Shows the version of UDiTH Builder the model was created with.

</td></tr>
<tr><td>

**Conversion date:**

</td><td>

Shows the conversion date of the model.

</td></tr>
<tr><td>

**Expiration date:**

</td><td>

Shows the date until you can use the current model.

</td></tr>
</table>

### IntelliPID Settings

#### Attribute Options
<img src="./media/IntelliPidLabels.png" width="350" height="">
                    

#### Automatic Labelling Settings

<img src="./media/SettingsAutomaticLabelling.png" width="350" height="">

#### Priority Attributes Settings

Priority attributes are always displayed first in the attributes panel. This does not affect custom attributes, which are always displayed directly after the attribute to which they are attached by definition. If the item under the mouse pointer does not contain one of the selected priority attributes, the next available attribute is displayed instead.

<img src="./media/SettingsPriotityAttributes.png" width="350" height="">

### General Information

<table>
<tr><th colspan="2">Colour settings</th></tr>
<tr><td>

Highlight

</td><td>

Changes the highlight colour of selected elements.

</td></tr>
<tr><td>

Selected elements

</td><td>

Changes the colour of selected elements.

</td></tr>
<tr><td>

Sheet background

</td><td>

Changes the P&ID background colour.

</td></tr>
<tr><td>

Background elements

</td><td>

Changes the colour of non-highlighted elements.

</td></tr>
<tr><th Colspan="2">General settings</th></tr>
<tr><td>

Text offset

</td><td>

Changes the distance of the element-descriptions to the elements themselves.

</td></tr>
<tr><td>

Select attributes for automatic labelling

</td><td>

Opens a selection window for choosing attributes for automatic labelling. To select an attribute, drag and drop it into the list on the right.

</td></tr>
<tr><td>

Configure priority attributes

</td><td>

Opens a selection window for choosing priority attributes. To select an attribute, drag and drop it into the list on the right.

</td></tr>
<tr><td>

Preview attribute limit

</td><td>

Defines the maximum number of attributes displayed in the tooltip that appears when you hover over an item. Attributes that are not available are ignored.

</td></tr>
<tr><th Colspan="2">Legend Font size</th></tr>
<tr><td>

Font size

</td><td>

Changes the font size used in the P&ID legend.

</td></tr>
<tr><th Colspan="2">UI options</th></tr>
<tr><td>

UI scale

</td><td>

Changes the scale at which all user interface (UI) elements are displayed.

</td></tr>
<tr><td>

Reset UI scale

</td><td>

Resets the UI scale to normal (factor 1).

</td></tr>
<tr><td>

Attribute font size

</td><td>

Changes the font size used for attributes in the panel on the right.

</td></tr>
</table>   

### GPS Instructions

To make GPS features work correctly, you need to add calibration data to the default configuration.

Use the template below and place it in the **CommonSettings** section:

```
"CommonSettings": [
  {
    "GpsCalibration":{
      "Latitude": 48.234706,
      "Longitude": 11.679748,
      "Altitude": 500.1,
      "Bearing": 17,
      "ModelLocation": {
        "x": 3005.50,
        "y": 2385.32,
        "z": 67.16
      }
    }
  }
],
```

> If you already have a **CommonSettings** section, you can simply add it there.
> If you add it at the end of the section, ensure that the previous entry ends with a comma.

You must change the following values to match your plant:

1. **Latitude** and **Longitude** refer to the real-world coordinates of a plant reference point. You can determine these in Google Earth by placing a placemark at a known location.

<img src="./media/GoogleEarth1.png" width="500" height="133">

2. **Bearing** indicates the deviation of your plant from true north. You can determine this in Google Earth by using the measurement function to draw a line in the direction of plant north. The resulting **Heading** value can be used as the bearing.

<img src="./media/GoogleEarth2.png" width="300" height="227">

3. **ModelLocation** refers to the model coordinates of your reference point.
Use those model coordinates directly for **ModelLocation**.

<img src="./media/ModelLocation.png" width="250" height="">

> GPS altitude data is not sufficiently accurate, so instead of using it directly, add `1.5` metres to the Z coordinate.
