[Paraview] [Non-DoD Source] Eye separation has been wrong since Immersive ParaView 5.2 - here's how to fix it

Aashish Chaudhary aashish.chaudhary at kitware.com
Thu Jul 20 13:43:48 EDT 2017


Generally you want to scale objects appropriately - almost all of the
library I used / wrote do that (except paraview). If the object is too
small you will have very large eye separation and it is too big, very
small.

You want to scale object according to your screen size so that it can fit
there if placed at focal distance from the camera.

We talked about supporting auto-scaling in paraview but ran out of funding.

Let us know how should be proceed and I happy to help.

On Tue, Jul 18, 2017 at 2:59 PM Hennessey, Joseph G CTR USARMY RDECOM ARL
(US) <joseph.g.hennessey2.ctr at mail.mil> wrote:

> Mark,
>
> I have discussed the changes I made with my colleagues.
> We do not want to harm your work with the Cave,
> so we would be okay with backing out our changes.
>
> We can scale our data to be of size greater than 1
> by using the transform data inside of ParaView
> and our data will still work. My changes were only
> necessary when working with data of size less than or
> a lot less than zero.
>
> Please let me know what I can do to assist, my changes
> are found in the ParaView 5.x versions, ParaView 4.4.0
> still has your code in it without my changes for visualizing
> small data in stereo with devices such as the zSpace.
>
> Thanks,
>
> Joe
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Joseph G. Hennessey Ph.D., SAIC
> Team SAIC
> Army Research Lab
> DOD Supercomputing Resource Center
> Email:  joseph.g.hennessey2.ctr at mail.mil
>
>
> -----Original Message-----
> From: Hennessey, Joseph G CTR USARMY RDECOM ARL (US)
> Sent: Monday, June 26, 2017 11:42 AM
> To: 'Stock, Mark' <Mark.Stock at nrel.gov>; Gena Bug via ParaView
> <paraview at paraview.org>
> Subject: RE: [Non-DoD Source] [Paraview] Eye separation has been wrong
> since
> Immersive ParaView 5.2 - here's how to fix it
>
> Hello,
>
> I am the one who requested the changes,
> they were made to correct the stereo separation with working with zSpace
> hardware
> for data that was small in size (floating point values of coordinates, >>
> 1,
> for example data that ranged from 0.0000000 to  0.0000001
> I checked its use with data across 13 orders of magnitude from data of size
> 1,000,000 to data of scale 1/1,000,000.
> I admit my fix is an approximation, but I am attempting to get a reasonable
> agreement of size with  the non stereo operation
>
>   double eyeSeparationCorrectionFactor = 10.0;
>   double shiftDistance = this->EyeSeparation / (2.0 *
> eyeSeparationCorrectionFactor);
>   if(this->Distance < 1.0)
>   {
>     shiftDistance *= this->Distance;
>   }
>
>   // Front (aka near)
>   double F = E[2] - (this->Distance + this->Thickness);//E[2] -
> 10000.0;//this->ClippingRange[1];
>   // Back (aka far)
>   double nearDistanceCorrectionFactor  = 1000.0;
>   double B = E[2] - (this->Distance / nearDistanceCorrectionFactor);//E[2]
> - .1;//this->ClippingRange[0];
>
> Without these changes with small data the stereo separation is incorrect,
> (too large)
> also small data will not even show up in the render window as the clipping
> planes will be wrong.
>
> This change
>
> "  if (cameraParallel == 0 && dot(normalVCVSOutput,vertexVC.xyz) > 0.0) {
> normalVCVSOutput = -1.0*normalVCVSOutput; }"
>
> I did not make and do not know its purpose.
>
> I think we  need a solution that works for both caves and planar display
> hardware,
> and I think the underlying issue is that there is different render code
> being used,
> that is a subset of the full normal rendering solution, which is creating
> these issues.
> I think the correct solution is to remove  the separate render code and use
> the primary
> code for both client and server rendering of mono and stereo. I do not have
> a cave to
> test with, but I do not see why we can not find a solution that works for
> everyone.
>
> Thanks,
>
> Joe
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Joseph G. Hennessey Ph.D., SAIC
> Team SAIC
> Army Research Lab
> DOD Supercomputing Resource Center
> Aberdeen Proving Ground, MD 21005
>
> -----Original Message-----
> From: ParaView [mailto:paraview-bounces at paraview.org] On Behalf Of Stock,
> Mark
> Sent: Friday, June 23, 2017 5:23 PM
> To: Gena Bug via ParaView <paraview at paraview.org>
> Subject: [Non-DoD Source] [Paraview] Eye separation has been wrong since
> Immersive ParaView 5.2 - here's how to fix it
>
> All active links contained in this email were disabled.  Please verify the
> identity of the sender, and confirm the authenticity of all links contained
> within the message prior to copying and pasting the address to a Web
> browser.
>
>
>
>
> ----
>
> Hello,
>
> If you're an Immersive ParaView user, you may have noticed that 5.x
> versions
> don't work as well in your CAVE. Specifically, I've noticed the following
> differences when compared with ParaView 4.4.0:
>
> 1) I can place an object in space properly but it seems to move 10x as fast
> when I move my head.
> 2) If I move the object just a little farther away from its initial
> position, it clips out (vanishes).
> 3) When I am viewing a triangle mesh, some triangles seem to flip normals
> (and get dark) when I move the object around.
>
> The first two problems are caused by a change in the VTK source code from
> March 2016 which arbitrarily multiples the eye separation distance by 10,
> and also tightens the near and far clipping planes. The third can be
> corrected by adding a single comment (which will help CAVE and Immersive
> users, but probably nobody else). Both fixes will require you to build
> ParaView from source - which you're probably doing anyway. I can't comment
> on how these changes will affect HMD VR users.
>
>
> The first and second problems are caused by a single commit to the VTK
> repository that began to appear in ParaView with version 5.2.0. The problem
> code is in VTK/Rendering/Core/vtkCamera.cxx starting at line 452 in
> versions
> 5.3 and 5.4. This problem can be fixed by replacing
>
>   double eyeSeparationCorrectionFactor = 10.0;
>   double shiftDistance = this->EyeSeparation / (2.0 *
> eyeSeparationCorrectionFactor);
>   if(this->Distance < 1.0)
>   {
>     shiftDistance *= this->Distance;
>   }
>
>
>
> with simply
>
>   double shiftDistance = this->EyeSeparation;
>
>
> The second problem (clipping planes) is just a few lines down. I fixed it
> by
> replacing
>
>   // Front (aka near)
>   double F = E[2] - (this->Distance + this->Thickness);//E[2] -
> 10000.0;//this->ClippingRange[1];
>   // Back (aka far)
>   double nearDistanceCorrectionFactor  = 1000.0;
>   double B = E[2] - (this->Distance / nearDistanceCorrectionFactor);//E[2]
> - .1;//this->ClippingRange[0];
>
>
>
> with
>
>   // Front (aka near)
>   double F = E[2] - 10000.0;//this->ClippingRange[1];
>   // Back (aka far)
>   double B = E[2] - .1;//this->ClippingRange[0];
>
>
>
> The third problem can be fixed by commenting out this line in
> VTK/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx (around line 1198 in 5.1,
> 1416 in 5.2 to 5.4):
>
> "  if (cameraParallel == 0 && dot(normalVCVSOutput,vertexVC.xyz) > 0.0) {
> normalVCVSOutput = -1.0*normalVCVSOutput; }"
>
>
> I hope these fixes help some of you out there get your CAVE updated to the
> latest ParaView.
>
> Mark
>
> Mark.Stock at nrel.gov
>
> _______________________________________________
> Powered by Caution-www.kitware.com
>
> Visit other Kitware open-source projects at
> Caution-http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> Caution-http://paraview.org/Wiki/ParaView
>
> Search the list archives at: Caution-
> http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> Caution-http://public.kitware.com/mailman/listinfo/paraview
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170720/adccaa52/attachment.html>


More information about the ParaView mailing list