osgearth_measure - line disappears.

classic Classic list List threaded Threaded
13 messages Options
Nazarov David Nazarov David
Reply | Threaded
Open this post in threaded view
|

osgearth_measure - line disappears.

Hello friends
There is a problem in the example osgearth_measure.
When I draw a line for the purpose of measuring distance and I see close to 3500 meters distance,
at some angles while tilting line disappears.
I attach some screenshots. In the first screenshot that works well because the angle is 45 degrees .
In the second screenshot line was cut in half when the angle is 55. The third screenshot line disappeared at all - the angle is 70 degrees.
I attach too the earth file ...
Thank you for all that take the benefit of all :-)
David
ViewPort angle = 45 -> Line OK
ViewPort angle = 55 - Line "CUT"
ViewPort angle = 70 -> line disappeared

the earth file:


<map name="OpenStreetMap" type="geocentric" version="2">
 
    <image name="osm_mapnik" driver="xyz">
        <url>http://[abc].tile.openstreetmap.org/{z}/{x}/{y}.png</url>
        <profile>spherical-mercator</profile>
        <cache_policy usage="none"/>
    </image>
   
    <options>
        <lighting>false</lighting>
        <terrain>
            <min_tile_range_factor>10</min_tile_range_factor>
        </terrain>
    </options>
       
         <external>
        <viewpoints>                         
                <viewpoint name="No Bug" heading="0" height="0" lat="42.377" long="-71.005" pitch="-45" range="3500"/>
                <viewpoint name="Bug 1" heading="0" height="0" lat="42.377" long="-71.005" pitch="-55" range="3500"/>                       
                <viewpoint name="Bug 2" heading="0" height="0" lat="42.377" long="-71.005" pitch="-70" range="3500"/>                       
                <viewpoint name="." heading="0" height="0" lat="42.377" long="-71.005" pitch="-70" range="3500"/>                       
                <viewpoint name="." heading="0" height="0" lat="42.377" long="-71.005" pitch="-70" range="3500"/>               
                <viewpoint name="." heading="0" height="0" lat="42.377" long="-71.005" pitch="-70" range="3500"/>               
                <viewpoint name="." heading="0" height="0" lat="42.377" long="-71.005" pitch="-70" range="3500"/>                       
                <viewpoint name="." heading="0" height="0" lat="42.377" long="-71.005" pitch="-70" range="3500"/>                       
                <viewpoint name="." heading="0" height="0" lat="42.377" long="-71.005" pitch="-70" range="3500"/>                       
                <viewpoint name="." heading="0" height="0" lat="42.377" long="-71.005" pitch="-70" range="3500"/>                       

                </viewpoints>       
    </external>
   
</map>

-------------------------------

gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: osgearth_measure - line disappears.

It's a depth offset problem. I switched it to automatic depth offset - try it again and see if it works better. Thanks.
Glenn Waldron / Pelican Mapping
Nazarov David Nazarov David
Reply | Threaded
Open this post in threaded view
|

Re: osgearth_measure - line disappears.

Hi gwaldron and thanks for your response.
I added the following line of code and the problem is not resolved.

style.getOrCreate<RenderSymbol>()->depthOffset()->automatic() = true;

Did you intend any other action ? Or I did not do the right patch ?

Thank you
Great appreciation
David
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: osgearth_measure - line disappears.

Nazarov David Nazarov David
Reply | Threaded
Open this post in threaded view
|

Re: osgearth_measure - line disappears.

Hi gwaldron and thank you for the quick response.
I did exactly what you told me to do.
And unfortunately my problem is still not resolved.
I think it only happens to certain observation angles and very specific file as I attached the beginning.
Do as you draw the line as to me it does not happen?
Perhaps I have another problem differently?
Thank you for all your help and contribution
David
Nazarov David Nazarov David
Reply | Threaded
Open this post in threaded view
|

Re: osgearth_measure - line disappears.

Hello friends.
Is anyone able to reproduce the problem on his computer?
Here are instructions:
1. Copy the text file that I attached above to the new Earth file.
2. Run it with the Measurement Tool osgearth_measure.exe.
3. Click on 1 - portview number 1 - "No Bug". The camera approaches the bay near airport of Boston
4. Draw the line to measure the length of the bay as shown and see the red line.
5. Click on 3 -portview number 3 - the line disappears.
When returning portview number 1 shortcut - is shown again.
Thank you very much for your cooperation.
I's convinced that repairing the problem would be for the benefit of all
David
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: osgearth_measure - line disappears.

David,
I followed your instructions to the letter with osgEarth master branch; it seems to work fine.

There are certainly some times when the auto-depth-offset won't help, but that is usually only if you draw the measurement at a very high altitude and them zoom in very close. But in your example if should be OK.
Glenn Waldron / Pelican Mapping
Nazarov David Nazarov David
Reply | Threaded
Open this post in threaded view
|

Re: osgearth_measure - line disappears.

Thank you very much gwaldron for all your help and support.
I'm working on version  osgEarth 2.7, And on this version I added the line of auto-depth-offset
And still did not work for me.
Is that the problem?  My version is not up to date ?
If I will update to osgEarth master branch version - It will work as I want in the above example?
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: osgearth_measure - line disappears.

I hope so :) I have not tested it with 2.7. All I can tell you is that it seems to be working OK for me on the master. Worth a try though.
Glenn Waldron / Pelican Mapping
Nazarov David Nazarov David
Reply | Threaded
Open this post in threaded view
|

Re: osgearth_measure - line disappears.

Hello gwaldron.
Thank you for your advice.
I did what you said ... I ran the oageath_measure sample in  the master version. The situation has improved  in the attached scenario .
But unfortunately, It still happens when pitch="-90"
I attach images and earth file .
I would be happy if you can run the attached file and see if it happens to your pc too
Thanks for your help
David

------------
earth file
------------


<map name="OpenStreetMap" type="geocentric" version="2">
 
    <image name="osm_mapnik" driver="xyz">
        <url>http://[abc].tile.openstreetmap.org/{z}/{x}/{y}.png</url>
        <profile>spherical-mercator</profile>
        <cache_policy usage="none"/>
    </image>
   
    <options>
        <lighting>false</lighting>
        <terrain>
            <min_tile_range_factor>10</min_tile_range_factor>
        </terrain>
    </options>
       
         <external>
        <viewpoints>                         
                <viewpoint name="No Bug" heading="0" height="0" lat="42.377" long="-71.005" pitch="-90" range="6000"/>
                <viewpoint name="Bug 1" heading="0" height="0" lat="42.377" long="-71.005" pitch="-90" range="3000"/>                                               
                <viewpoint name="." heading="0" height="0" lat="42.377" long="-71.005" pitch="-70" range="3500"/>                       
                <viewpoint name="." heading="0" height="0" lat="42.377" long="-71.005" pitch="-70" range="3500"/>               
                <viewpoint name="." heading="0" height="0" lat="42.377" long="-71.005" pitch="-70" range="3500"/>               
                <viewpoint name="." heading="0" height="0" lat="42.377" long="-71.005" pitch="-70" range="3500"/>                       
                <viewpoint name="." heading="0" height="0" lat="42.377" long="-71.005" pitch="-70" range="3500"/>                       
                <viewpoint name="." heading="0" height="0" lat="42.377" long="-71.005" pitch="-70" range="3500"/>                       
                <viewpoint name="." heading="0" height="0" lat="42.377" long="-71.005" pitch="-70" range="3500"/>                       

                </viewpoints>       
    </external>
   
</map>

work good pic
---------------


no good pic
--------------
Nazarov David Nazarov David
Reply | Threaded
Open this post in threaded view
|

Re: osgearth_measure - line disappears.

Hello friends
Does anyone have an idea how to solve permanently and completely for all angles of the problem that I presented ? ? ?
Thank you
David
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: osgearth_measure - line disappears.

David, sorry but I just have not had the time to dedicate to tracking down this issue. Perhaps you can experiment with the tessellation of the line or the depth offset parameters.
Glenn Waldron / Pelican Mapping
Nazarov David Nazarov David
Reply | Threaded
Open this post in threaded view
|

Re: osgearth_measure - line disappears.

OK
Thank you very much for all your help so far.
If in the future you will have the time and possibility I would be happy if you check the sample.
David