ParaView/Users Guide/CAVE Display: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
VR support in ParaView is provided by adding mechanisms to read system can be seen as a Input/Output manager. The inputs in our case can range from keyboard/mouse to Tracked inputs from a VRPN server. can be simple keyboard/mouse based or complex using a combination of Tracked, Analog and Button based devices. Outputs typically consists of multiple displays organized to configurations to enDisplays like the CAVE can be formed in various configurations. In ParaView these configurations can be specified using the PVX configuration XML file.  
== Introduction ==
* ParaView has basic support for visualization in CAVE like environments. These environments consists of multiple displays which are configured based on some coordinates in the room. Typically the base coordiante of the room is the reference coordinate of the head-tracker.


* ParaView can operate in a Client-Server fashion. The CAVE modules leverages this by assigning different process on the server to manage different displays. The client acts as a central point of control, sending tracking values to each of the processes on the server.


VR support in ParaView uses the Client-Server mechanism
* ParaView has a VRPN (Virtual Reality Private Network) client plugin which reads tracked information from any VRPN server and relays the value to each process managing the display.


==Where to specify this?==
* Displays are configured using the PVX configuration XML file.
* The CAVE support leverages the Render-Server capability and displays are managed by individual processes on the server side.
 
* pvx file can be specified as the last command line argument for any of the server processes.  
== Prerequisites ==
* Typically the pvx file is specified for all the executables whose environment is being changed using the pvx file. In case of data-server/render-server configuration, if you are setting up the environment for the two processes groups, then the pvx file must be passed as a command line option to both the executables: pvdataserver and pvrenderserver.
* VRPN needs to be installed on the client side.
* When running in parallel the file is read on all nodes, hence must be present on all nodes.
* MPI needs to be installed on the server side.
 
* Make sure to enable <code> BUILD_SHARED_LIB, PARAVIEW_USE_MPI </code> and <code> PARAVIEW_BUILD_PLUGIN_VRPNPlugin </code> when building for CAVE support.  
 
* Consequently <code> VRPN_INCLUDE_DIR </code> and <code> VRPN_LIBRARY </code> should also be set.  


==Structure==
==Structure of config file==


<source lang="xml">
<source lang="xml">
Line 32: Line 37:
             LowerLeft="-1.0 -1.0 -1.0"
             LowerLeft="-1.0 -1.0 -1.0"
             LowerRight="1.0 -1.0 -1.0"
             LowerRight="1.0 -1.0 -1.0"
             UpperLeft="-1.0  1.0 -1.0">
             UpperRight="1.0  1.0 -1.0">
       <!--
       <!--
         There can be multiple <Machine> elements in a <Process> element,  
         There can be multiple <Machine> elements in a <Process> element,  
Line 39: Line 44:
         name="hostname"
         name="hostname"
         Environment: the environment for the process.
         Environment: the environment for the process.
         LowerLeft|LowerRight|UpperLeft : CAVE configuration parameters applicable
         LowerLeft|LowerRight|UpperRight
                                          for versions 3.8 or latter only.
       -->
       -->
     </Machine>
     </Machine>
Line 47: Line 50:
</pvx>
</pvx>
</source>
</source>
* Only 2 vectors ([LowerRight - LowerLef] and [UpperLeft - LowerLeft]) are needed, the third vector is computed from these 2.


== Cave Rendering ==
=== Example Config ===
===Instructions===
* The following example is for a six sided cave with origin at (0,0,0).
* Turn on <code>PARAVIEW_USE_MPI</code> and <code>PARAVIEW_USE_ICE_T</code>
 
* run the servers using the pvx file: <code>mpiexec -np 2 pvserver cave.pvx</code>
* start and connect a client
=== Notes ===
* See below for an example of a cave configuration file
<source lang="xml">
<source lang="xml">
<?xml version="1.0" ?>
<?xml version="1.0" ?>
Line 61: Line 59:
  <Process Type="client" />
  <Process Type="client" />
  <Process Type="server">
  <Process Type="server">
  <!-- 2 render windows will be created on the machine Erna:
   <Machine Name="Front"
      the first rendering has a camera looking forward,
      the second rendering has a camera looking backward -->
   <Machine Name="Erna"
           Environment="DISPLAY=:0"
           Environment="DISPLAY=:0"
          <!-- Camera looks forward:
           LowerLeft=" -1 -1 -1"
                dx = 2, dy = 2, dz = -2
           LowerRight=" 1 -1 -1"
                Z = -2 defines the view angle  -->
           UpperRight=" 1  1 -1" />
           LowerLeft="-1 -1 -2"
   <Machine Name="Right"
           LowerRight="1 -1 -2"
           UpperLeft="-1  1 -2" />
   <Machine Name="Erna"
           Environment="DISPLAY=:0"
           Environment="DISPLAY=:0"
           <!-- Camera looks backward:
           LowerLeft="  1 -1 -1"
                dx = -2, dy = 2, dz = 2
          LowerRight=" 1 -1  1"
                Z = 2 defines the distance from the camera to the view plane -->
          UpperRight=" 1  1  1" />
           LowerLeft="1 -1 2"
  <Machine Name="Left"
           LowerRight="-1 -1 2"
          Environment="DISPLAY=:0"
           UpperLeft="1  1 2" />
          LowerLeft=" -1 -1  1"
          LowerRight="-1 -1 -1"
          UpperRight="-1  1 -1"/>
  <Machine Name="Top"
          Environment="DISPLAY=:0"
          LowerLeft=" -1  1 -1"
          LowerRight=" 1  1 -1"
          UpperRight=" 1  1  1"/>
  <Machine Name="Bottom"
          Environment="DISPLAY=:0"
          LowerLeft=" -1 -1  1"
          LowerRight=" 1 -1 1"
          UpperRight=" 1 -1 -1"/>
  <Machine Name="Back"
          Environment="DISPLAY=:0"
           LowerLeft=" 1 -1 1"
           LowerRight="-1 -1 1"
           UpperRight="-1  1  1"/>
   </Process>
   </Process>
</pvx>
</pvx>
</source>
</source>
* See vtkCaveRenderManager::ComputeCamera for more information on how the coordinates are used to configure the cameras
 
* The rendering on the server is full screen by default. If you want the windows to be smaller for debugging, set the environment variable PV_ICET_WINDOW_BORDERS=1 on the client machine.
* A sample PVX is provided in ParaView/Documentation/cave.pvx. This can be used to play with different display configurations.
 
=== Things to keep in mind ===
* pvx file can be specified as the last command line argument for any of the server processes.
* Typically the pvx file is specified for all the executables whose environment is being changed using the pvx file. In case of data-server/render-server configuration, if you are setting up the environment for the two processes groups, then the pvx file must be passed as a command line option to both the executables: pvdataserver and pvrenderserver.
* When running in parallel the file is read on all nodes, hence must be present on all nodes.
 
== Basic steps for a successful setup ==
* On a terminal run the server (6 processes each driving one display in the cave. Change the number of process according to the number of displays).
  # PV_ICET_WINDOW_BORDERS=1 mpiexec -np 6 ./pvserver  /path/to/ConfigFile.pvx
 
Note:  PV_ICET_WINDOW_BORDERS=1 disables the full screen and instead opens up a 400x400 window. Remove this environment variable to work in full screen mode
 
* Open another terminal to  run the client. (note: this client connects to the server which open up 6 windows according to the config given in cave.pvx). Change the stereo-type according to preference (see # ./paraview --help).
  # ./paraview --stereo --stereo-type=Anaglyph --server=localhost --vrpn --vrpn-address=Tracker0@localhost
 
* Connect the client to the server.
 
* Enable the VRPN Plugin on client.

Revision as of 22:29, 16 February 2011

Introduction

  • ParaView has basic support for visualization in CAVE like environments. These environments consists of multiple displays which are configured based on some coordinates in the room. Typically the base coordiante of the room is the reference coordinate of the head-tracker.
  • ParaView can operate in a Client-Server fashion. The CAVE modules leverages this by assigning different process on the server to manage different displays. The client acts as a central point of control, sending tracking values to each of the processes on the server.
  • ParaView has a VRPN (Virtual Reality Private Network) client plugin which reads tracked information from any VRPN server and relays the value to each process managing the display.
  • Displays are configured using the PVX configuration XML file.

Prerequisites

  • VRPN needs to be installed on the client side.
  • MPI needs to be installed on the server side.
  • Make sure to enable BUILD_SHARED_LIB, PARAVIEW_USE_MPI and PARAVIEW_BUILD_PLUGIN_VRPNPlugin when building for CAVE support.
  • Consequently VRPN_INCLUDE_DIR and VRPN_LIBRARY should also be set.

Structure of config file

<source lang="xml"> <?xml version="1.0" ?> <pvx>

 <Process Type="server|dataserver|renderserver">
   <Machine name="hostname"
            Environment="DISPLAY=m1:0"
            LowerLeft="-1.0 -1.0 -1.0"
            LowerRight="1.0 -1.0 -1.0"
            UpperRight="1.0  1.0 -1.0">
   </Machine>
 </Process>

</pvx> </source>

Example Config

  • The following example is for a six sided cave with origin at (0,0,0).

<source lang="xml"> <?xml version="1.0" ?> <pvx>

<Process Type="client" />
<Process Type="server">
 <Machine Name="Front"
          Environment="DISPLAY=:0"
          LowerLeft=" -1 -1 -1"
          LowerRight=" 1 -1 -1"
          UpperRight=" 1  1 -1" />
 <Machine Name="Right"
          Environment="DISPLAY=:0"
          LowerLeft="  1 -1 -1"
          LowerRight=" 1 -1  1"
          UpperRight=" 1  1  1" />
 <Machine Name="Left"
          Environment="DISPLAY=:0"
          LowerLeft=" -1 -1  1"
          LowerRight="-1 -1 -1"
          UpperRight="-1  1 -1"/>
 <Machine Name="Top"
          Environment="DISPLAY=:0"
          LowerLeft=" -1  1 -1"
          LowerRight=" 1  1 -1"
          UpperRight=" 1  1  1"/>
 <Machine Name="Bottom"
          Environment="DISPLAY=:0"
          LowerLeft=" -1 -1  1"
          LowerRight=" 1 -1  1"
          UpperRight=" 1 -1 -1"/>
 <Machine Name="Back"
          Environment="DISPLAY=:0"
          LowerLeft="  1 -1  1"
          LowerRight="-1 -1  1"
          UpperRight="-1  1  1"/>
 </Process>

</pvx> </source>

  • A sample PVX is provided in ParaView/Documentation/cave.pvx. This can be used to play with different display configurations.

Things to keep in mind

  • pvx file can be specified as the last command line argument for any of the server processes.
  • Typically the pvx file is specified for all the executables whose environment is being changed using the pvx file. In case of data-server/render-server configuration, if you are setting up the environment for the two processes groups, then the pvx file must be passed as a command line option to both the executables: pvdataserver and pvrenderserver.
  • When running in parallel the file is read on all nodes, hence must be present on all nodes.

Basic steps for a successful setup

  • On a terminal run the server (6 processes each driving one display in the cave. Change the number of process according to the number of displays).
 # PV_ICET_WINDOW_BORDERS=1 mpiexec -np 6 ./pvserver  /path/to/ConfigFile.pvx

Note: PV_ICET_WINDOW_BORDERS=1 disables the full screen and instead opens up a 400x400 window. Remove this environment variable to work in full screen mode

  • Open another terminal to run the client. (note: this client connects to the server which open up 6 windows according to the config given in cave.pvx). Change the stereo-type according to preference (see # ./paraview --help).
 # ./paraview --stereo --stereo-type=Anaglyph --server=localhost --vrpn --vrpn-address=Tracker0@localhost
  • Connect the client to the server.
  • Enable the VRPN Plugin on client.