View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0009740 | VTK | (No Category) | public | 2009-10-20 08:58 | 2016-08-12 09:55 | ||||
Reporter | edice | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0009740: vtkInteractorStyleTerrain generates errors "Resetting view-up since view plane normal is parallel" | ||||||||
Description | When you look down the "north pole" with the Terrain interactor style, you get a lot of warning messages like so: Warning: In /opt/vtk_5_4_2/VTK/Rendering/vtkRenderer.cxx, line 1051 vtkOpenGLRenderer (0x9dff598): Resetting view-up since view plane normal is parallel In vtkRenderer.cxx, there is this test: vup = this->ActiveCamera->GetViewUp(); if ( fabs(vtkMath::Dot(vup,vn)) > 0.999 ) { vtkWarningMacro(<<"Resetting view-up since view plane normal is parallel"); this->ActiveCamera->SetViewUp(-vup[2], vup[0], vup[1]); } So, vtkRenderer.cxx starts to panic when the dot > 0.999, which I will show happens before the Terrain's limit of 179 degrees. There is code in vtkInteractorStyleTerrain that, quote: // Move the camera. // Make sure that we don't hit the north pole singularity. but, it does not do the job well enough. This is the code that avoids the singularity: double angle = vtkMath::DegreesFromRadians( acos(vtkMath::Dot( dop, vup) ) ); if ( ( angle + e ) > 179.0 || ( angle + e ) < 1.0 ) { e = 0.0; } I added some printouts after this code: cout << "dot " << fabs(vtkMath::Dot( dop, vup)) << " angle+e = " << angle << " + " << e << " = " << angle+e << endl; Note, the dot represents the past, angle+e represents the future. I saw these messages as i rotated towards the north pole: dot 0.997361 angle+e = 175.836 + 0.640569 = 176.477 dot 0.99811 angle+e = 176.477 + 0.640569 = 177.117 dot 0.998735 angle+e = 177.117 + 0.640569 = 177.758 Warning: In /opt/vtk_5_4_2/VTK/Rendering/vtkRenderer.cxx, line 1051 vtkOpenGLRenderer (0x9dff598): Resetting view-up since view plane normal is parallel dot 0.999235 angle+e = 177.758 + 0.640569 = 178.399 So, dot=0.999234 after 0.640569 was added to 177.117 to get angle=178.399 We have not reached 179 degrees and we have surpassed dot=0.999234. So the solution appears to be either change vtkRenderer.cxx's limit to 0.9999 or high (keep adding 9's), OR to change the Terrain's test to 2 and 178 degrees. | ||||||||
Tags | No tags attached. | ||||||||
Project | |||||||||
Type | |||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0018123) edice (reporter) 2009-10-20 09:11 |
If Terrain's test is changed, then 2 and 178 (as prev stated) isn't enough. 3 and 177 degrees appears to be enough. Someone with a calculator could probably work out the exact limits. |
(0037110) Kitware Robot (administrator) 2016-08-12 09:55 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2009-10-20 08:58 | edice | New Issue | |
2009-10-20 09:11 | edice | Note Added: 0018123 | |
2011-06-16 13:11 | Zack Galbreath | Category | => (No Category) |
2016-08-12 09:55 | Kitware Robot | Note Added: 0037110 | |
2016-08-12 09:55 | Kitware Robot | Status | expired => closed |
2016-08-12 09:55 | Kitware Robot | Resolution | open => moved |
2016-08-12 09:55 | Kitware Robot | Assigned To | => Kitware Robot |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |