# Unreal Engine

This section provides a guideline on how to integrate VIOSO calibration data into Unreal.

Unreal Engine uses [nDisplay ](https://docs.unrealengine.com/4.26/en-US/WorkingWithMedia/nDisplay/)for distributing and synchronizing content over multiple displays and servers. It can use VIOSO’s calibration data through the MPCDI or .VWF data formats.

Workflow in the steps below:

* [1. In VIOSO software](#id-1578359993-mdhpsx)
* [2. In Unreal Engine](#id-598873119-95xdow)
  * [2.1 versions 4.27.x – 5](#id-90805175-of5izm)
  * [2.2 versions 4.24 – 4.26](#id-1292576303-osbp4k)
* [3. Notes & Troubleshooting](#id-218061423-zk4a0a)

### 1. In VIOSO software <a href="#id-1578359993-mdhpsx" id="id-1578359993-mdhpsx"></a>

Perform a camera based 3D calibration with **VIOSO SIM** or **Anyblend VR\&SIM  (version  5.1.7 or later).** You can use either: [Free mode](https://docs.vioso.com/start/free-mode) or [project mode (3D mapping)](https://docs.vioso.com/start/project-mode)

NDisplay can read VWF (3D/2D) or VESA MPCDI v2 3D formats. The difference between both formats is explained in section [3. Notes & Troubleshooting](#id-218061423-zk4a0a).

From the menu bar, go to **File > Export Mapping**:

* Select your compound display.
* Select the **VWF** or **VESA MPCDI v2** format.
* Make sure the **3D** box is checked, and for mpcdi set Blend Bit depth to **Grey8** or **Grey16**
* Choose a file name and path.
* Click on **Export.**

– For mpcdi: the export will be a folder containing an XML document along with a set of `PFM` files for geometry and their respective blending masks as `PNGs`.

– For vwf: the export will be a VIOSO format file containing several mappings or a set of files containing one mapping each. You can preview vwf files in Windows with a tool installed by default with the VIOSO software: **`C:\Program Files\VIOSO6\Shared tools\VIOSO_CalibAssign64.exe`**

### 2. In Unreal Engine <a href="#id-598873119-95xdow" id="id-598873119-95xdow"></a>

#### 2.1 versions 4.27.x – 5 <a href="#id-90805175-of5izm" id="id-90805175-of5izm"></a>

**a. Workflow**

The integration of the calibration files is done through the **Projection Policy** of the nDisplay **viewport**.

First you need to setup your project and have it up and running on all clusters and displays. Then, switch the projection policy of each target viewport to type= **VIOSO** or **MPCDI**. You can do this either through the user interface [**3D config Editor**](https://dev.epicgames.com/documentation/en-us/unreal-engine/ndisplay-3d-config-editor-in-unreal-engine?application_version=5.3) or by editing the [configuration files](https://dev.epicgames.com/documentation/en-us/unreal-engine/ndisplay-configuration-file-reference-for-unreal-engine?application_version=5.3) (.ndisplay), (.cfg).

![](https://helpdesk.vioso.com/wp-content/uploads/2020/04/UE_vwf-1024x570.jpg)

The configuration parameters are detailed in the table below:

<table><thead><tr><th width="105">Type</th><th width="189">Parameter</th><th>Description</th></tr></thead><tbody><tr><td>VIOSO</td><td><code>VIOSO type</code></td><td><ol><li><strong>Explicit VWF</strong>: reference directly the calibration file (.vwf) exported from VIOSO</li><li><strong>VIOSO</strong>: reference the standard API configuration file: <a href="broken-reference">VIOSOWarpBlend.ini</a></li></ol></td></tr><tr><td>VIOSO</td><td><code>file</code></td><td><ol><li><strong>vwf:</strong> calibration file exported from the VIOSO software.</li><li><strong>ini file:</strong> API configuration file with extra parameters:  <a href="broken-reference">VIOSOWarpBlend.ini</a></li></ol></td></tr><tr><td>VIOSO</td><td><code>Units in Meter</code></td><td>The units of the 3D model used in the VIOSO calibration. By default VIOSO’s own models are inmilliliters, so units in meter = 1000</td></tr><tr><td>VIOSO</td><td><code>Calib index</code></td><td>Index of the mapping inside the calibration file, in case several projectors are exported to a single file</td></tr><tr><td>VIOSO</td><td><code>origin</code></td><td>The ID of a <code>[scene_node]</code> that defines the origin for the projection screen. This maps the frame of reference defined in the calibration to the virtual space in your Unreal Engine Level. Defaults to the origin of the 3D model used in the VIOSO calibration.<br>You can use this node as an <strong>offset</strong> to position the projection screen in the 3D scene.</td></tr><tr><td>VIOSO</td><td><code>Enable Preview</code></td><td>Renders the VWF mesh in the editor viewport preview.</td></tr><tr><td>MPCDI</td><td><code>pfm</code></td><td>Geometry file exported in the VIOSO mpcdi folder</td></tr><tr><td>MPCDI</td><td><code>png</code></td><td>Blending file exported in the VIOSO mpcdi folder</td></tr><tr><td>VIOSO / MPCDI</td><td><code>View Origin</code></td><td>Origin of the viewing frustum. You can use this as an <strong>eyepoint</strong> node, to allow static/dynamic perspective correction.</td></tr></tbody></table>

**b. Example Configurations**

> [Find here example files for VIOSO calibrations (v4.27 & v5)](https://docs.vioso.com/integration/real-time-engines/unreal-engine/ue-examples-and-sample-files)

#### 2.2 versions 4.24 – 4.26 <a href="#id-1292576303-osbp4k" id="id-1292576303-osbp4k"></a>

For v4.26 and older versions of Unreal, you can [find here the old helpdesk guide](https://helpdesk.vioso.com/documentation/integrate-3d-engines/unreal/).

### 3. Notes & Troubleshooting <a href="#id-218061423-zk4a0a" id="id-218061423-zk4a0a"></a>

* Make sure all paths and file names of your configuration contain no spaces.
* Carefully verify the syntax of your `.cfg /.nDisplay` file. A single typo may cause the application to crash at start-up.
* Check the log files generated in `[YourBuildPath]\nDisplay\Saved\Logs` to monitor the events and errors of the application.
* Make sure that the Windows account you intend to use on the master computer has administrative rights on all computers you will use in the nDisplay network.
* Make sure that all computers you want to use in the nDisplay network can receive TCP/IP communications over ports 41000, 41001, 41002, and 41003.
* **Eyepoint Position:** you can define the initial eyepoint position relative to your 3D model center by adding an “origin” param in the projection definition (MPCDI or VIOSO) and then defining its coordinates in a \[scene node]. This origin is relative to the center of the 3D model used for the calibration and expressed in UE coordinate system.
* #### **MPCDI vs VWF  formats:**

VIOSO also has a native integration into nDisplay (UE v4.26+), allowing you to use the (.vwf) export format instead of MPCDI in the projection policy. This table summarizes the main differences and advantages of choosing between the two formats:

|                                         | **.mpcdi**                                                     | **.vwf**                                                      |
| --------------------------------------- | -------------------------------------------------------------- | ------------------------------------------------------------- |
| Unreal versions                         | *v4.24 and later*                                              | *v4.26 and later*                                             |
| DirectX12 support                       | *✓*                                                            | <p><em>beta</em><br></p>                                      |
| Mesh preview inside Unreal Engine       | ✓                                                              | <p>x<br>available from v5.3.1+</p>                            |
| Calibration Type                        | 3D only                                                        | <p>2D<br>& 3D available from v5.3.1+<br></p>                  |
| Color Adjustment, RGB blending/matching | x                                                              | ✓                                                             |
| Overshoot masking                       | must manually draw masks                                       | <p>automatically masked from the warping result<br></p>       |
| Alpha/Gamma Blending factor             | <p>adjustable in the nDisplay config file<br>Recommended=2</p> | <p>adjustable in the VIOSO export window<br>Recommended=2</p> |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.vioso.com/integration/real-time-engines/unreal-engine.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
