Graphics.CreatingMulti headedDisplays - lordmundi/wikidoctest GitHub Wiki

Creating Multi-headed Displays

« Writing a Custom Pick Functionality | EDGE User’s Guide | Using Frame Locking across multiple displays »

Creating a multi-headed display in EDGE is suprisingly straight forward and relatively easy. As an example we will show how to derive the different parameters needed to properly setup a three-headed panaramic display with a given geometry and design eye-point. The following picture is a top view of the layout we are going to use. All viewport definitions will make use of the "window" command since it lets us define off axis projections which are common in multi-headed displays. The "window" command syntax is "window( left, right, bottom, top, near, far)" where each is specified in inches. The "pan(angle)", "tilt(angle)" and "spin(angle)" commands take a single parameter which specifies an angle in degrees that is "+left/-right", "+above/-below", and "+counter-clockwise/-clockwise" repectfully relative to the design view-vector. Also the channel that the views are defined in should have the "attribs(NOZOOM)" specified since zooming a camera assigned to the design eye-point would destroy the calibration.


Figure 1

Three displays labed A,B,C and the design eyepoint labled E. The red portion is the active display region and the black area can be considered the display bevel/housing.


Figure 2

Starting with display "A" and figure 2 above, we will define a viewport definition we can use. Using a tape measure or engineering drawing of the setup, measure the distance from the design eye-point to a point in the plane the display surface lies in that forms a perpendicular vector to the plane. This measurement will become the "near" parameter to the "window" command. Next from that point in the plane measure the distance to the left edge of the displayable area, if you end up measuring to the left of the perpendicular vector then the measurement is entered as negative. This measurement becomes the "left" parameter in the "window" command. Next measure the distance from the same point to the right edge of the display, if you end up measuring to the left of the perpendicular vector then the measurement is entered as negative. This measurement becomes the "right" parameter in the "window" command. The same procedure is done for the top and bottom of the displayable area with values that are measured below the perpendicular vector being recorded as negative. All that is left is to define what the "far" field will be, in EDGE a very large number like 10000000000000000.0 should be used. Since we had to turn the design eye's design vector to the left in order to look down the perpendicular vector that angle becomes the value passed to the "pan" command for the viewport. For display "A" both the "left" and "right" window parameters would be negative and the angle used in the "pan" command would be positive. The following is a sample of how this might look in a config file.

DSP_CONFIG
{
    DISPLAY
    {
         LEFT_DISPLAY
         {
             channel1
             {
                 view.LEFT  EyeCam pan(30.0) window(-24.0,-4.0,-6.0,6.0,22.0,10000000000.0) xywh(0,0,1920,1080)
                 attribs(NOZOOM)
             }
         }
    }
}


Figure 3

Working with display "B" and figure 3 above we notice it is directly in front of the design eye-point so no "pan" offset will be required. We make measurements just like we did for display "A" except we will end up recording a positive value for the "right" parameter since it was measured to the right of the perpendicular vector. The following shows how we would add it to our sample config.

DSP_CONFIG
{
    DISPLAY
    {
         LEFT_DISPLAY
         {
             channel1
             {
                 view.LEFT  EyeCam pan(30.0) window(-24.0,-4.0,-6.0,6.0,22.0,10000000000.0) xywh(0,0,1920,1080)
                 attribs(NOZOOM)
             }
         }

         MID_DISPLAY
         {
             channel1
             {
                 view.MID  EyeCam pan(0.0) window(-10.0,10.0,-6.0,6.0,22.0,100000000000.0) xywh(0,0,1920,1080)
                 attribs(NOZOOM)
             }
         }
    }
}


Figure 4

Working with display "C" and figure 4 above we make measurements just like we did for monitor "A" but this time the "left" and "right" parameters will end up being positive since they are both to the right of the perpendicular vector. The "pan" angle will be entered as negative in this case because the perpendicular vector is to the right of the design view-point direction. The following shows how our sample config might look after all three display configurations have been added. In this example each display would be running as a seperate EDGE client.

DSP_CONFIG
{
    DISPLAY
    {
         LEFT_DISPLAY
         {
             channel1
             {
                 view.LEFT  EyeCam pan(30.0) window(-24.0,-4.0,-6.0,6.0,22.0,10000000000.0) xywh(0,0,1920,1080)
                 attribs(NOZOOM)
             }
         }

         MID_DISPLAY
         {
             channel1
             {
                 view.MID  EyeCam pan(0.0) window(-10.0,10.0,-6.0,6.0,22.0,100000000000.0) xywh(0,0,1920,1080)
                 attribs(NOZOOM)
             }
         }

         RIGHT_DISPLAY
         {
             channel1
             {
                 view.RIGHT  EyeCam pan(-30.0) window(4.0,24.0,-6.0,6.0,22.0,1000000000000.0) xywh(0,0,1920,1080)
                 attribs(NOZOOM)
             }
         }
    }
}

If you had a three headed single machine all the "view" definitions could reside in the same channel of the same display block but would have different "xywh" settings to place each viewport in the proper location on your large virtual desktop. The following sample is how this might look in a config file.

DSP_CONFIG
{
    DISPLAY
    {
         PANOGRAPHIC_DISPLAY
         {
             channel1
             {
                 view.LEFT  EyeCam pan(30.0)  window(-24.0,-4.0,-6.0,6.0,22.0,1000000000000.0) xywh(0,0,1920,1080)
                 view.MID   EyeCam pan(0.0)   window(-10.0,10.0,-6.0,6.0,22.0,1000000000000.0) xywh(1920,0,1920,1080)
                 view.RIGHT EyeCam pan(-30.0) window(4.0,24.0,-6.0,6.0,22.0,1000000000000.0)   xywh(3840,0,1920,1080)
                 attribs(NOZOOM)
             }
         }
    }
}

NOTE: If you want to change the "near" value to something other that what was measured you will have to scale the "left", "right", "bottom", and "top" fields by the same amount that "near" would have to be scaled in order to have the value you want!

« Writing a Custom Pick Functionality | EDGE User’s Guide | Using Frame Locking across multiple displays »