[Paraview] [ParaView] Off axis Projection and Stereo

Stephan Rogge Stephan.Rogge at tu-cottbus.de
Thu Nov 24 05:34:07 EST 2011


Hello,

Since I can use ParaView's cave mode in my Virtual Environment (VE), I was
able to play a bit with its stereo capabilities and the wall configuration
(.pvx). 

Before I start with my discussion, I would like to give some details off my
configuration:

* Virtual Environment
     - two back projected walls (passive stereo)
     - each wall is 2.6 m width  x 1.6 m high
     - the walls creates an arrow with an angle of 112° 
     - a render PC with two NVIDIA QUADRO 5000 (one GPU per wall) is
connected to four projectors
* ParaView
    - To obtain a correct un-distorted image we use the edge points (world
coordinates) of the walls to configure the two views in the pvx-file
    - Since we use Windows 7, I was not able to define the GPU - View
assignment in the pvx-file 
       (it seems to be, that under Windows the flag
'Environment="DISPLAY=:0"' is being ignored, all views presented on the
first display). We had to
       modify "vtkPVSynchronizedRenderWindows", to align the views in
respect to the MPI process id. 
    - Further code modification has been done to control the stereo
parameters EyeSeparation and EyeAngle

#############################
## Multiple Display Support (Win7) ##
#############################

And here I like to start my discussion. At first let's talk about the
display configuration. I had to modify "vtkPVSynchronizedRenderWindows" to
use 
my two walls under Windows 7. I can imaging, that this is not the best
solution. May be some problems can appear here? Please, can some of the 
developer comment this code modification? This is the code snippet:

void vtkPVSynchronizedRenderWindows::UpdateWindowLayout()
{
      .....
      else if (in_cave_mode)
        {
        if (vtksys::SystemTools::GetEnv("PV_ICET_WINDOW_BORDERS"))
          {
          this->Internals->SharedRenderWindow->SetSize(400, 400);
          }
        else
          {
          this->Internals->SharedRenderWindow->SetFullScreen(1);

          // These two lines here has been added
          unsigned int id =
vtkMultiProcessController::GetGlobalController()->GetLocalProcessId();
          this->Internals->SharedRenderWindow->SetPosition(1920 * (id), 0);
         }
      }
      .....
}

###########################
## Stereo Control in Cave Mode ##
###########################

When I visualize a small object in my ParaView Cave setup, I realized that
the parallax between left and right image became un-natural big (it hurts). 
My opinion is, when we change the zoom we need to adjust the eye separation
(and / or the eye angle). This can be done manually or 
automatically to yield the optimal stereoscopic impression.
An parallel project from Aashish Chaudhary (on gitorious), address this
problem and starts to modify the VTK api, to have some control of stereo.  
Unfortunately, after reading some parts of this source code, it looks like
only EyeAngle can be manipulated. Furthermore  changes of that 
parameter were not considered during OffAxisProjection calculation. The
algorithm considers only the 3D points of left and right eye and not their
angles. Thus, changes of eyes angle does not have an effect on images
displayed in my cave. 
I've noticed a code part were the eye angles for left and right were only
applied, when UseOffAxisProjection is turned off. And this is not the case 
when I use ParaView with my view settings. Would it be wrong, if we modify
the IF-condition in vtkCamera::ComputeProjectionTransform() in 
order to consider always the angle:

if ( this->Stereo /*** &&!this->UseOffAxisProjection ***/)   // <-----
Disabling the check for Off-Axis-Calculation
    {
    // set up a shear for stereo views
    if ( this->LeftEye )
      {
      this->ProjectionTransform->Stereo( -this->EyeAngle/2,
                                          this->Distance );
.....

Another problem arises, when I want to adjust the eye separation. I had to
modify a couple of VTK source code files to provide the eye separation as an

proxy property and to distribute it along all mpi processes. Is it planned
to provide this parameter globally? 

Please, let me know, what you are thinking about my ideas.

Best regards
Stephan



More information about the ParaView mailing list