# MiddleVR

[MiddleVR](https://www.middlevr.com) is a Unity plugin designed to enable the deployment of Unity applications to VR systems such as Walls, CAVEs, and other cluster rendering systems.

This guide shows you how to integrate your VIOSO projection calibration into MiddleVR.

&#x20;

### 1. In VIOSO <a href="#id-546691684-wburbr" id="id-546691684-wburbr"></a>

You can use either [Project ](https://docs.vioso.com/start/project-mode)or [Free ](https://docs.vioso.com/start/free-mode)mode for performing a 3D calibration.

* Export your calibration in the **VWF** format with **3D**.&#x20;
* Create an **.ini** file for each display in the format below. You only need to change `calibFile`path (exported mapping from VIOSO), `[Channel_Name]` (of your choice) and `calibIndex` :

<pre class="language-ini"><code class="lang-ini">[default]
logLevel=2
bLogClear=0 ;clear log file on start
base=[1000,0,0,0; 0,1000,0,0; 0,0,1000,0; 0,0,0,1] ; frontal cam left handed, row major, most DX
near=0.15 ; the minimum rendering distance, all faces closer than that are culled
far=20000 ; the maximum rendering disctance, all faces futher than that are culled
bTurnWithView=0 ; set to true, if moving platform alas world turns with view direction
bicubic=0 ; set to true to enhance sampling acuracy, will use up some extra GPU
<strong>calibFile=C:\Users\Public\Documents\VIOSO\VIOSOPlayer\Export\MyCalib.vwf
</strong>autoViewC=1 ;widen FoV to cover a range of autoViewC * screen
bAutoView=1 ;overwrites screen fov and dir
<strong>[Channel_1]
</strong><strong>calibIndex=0
</strong></code></pre>

### 2. in Middle VR 2.1+ <a href="#id-61580603-3kp3hw" id="id-61580603-3kp3hw"></a>

> You can also find these steps in the MiddleVR Documentation
>
> <https://www.middlevr.com/2/doc/2.1.0.0/CfgWarping.html#vioso>

1. **in 3D nodes:** Start by adding a new Vioso Warper

<img src="https://www.middlevr.com/2/doc/2.1.0.0/images/warping_mvr_cfg_new_Vioso.png" alt="" data-size="original">

2. &#x20;Enter the configuration file and channel name. You can find a template of a .ini file in `MiddleVR2/data/Vioso_MiddleVR_Template.ini`\
   ![](https://www.middlevr.com/2/doc/2.1.0.0/images/warping_mvr_cfg_Vioso_prop.png)
3. Assign the warper to a Camera\
   ![](https://www.middlevr.com/2/doc/2.1.0.0/images/warping_mvr_cfg_vioso_cam.png)
4. Your VIOSO calibration is now integrated.
   * Go back to the **APPS** tab and click on **RUN**.

### 3. Middle VR 2.0 (Legacy) <a href="#id-1807272125-rlxthx" id="id-1807272125-rlxthx"></a>

> For older versions of MVR, please follow our old helpdesk doc. <https://helpdesk.vioso.com/documentation/integrate-3d-engines/middlevr/#2_In_MiddleVR_20_legacy>

### 3. Troubleshooting <a href="#id-1477152321-r4mw9i" id="id-1477152321-r4mw9i"></a>

* In the Displays section, make sure the Window Mode is set to **Compositor** or **Proxy**
* Check the VIOSO log file here: `C:\Users\[YourUserName]\AppData\Local\Temp\MiddleVR\MiddleVR_2023-06-29\MiddleVR_Vioso_1.log`

#### Field of view adjustment <a href="#id-1205716311-c4nv4w" id="id-1205716311-c4nv4w"></a>

Moving the camera far away from the screen can result in black borders appearing around the screen. To fix this, you can adjust the field of view coverage by increasing the `autoViewC` variable in the **.ini** files until you get no visible black borders on the edges.

#### Multi-Cluster Setup <a href="#id-1405524229-559v6m" id="id-1405524229-559v6m"></a>

To run middleVR on several clusters with a VIOSO calibration make sure you take into consideration these measures:

* Calibration files **(.vwf)** and configuration files **(.ini)** must be available on all clusters with the same path. It is recommended to use local drives instead of a common network drive for better performance.
* Assign a viewport to every cluster. In case one cluster node is not part of the projection calibration, simply create a standard screen and camera for it in the **3D nodes** tab.
* Follow the [cluster configuration guide](https://www.middlevr.com/2/doc/current/MiddleVR_UserGuide.html#cfg_cluster) from middleVR for the initial setup of your multi-cluster system.
