Thanks Marcin
 
That's sort of what I was thinking that it had to be rounding, our tiles are 
localized so YX are relatively small but the Z could be any value range on the 
earth and seabed, 
1million,-1million was over kill  for the segment length.
 
Be we will look to go the double route .
 
Thanks again for you reply, 
 
 

Gordon
Product Manager 3d
__________________________________________________________
Gordon Tomlinson
Email  : gtomlinson @ overwatch.textron.com
__________________________________________________________

 

________________________________

From: [email protected] 
[mailto:[email protected]] On Behalf Of Marcin Prus
Sent: Wednesday, April 15, 2009 4:01 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Erratic intersections with long line segments


Hi Gordon,
we had similar problem here. We were standing exactly at the edge of 2 adjacent 
triangles in large terrain database and osgUtil::LineSegmentIntersector failed 
because of internal floating precision. Using doubles instead of floats inside 
osgUtil::LineSegmentIntersector solved our problems.

I've made submission on 18.02.2009 with modified LineSegmentIntersector using 
cmake flag to set float or double precision internally but it never got into 
the trunk. You can look at it and create your own LineSegmentIntersectorDbl : 
public LineSegmentIntersector with double maths inside. Perhaps this will help 
- it did in our case

Best,
Marcin Prus

Tomlinson, Gordon pisze: 

        HI All
         
        I posting this for one of my folks who's is having some erratic results 
when using a long vertical line segment and the standard 
osgUtil::LineSegmentIntersector
         
        Basically when he sets a line segment up with  end X,Y, 1000000 and 
start X,Y, -1000000 , occasionally we fail to get a hit even though we are in 
the middle of the terrain skin, although moving the X,Y several meters in any 
direction and we get a hit.
         
        If we reduce the Z of the line segment to 500k and -500k this happens 
less errant fails, 
         
        if we reduce the Z's to 1k, -1k then we never get a fail, 
         
        further when we are failing with the intersections if the camera is 
further away from the intersection the less fails we get, the more we move 
closer to  the intersection point the more fails we get.
         
        Our Near and Far clip are fixed, 1 to 10-20k , the terrain skin is 
stanard OSG geometry, nothing fancy, some lods, but the level and which  lod is 
showing does not seem to be the issue
         
        I'm at at a loss to why this may be happening, we are not doing 
anything out the oridnary in this case that I can think that would cause this 
erratic behaviour ,
         
         any one seen anything like this  before ? 
         
         
        thanks
         
         

        Gordon
        Product Manager 3d
        __________________________________________________________
        Gordon Tomlinson
        Email  : gtomlinson @ overwatch.textron.com
        __________________________________________________________
        (C): (+1) 571-265-2612
        (W): (+1) 703-437-7651

        "Self defence is not a function of learning tricks 
        but is a function of how quickly and intensely one 
        can arouse one's instinct for survival" 
        - Master Tambo Tetsura

         
        
________________________________


        _______________________________________________
        osg-users mailing list
        [email protected]
        
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
          


-- 
Marcin Prus

Kierownik Projektu


________________________________

ETC-PZL Aerospace Industries Sp. z o.o.
Al. Krakowska 110/114,  P.O. Box 22
02-256 Warszawa
http://www.ai.com.pl

tel: (48-22) 846-54-17 wew. 135
fax (48-22) 846-54-18
e-mail: [email protected]

NIP 522-01-01-817    KRS 0000010025
Sąd Rejonowy dla m. st. Warszawy w Warszawie 
XIII Wydział Gospodarczy Krajowego Rejestru Sądowego. 
Wniesiony kapitał zakładowy Spółki wynosi 1 000 000 złotych.

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to