[Paraview] [ParaView] Off axis Projection and Stereo

Aashish Chaudhary aashish.chaudhary at kitware.com
Fri Dec 2 11:08:14 EST 2011


Hi Stephan,

Here is the paper that can give you more information on stereo pair
calculation,

http://dl.acm.org/citation.cfm?id=134039

On Wed, Nov 30, 2011 at 3:37 AM, Stephan Rogge
<Stephan.Rogge at tu-cottbus.de> wrote:
> Hello Aashish,
>
> thanks for your valuable answers. I'm glad to know that these problems being
> addressed in vtk development. And yes, I have some more questions. :-)
>

> Please, can you explain, why EyeAngle is ignored during Off-Axis ? Is there
> an idea behind this approach? I know the formulation from the paper to
> construct the view matrix.

Because, In general it is assumed that your head direction is the
direction your eyes are looking at (and tracker can track head
rotation, position but not eye in general).

And I know, only the eye points (not their
> directions) are considered.
>
> BTW: Why is the viewing direction ignored, during Off-Axis-Calculation?

Where it is ignored? We calculate eye position based on the eye
transformation which can be set by application (generally via track
data).

>
> I'm really looking forward to read your answers :).

Hope it helps. Some of the things we had to keep for backward
compatibility and hence looking at the code could lead to some
confusion.

Thanks


>
> Thank you very much.
>
> Cheers,
> Stephan
>
> -----Ursprüngliche Nachricht-----
> Von: Aashish Chaudhary [mailto:aashish.chaudhary at kitware.com]
> Gesendet: Mittwoch, 30. November 2011 00:22
> An: Stephan Rogge
> Cc: paraview at paraview.org
> Betreff: Re: [Paraview] [ParaView] Off axis Projection and Stereo
>
> Hi Stephen.
>
> On Thu, Nov 24, 2011 at 5:34 AM, Stephan Rogge <Stephan.Rogge at tu-cottbus.de>
> wrote:
>> 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 ); .....
>
>
> Sorry it took me some time to reply. Basically in VTK there could be
> various ways to get the stereo. With in Crystal eyes stereo we have
> two options now,
>
> 1. Legacy stereo
> 2. Off axis stereo
>
> Second is the one added recently. In VTK camera now if you set
> SetUseOffAxisStereo(1) it uses 2) for stereo calculations and hence
> EyeAngle in that case is ignored.
>
> Look at the test code here:
> VTK_SRC_DIR/Rendering/Testing/Cxx/TestOffAxisStereo.cxx
>
> You can control eye separation if you choose 2).  I have added notes
> on the code about this but I will make it even more explicit.
>
>>
>> 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?
>
> We are going to work on this again very soon. We can take care of this
> there then. Well the idea is that we will have a more descriptive
> config file ( + UI in ParaView client) where you could specify eye
> separation as well.
>
>>
>> Please, let me know, what you are thinking about my ideas.
>
> Let me know if you have some more questions. One thing I must add is
> we ran into some clipping issues in ParaView and we are hoping to
> address that soon. Related to this we have paraview code out there
> which is not checked in master yet.
>
>>
>> Best regards
>> Stephan
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.paraview.org/mailman/listinfo/paraview
>
>
>
> --
> | Aashish Chaudhary
> | R&D Engineer
> | Kitware Inc.
> | www.kitware.com
>



-- 
| Aashish Chaudhary
| R&D Engineer
| Kitware Inc.
| www.kitware.com


More information about the ParaView mailing list