VSG Logo   OpenInventor Forum

Go Back   Open Inventor Forum > Open Inventor Main Forum

Open Inventor Main Forum General discussions about Open Inventor from VSG

Reply
 
Thread Tools Display Modes
  #1  
Old 05-01-2012, 09:00 PM
jackcook jackcook is offline
Junior Member
 
Join Date: Apr 2010
Location: Houston
Posts: 6
Default Correct way of handling large XY coordinate values

We recently converted our application from IJL (local coordinates) to XYZ (world coordinates). We have a root transform that relocates the scene graph to be about (0,0,0), however since the coordinate values are so large, we are running into all sorts of problems with regard to display and picking. This is most likely due to the float limit in OpenGL. Our XYZ values can be in the tens of millions. Whenever we zoom in close on an object like a surface, and rotate the scene, the scene flickers and becomes very jumpy. Also, the ray pick action does not return anything. Also, poly-lines are not displayed correctly on the surfaces and/or they jump around.

What is the correct way to resolve this problem?

Thanks,

Jack
Reply With Quote
  #2  
Old 05-02-2012, 03:29 AM
mikeheck's Avatar
mikeheck mikeheck is offline
Moderator
 
Join Date: Sep 2008
Location: Carlsbad, CA, USA
Posts: 933
Default

Quote:
Originally Posted by jackcook View Post
We recently converted our application from IJL (local coordinates) to XYZ (world coordinates). We have a root transform that relocates the scene graph to be about (0,0,0), however since the coordinate values are so large, we are running into all sorts of problems with regard to display and picking. This is most likely due to the float limit in OpenGL. Our XYZ values can be in the tens of millions. Whenever we zoom in close on an object like a surface, and rotate the scene, the scene flickers and becomes very jumpy. Also, the ray pick action does not return anything. Also, poly-lines are not displayed correctly on the surfaces and/or they jump around.
It's probably partly due to the graphics hardware being single precision, but also partly due to Open Inventor using single precision arithmetic in SbViewVolume and SoRayPickaction.

One thing I forgot to mention in our previous conversation -- it's worth trying a simple experiment to see if the viewing jitters and picking work any better. Just set the environment variable OIV_DOUBLE_PRECISION to true (1) using SoPreferences or any equivalent method. This enables some experimental code that keeps viewing/picking parameters in single precision, but does the arithmetic in double precision for some (but not all) cases. There may be a small performance penalty for picking.

Question: You said your XYZ values can be in the 10's of millions (geocentric meters?). That's before the root transform, right? What is the range of "local coordinates" relative to the root transform position?
Reply With Quote
  #3  
Old 05-02-2012, 02:10 PM
jackcook jackcook is offline
Junior Member
 
Join Date: Apr 2010
Location: Houston
Posts: 6
Default

The 10's of millions is the larger case. Some of the XYZ coordinates for our smaller projects are in the range of:

42,000 - 90,500
7,791,695 - 7,844,600
1,000 - 4,000

and

201,887 - 287,259
172,768 - 316,146
500 - 3,000

The root transform simply shifts these coordinates such they straddle (0,0). Therefore, the numbers are not too large, it's only when we zoom in real close and try to rotate/pick that we experience problems.

The XY's are geological coordinates (feet or meters) relative to a coordinate system.

With regard to the OIV_DOUBLE_PRECISION, do you know if this is available in 8.5.x?

Thanks,

Jack
Reply With Quote
  #4  
Old 05-03-2012, 12:53 AM
mikeheck's Avatar
mikeheck mikeheck is offline
Moderator
 
Join Date: Sep 2008
Location: Carlsbad, CA, USA
Posts: 933
Default

Quote:
Originally Posted by jackcook View Post
With regard to the OIV_DOUBLE_PRECISION, do you know if this is available in 8.5.x?
Yes, it is.
Reply With Quote
  #5  
Old 05-04-2012, 03:15 PM
jackcook jackcook is offline
Junior Member
 
Join Date: Apr 2010
Location: Houston
Posts: 6
Default

I have created an iv file which duplicates the problem in the scene viewer. Unfortunately the size exceeds the upload limits of this forum. I can make it available if anyone is interested.

- Jack
Reply With Quote
  #6  
Old 05-04-2012, 05:02 PM
mikeheck's Avatar
mikeheck mikeheck is offline
Moderator
 
Join Date: Sep 2008
Location: Carlsbad, CA, USA
Posts: 933
Default

Quote:
Originally Posted by jackcook View Post
I have created an iv file which duplicates the problem in the scene viewer. Unfortunately the size exceeds the upload limits of this forum. I can make it available if anyone is interested.
Sure, it would be great to have an example to experiment with.
Please upload it to the "incoming" directory on our ftp site (ftp.vsg3d.com) and email me the file name. Note you won't be able to list the contents of this directory.
Reply With Quote
  #7  
Old 05-04-2012, 05:30 PM
jackcook jackcook is offline
Junior Member
 
Join Date: Apr 2010
Location: Houston
Posts: 6
Default

Quote:
Originally Posted by mikeheck View Post
Sure, it would be great to have an example to experiment with.
Please upload it to the "incoming" directory on our ftp site (ftp.vsg3d.com) and email me the file name. Note you won't be able to list the contents of this directory.
Done. ShellExample.iv

Thanks.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:07 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Copyright FEI, 2008.