Create display setup (Monitors) - winnubstj/Gimbl Wiki

In order to have correct perspective mapping from the animals position we have to create a 3d model of the monitor setup. During this process keep in mind to keep the real world scaling of 1 distance unit in unity consistent (mice: 1 unit is 1 decimeter, fly: 1 unit is 1 cm etc.)

  1. Start by creating an empty 3d session in Unity.

  2. Now we are going to create an object that represents the view point of the animal. Right click on the hierarchy window and select "Create Empty". Right click on the created "GameObject" to rename it to a recognizable name of your choosing (e.g. MyMonitorSetup).

  3. Check that the position of the GameObject is at 0,0,0 in the Inspector menu. Next, click on the grey cube in the top-left to give the object a visual marker in the scene view.

  4. We are now going to add flat surfaces to represent our monitors. On most setups it will be easiest to start with the center monitor that is orthogonal to the viewing direction of the animal. Right click on the hierarchy window and select "3D object -> Quad". Rename this object to a recongizable name (e.g. CenterMonitor). Drag the Quad object onto the previously created MyMonitorSetup Object. The plane object should now be a child of the MyMonitorSetup Object (see image).

  5. Download the file MonitorTestMaterial.psd and drag it into the project Asset section in the bottom menu. Then drag this texture onto the monitor object you just created. Select the monitor object and at the bottom of the window set the 'Shader' to 'Unlit' (you can use the search function). Confirm that the corners are labeled correctly.

  6. Select the created quad and for the X Scale value fill in the width of the visible monitor size (no bezel!) in decimeters. Next, fill in the height of the monitor as the Y Scale value. (Note: if your monitor is rotated then fill in the width and height from the perspective of the animal. Make sure your monitors are set to portrait mode in your OS if this is the case). Change the position (and if necessary the rotation) of the quad to match the physical setup (in decimeters). Keep in mind that the position is relative to animal location (0,0,0) and the center of the monitor surface.

  7. Repeat this step untill you have recreated you physical setup. A simple trick here is to right-click on a monitor surface you have already create and select "Duplicate" so you dont have to start from scratch (Dont forget to rename!).

  8. As a last step change the Y position of the MonitorSetup object to determine the height of the animals view in the virtual world.

  9. To export the model, drag the "MyMonitorSetup" object to the assets folder below. The Monitor object should now turn blue. Right click on the created asset in the Assets window and select "Shown in Explorer". Copy this file to "Gimbl-Package/Resources/Displays". The display setup should now be available in the Gimbl package menu under "Displays->Create".