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