Running a Multipiped Version 5 Session 

In About Virtual Reality Support in Version 5, we discussed the different types of virtual reality configurations available. However, intensive use of virtual reality technology leads to loss of performance if you are using only one graphics pipe.
  This scenario shows you how to run a multipiped session manually, which is the basic mode. This mode requires you to use the CATMPKConfig variable and to create and edit the configuration file referenced by the variable.
However, an alternate (and more convenient) method is to use the Immersive System Assistant workbench that enables you to generate automatically your configuration file.

What is a "pipe" and what is the difference between a single and multipipe system?

A "pipe" in this context refers to the graphics board associated with each single window into an application. It also refers to the data that is placed by the application which owns the pipe.

You can also have a single pipe feeding three display channels like this:

Nothing prevents you from using virtual reality configurations with just one pipe, the problem is that the overhead of running multiple applications in a single piped system can result in very poor performance.

In a "multipipe" system, you can have several graphics boards, and each graphics board feeds a different display channel. Each application in a " multipipe" system has its own distinct pipe to the graphics hardware. There is a price to pay in memory usage and a very slight price to pay in computer overhead to manage the multiple pipes, but the overall positive effect on system performance is dramatic.
Performance can be enhanced even further if you are running workstations using multiple processors, which allow "multithreading" of applications.
Note that:
  • the Version 5 infrastructure for UNIX platforms provides support for 16 windows maximum
  • one window/pipe can be assigned to two threads (2 CPUs).

 

A typical configuration is a workstation using four graphics pipes. You run a main Version 5 session using one pipe from a workstation, and create three secondary windows (each one using its own graphics pipe) for projection onto a Reality Center-type projection screen, or inside a virtual reality CAVE.
  1. Log onto the workstation.

  2. Run the following command to display graphics subsystem information about your configuration:

    /usr/gfx/gfxinfo

    This command displays information (display name, resolution, etc.) about each graphics pipe like this:

    Graphics board 0 is "KONAL" graphics.

                      Managed (":0.0") 1280x1024

    ...

    Graphics board 1 is "KONAL" graphics.

                      Managed (":0.1") 1280x1024

    ...

    Graphics board 0 is "KONAL" graphics.

                      Managed (":0.2") 1280x1024

    ...

    Graphics board 1 is "KONAL" graphics.

                      Managed (":0.3") 1280x1024

    ...

  3. Synchronize the graphics pipes with the video channels in your configuration by running the program:

    /usr/gfx/ircombine

    Refer to your IRIX documentation for more information about the ircombine program.

  4. Export the following environment variable:

    export CATMPKConfig=path/myconfigfile

    where "path" is the path of a directory and "myconfigfile" is the name of a configuration file which you must create and edit to set up the secondary windows and assign them to different graphics pipes and displays. 

    Version 5 supports OpenGL Multipipe SDK technology (MPK). The MPK library is developped by SGI to manage multi-channel display configurations. 
    Selecting View > Full Screen switches on and off the Version 5 multichannel and the MPK support. The prerequisite is that the environment variable, i.e. CATMPKConfig is valuated to a configuration file path before running the application.
    Using MPK Version 5 provides powerful support for many virtual reality configurations:
    • active or passive stereo
    • decompositions, such as Stereo (Eye), DPLEX, 2D
    • all multi-screen/multi-projector configurations such as TAN Holobench, Fakespace CAVE, etc.
    • viewpoint tracking on all screens.
  5. Edit the configuration file. 

  6. Save your changes to the configuration file, then start your main Version 5 session.

  7. In your main session, run the command, select View > Full Screen.

    The video output displayed inside your main session is now projected coherently across the three windows.
  8. In your main session, right-click then clear Full Screen to exit Full Screen mode and stop multipiping.

You can use stereoscopic viewing from within a multipiped session.

Note also that in CAVE configuration, you can increase the specular lighting accuracy by selecting Enable OpenGL local viewer lighting in Tools > Options > General > Display > Performance.
Be aware that this may lead to a loss of performance.

 

Calibrating the multi-channel support

First of all, let's remind us of the SGI pipe and channel architecture.

An SGI computer as an Octane or an Onyx may host several graphic boards, named pipes. A same application can render images on all of these pipes. A pipe has a frame buffer in which the application write the images they compute. More precisely, each application writes images in windows that are sub-parts of the frame buffer.

On the video output side, the system reads the pipes frame buffer and generate video signals. There is one video signal per active channel. Each pipe may host several channels. Each channel is positioned on a part of a pipe frame buffer, and a video signal generated display this particular part.

The important caracteristic of the system is the number of pipes, their frame buffer size (called "managed area"), the number of channel per pipe, their corresponding frame buffer sub area and the video signal format they output.

You get the system information by typing /usr/gfx/gfxinfo in a shell. You can modify your system configuration using the "setmon" or "ircombine" commands. They enable you to change the pipe-managed area size, the activated channels on each pipe, their frame buffer part as well as their video format. Report to the SGI documentation to use these commands.

The pipes are usually named ":0.0" , ":0.1" , ":0.2" ..., unless you have several X Servers, in which case they are named ":0.0", ":0.1" ... on X Server 0, ":1.0", ":1.1",..., on X server 1 ....

 

On the scheme above, the system has two pipes and six channels per pipe. Only two are activated on each pipe. The pipe-managed areas are 2560x2000.

The Pipe 0, channel 0 is associated to an area of size 1280x1024, and located at the coordinate (0,0).
The Pipe 0, channel 1 is associated to an area of size 1280x1024, and located at the coordinate (0.5,0).
The Pipe 1, channel 0 is associated to an area of size 1280x1024, and located at the coordinate (0,0).
The Pipe 1, channel 1 is associated to an area of size 1280x1024, and located at the coordinate (0.5,0).

The channel video format are 1280x1024 at 96Hz stereo for instance.

Version 5 renders 3D images in four windows. Two of them are on pipe 0, and the other two on pipe 1. Among these windows, one is particular: this is the main document window which appears within the application frame. The other windows are called "auxiliary windows". If the user goes to the "FullScreen" mode, a complete image of the model will appear on the screen.

All the information Version 5 needs for such a configuation are in a configuration file (refer to SGI MPK support).
However, the system should also be correctly set up using ircombine or setmon.

Also, since this system outputs active stereo, the pipes need to be "genlocked". This means that their video refresh are synchronized. This is necessary for the stereo glasses to work corrrectly. You should refer to the SGI support for genlocking your system.

For instance, to set up the system, you can run the following script in a shell. You need the administrator privileges. This script will log you out and may badly affect the system if there is an error in it.

echo "Pipe 0 INTERNAL (master). Setting ..."

/usr/gfx/ircombine \

-target :0.0 \

-destination eeprom \

-global syncsource=INTERNAL,size=2560x2000 \

-channel 0 format=1280x1024_96s,sync=RGB,sourceloc=0+0 \

-channel 1 format=1280x1024_96s,sync=RGB,sourceloc=1280+0

echo "done."

  

echo "Pipe 1 EXTERNAL (slave). Setting ..."

/usr/gfx/ircombine \

-target :0.1 \

-destination eeprom \

-global syncsource=EXTERNAL,syncformat=1280x1024_96s,size=2560x2000 \

-channel 0 format=1280x1024_96s,sync=RGB,sourceloc=0+0 \

-channel 1 format=1280x1024_96s,sync=RGB,sourceloc=1280+0

echo "done."

echo

  

(/usr/gfx/stopgfx;/usr/gfx/startgfx)&

To run V5 with such a configuration file, type in a shell:

export CATMPKConfig={complete path of the config file}

then, in this same shell, run Version 5:

/usr/DassaultSystemes/Bn/irix_a/command/catstart -env {EnvName} -direnv {environment path name}

where "n" is the release number.

View > Full Screen uses the configuration file pointed by the CATMPKConfig environment variable.To have a full undertanding of the MPK config file format, please refer to the MPK documentation. Only a standard display configuration will be taken as an example and detailed here.

Let's assume we have a cubic immersive space such as a Fakespace CAVE, or a Barco Cubic Immersive Space. This system has four walls. All of them are square. The length of each square side is 3 meters long. There are four projectors displaying active stereo (one projector per wall).

The computer has two pipes and six channels per pipe. It is set (ircombine) so that:

  • The pipe-managed areas are 2560x1024

  • Pipe 0 channel 0 goes to the front wall. Its size is 1280x1024. Its location is (0,0)

  • Pipe 0 channel 1 goes to the right wall. Its size is 1280x1024. Its location is (1280,0)

  • Pipe 1 channel 0 goes to the left wall. Its size is 1280x1024. Its location is (0,0)

  • Pipe 1 channel 1 goes to the floor. Its size is 1280x1024. Its location is (1280,0)

The mpk file writes as follows:

global

{
    MPK_WATTR_PLANES_ALPHA  1

   
MPK_DEFAULT_EYE_OFFSET 57

   
MPK_WATTR_HINTS_STEREO  1

   
MPK_DATTR_QUADSTEREO_HEIGHT 768

   
MPK_DATTR_QUADSTEREO_WIDTH  1024

}

config

{

   
name    "Config"

   
mode    stereo

   
mono    [ "", none ]

   
stereo    [ "", quad ]


   

   
pipe

   
{

      
display           ":0.0"

      
window

      
{

        
name          "left window"

        
viewport       
[0, 0, 1, 1 ]

        
channel

        
{


          
name           "left view"

           
viewport       
[ 0., 0., 1., 1. ]

          
wall

          
{

           
bottom_left  
[-1828.8, -1524, 1828.8 ]

           
bottom_right 
[-1828.8, -1524, -1828.8 ]

           
top_left        [
-1828.8, 1524, 1828.8 ]
            
}

        
}

    
}

      
window

      
{

        
name                "front window"

        
viewport               
[0, 0, 1, 1 ]

        
channel

        
{

          
name                "front view"

          
viewport               
[ 0., 0., 1., 1. ]

            
wall

          
{

            
bottom_left 
[-1828.8, -1524, -1828.8 ]

            
bottom_right
[1828.8, -1524, -1828.8 ]

            
top_left       
[-1828.8, 1524, -1828.8 ]

           
}

        
}

     
}

  
}

   
pipe

  
{

      
display                ":0.1"

      
window

      
{

        
name                "right window"

        
viewport               
[0, 0, 1, 1 ]

        
channel

        
{

          
name                "right view"

          
viewport               
[ 0., 0., 1., 1. ]

          
wall

           
{


            
bottom_left 
[1828.8, -1524, -1828.8 ]
 
            
bottom_right
[1828.8, -1524, 1828.8 ]

            
top_left      
[1828.8, 1524, -1828.8 ]
   
           
}

       
}

    
}

      
window

      
{

         
name                "floor window"

         
viewport              
[0, 0, 1, 1 ]

         
channel

         
{

            
name                "floor view"

            
viewport             
[ 0., 0., 1., 1. ]

            
wall

            
{

              
bottom_left
[-1828.8, -1524, 1828.8 ]

              
bottom_right
[1828.8, -1524, 1828.8 ]

              
top_left    
[-1828.8, -1524, -1828.8 ]

            
}

         
}

      
}

  
}

 

This is the global section where you set some global options.

Always specify the MPK_WATTR_HINTS_STEREO option when using stereo. Set thMPK_DATTR_QUADSTEREO_HEIGHT and MPK_DATTR_QUADSTEREO_WIDTH  to your  manage area size when using stereo.

Set the "mode" to "stereo" or "mono" to activate or not the stereoscopic rendering.

 

 

Declare the pipes you are using and specify their name.

In each pipe section, declare the windows Version 5 will manage on these pipe (including the main document window). The main document window should always appear first in its pipe. If your run Version 5 in pipe X, the main document window will use the paramaters of the window declared first in the pipe X section of the configuration file.

The window viewport specifies the window size and position within the pipe frame buffer. The figures correspond to a ratio of the managed area size : [x,y,width.height].

You should always declare one channel per window, and only one (Version 5 only support on channel per window). The term channel may be confusiong since it does not have the same meaning as the usual pipe channels. Just always declare the channel viewport as [0,0,1,1]. Then, specify the coordinates of the wall corners. This window image will then be supposed to be projected onto the corresponding wall, fitting exactly the rectangle described by the coordinates.

The coordinates should be expressed in the MPK reference frame. Use the same unit as the unit.

The default eye position is defined by this reference frame. This means that if you use the View > Full Screen command without head tracking, the point of view will be computed for a user standing with its head at this reference frame origin, looking along its -Z axis, and with its right on the positive X axis side.

Since it is usually better to define the system front wall as the one naturally seen by the default head position, the MPK reference frame is chosen so that this front wall is on its -Z axis side.

Bear also in mind that the interaction with the model is only possible within the main window. In particular, this is the case of the viewpoint manipulation with the mouse.
Thus, the front wall is usually set as the main document window.

Here, we get :