# Welcome to DPPrepar3DPlugin’s documentation!

## DPPrepar3Dv4Plugin

### Prerequisites

- Prepar3D v4 Engine

### Installation

1. Download and extract the DPPrepar3Dv4Plugin to `%USERPROFILE%\Documents\Prepar3D v4 Add-ons`.

2. Install Visual Studio 2019 x64 redistributable “VC_redist.x64.exe”.

3. Run the exectuable in the plugin folder named “ViewGroup.exe”.

### Setup

- If you have a correction data set for your setup then you can use it to replace the sample data in the “data” folder, otherwise you can proceed. The sample data describes a two display setup (with an additional monitor used for setup purposes only) and will be refered to in this documention as an example.

  Note: when exporting your data from Mapper3d for use with this plugin, ensure to export for “domeprojectionSDK”.

- Start the Prepar3D Engine. On Launching it you will be prompted to enable the plugin, which you should do even though it’s not fully configured yet.

- The Scenario Startup Screen will be shown. Click “OK” to exit it and start up the engine.

#### Displays and View Group

- First you should enable the View Group named “DPViewGroup” that was created by the executable run during the setup process. This contains frustum data from the “data” folder in the plugin, with each channel from the calibration data being used to create a View and accompanying ViewFrustum. In order to do this right-click inside the engine window, navigate to View Groups from the menu that appears and enable “DPViewGroup” from the options available.

- Navigate to Views -> View Group Management inside the engine. This is where the display configurations and View Groups can be viewed and modified.

- Below the View Groups heading you will see the “DPViewGroup”. If you’d like to add Views for displays that were not part of the calibration project you can add them manually here, ensuring that you provide unique DisplayIDs. For more information on how to do this please look at the “Configuring View Groups” section, under “Displays and View Groups” from the Prepar3D v4 documentation here.

`Figure 1: A ViewFrustum in the DPViewGroup`

- Under the Displays heading must be a configuration containing an entry for each display that has a name, a MachineID indicating which PC the display is connected to, an AdapterIndex indicating which display to use, and a DisplayID which is used for mapping views to displays and therefore must match the DisplayID for the corresponding View in the View Group. For more information on configuring displays please look at the “Configuring Displays” section, under “Displays and View Groups” from the Prepar3D v4 documentation here.

- Plugin is the last parameter available for displays. To add the plugin click “Add” and enter “DPCorrectionEffect”, which will ensure that once the plugin is enabled in the engine it is applied to the display.

`Figure 2: The right display from the sample setup`

- Once you have repeated these steps, the configuration in View Group Management is finished and you can click “OK” to close this window and apply the configuration.

- Frustum data should now be correctly applied. The rest of the correction data (blending, warping and black level correction) is applied by the plugin but it is not assigned to the correct channel automatically and therefore some additional steps may be required. If your setup now looks fully configured then that means that the default channel id’s in the config.xml inside the “data” folder in the plugin match the View numbers in the engine corresponding to each display, and you can skip the next section. If not then read to the next section to find out how to configure these.

#### Assigning the correction data

- Within the engine ensure the View Tiles are enabled using the Views menu in the toolbar. Each display should now show identifer in the form of “View x”, where x indicates the identifier of that display, for example “00”, “01”, and so on. Take note of these numbers, ensuring that you know which number corresponds to which display. Now close the engine.

  Note: you may need to disable full screen mode using the Views menu in the toolbar in order to make the View Tiles visible.

- Open the config.xml inside the “data” folder in the plugin, which is the file in which correction data is assigned to each channel. You will need to modify the id property for each channel. For example, if a display has the identifier “View01” in the engine its id will be 1. This must be matched to the correction data for that channel. For example, in the sample data id’s start at 1, whereas the correction data indexes start at 0. Thus the config.xml for the sample setup looks like this:

      <?xml version="1.0" encoding="utf-8"?>
      <dpCorrection>
          <type>0</type>
          <gamma>2.2</gamma>
          <input-gamma>2.2</input-gamma>
          <output-gamma>2.2</output-gamma>
          <channel id="1" blending="shading_0.png" blacklevel="blackLevelAdjust_0.png" frustum="frustum_0.csv" warpmap="warpmap_0.csv"></channel>
          <channel id="2" blending="shading_1.png" blacklevel="blackLevelAdjust_1.png" frustum="frustum_1.csv" warpmap="warpmap_1.csv"></channel>
      </dpCorrection>

  `Figure 3: the config.xml for the sample setup`

  Once you have made the changes you can save and close this file.

  Note: The View Tiles in the engine may change after you make these changes in the config.xml. If this happens, repeat the process until the id’s match.

- Re-open the engine. All correction data should now be applied and assigned to each channel correctly.

### Realignment

Follow these steps if your projection system has been recalibrated and you’d like to integrate the new calibration data set.

- Export your calibration data from Mapper3d for “domeprojectionSDK”.

- Inside the “data” folder in the plugin folder at `%USERPROFILE%\Documents\Prepar3D v4 Add-ons\DPPrepar3Dv4Plugin`, first save a copy of your config.xml. You can then replace the files inside this folder, representing your old data set, with the new files, but swapping in the config.xml from the old data set that you saved a copy of as this does not need replacing and may contain a custom configuration that will need to be retained.

- Run the exectuable in the plugin folder named “ViewGroup.exe” in order to apply the new Frustum data to the “DPViewGroup”.

  Note: If your new calibration data is for a different number of projectors than the previous set, you will need to remove the existing “DPViewGroup” using the View Group Management menu inside the engine before running this executable, which will then recreate the View Group for the new number of projectors rather than updating the existing one. Any custom configuration added to the existing View Group, this will have to be re-added to the new one manually.

### Licensing

DPPrepar3Dv4Plugin requires licenses. Without valid licenses, a watermark is shown on top of the display output. For each active display one channel license is required.

The licenses are stored on a hardware dongle from CodeMeter. For this dongle to work the CodeMeter runtime must be installed on each PC using the plugin.

The license can optionally be distributed over local network. For example in a render cluster only one PC with a licensing dongle and enough channel licenses is required.

#### Server settings

Network based licensing must be activated on the computer with the dongle attached to. To enable the license server you will need to open Codemeter WebAdmin. There are several ways of doing this, such as right-clicking on the Codemeter app icon in the app tray and selecting the option to open WebAdmin. Once in WebAdmin navigate to Configuration -> Server -> Server Access and enable the network server.

`Figure 4: Server Access settings in CodeMeter WebAdmin`

Apply the changes and restart the Codemeter runtime (right-click the icon, select “Exit”, and restart the program) in order to activate the server.

#### Client settings

DPPrepar3D plugin usually gets the license from the sever through a broadcast mechanism. Additionally (or in case of network issues), the location of the license server can be configured on each PC running the plugin. Open WebAdmin as described above and navigate to Configuration -> Basic -> Server Search List. Add the IP-address of the License Server to the Server Search List.

Note: Internet Explorer, which may be used by default, will need a security exception to allow the input dialogue. There will be a notification if it’s needed.

`Figure 5: server search settings in CodeMeter WebAdmin`

Note: after starting the plugin it may take a few seconds until the license is found. The license is checked periodically by the plugin and the watermark will disappear once it is found. Please check your network and firewall settings if the watermark does not disappear after a minute or so. The web configuration of CodeMeter may not work with older browsers, for example Internet Explorer in Windows 7. In this case use the following command in a terminal instead:

`"C:\Program Files (x86)\CodeMeter\Runtime\bin\"cmu32.exe --add-server SERVER-IP`

# Indices and tables

- Index

- Module Index

- Search Page