gwaldron / osgearth

3D Maps for OpenSceneGraph / C++14
https://www.pelicanmapping.com/home-1/opensource
Other
1.48k stars 774 forks source link

osgearth_viewer get the white globe when load a earth file #2456

Closed shiner-chen closed 6 months ago

shiner-chen commented 6 months ago

Describe the bug osgearth_viewer get the white globe when load a earth file

To Reproduce Steps to reproduce the behavior: According to the osgearth document install build the osgearth in windows 11, then run the osgearth_viewer to load simple.earth, it can work, but load other earth file, such as boston.earth, cesium_ion.earth, all failed.

  1. the Versions of software
    PS F:\osgearth\tests> osgearth_version.exe --caps
    [osgearth info] Hello, world.
    Error reading file C:/WINDOWS/fonts\verdana.ttf: file not handled
    [osgearth info] [Capabilities] osgEarth Version:  3.5.0 build 150
    [osgearth info] [Capabilities] GDAL Version:      3.8.4
    [osgearth info] [Capabilities] OSG Version:       3.6.5
    [osgearth info] [Capabilities] OSG GL3 Features:  yes
    [osgearth info] [Capabilities] OSG FFP Available: no
    [osgearth info] [Capabilities] CPU Cores:         20
    [osgearth info] [Capabilities] GL_VENDOR:         Intel
    [osgearth info] [Capabilities] GL_RENDERER:       Intel(R) Iris(R) Xe Graphics
    [osgearth info] [Capabilities] GL_VERSION:        3.3.0 - Build 31.0.101.3430
    [osgearth info] [Capabilities] GL CORE Profile:   yes
  2. load simple.earth, it can work, log as follows:
    PS F:\osgearth\tests> osgearth_viewer.exe .\simple.earth
    [osgearth info] Hello, world.
    Error reading file C:/WINDOWS/fonts\verdana.ttf: file not handled
    [osgearth info] [Capabilities] osgEarth Version:  3.5.0 build 150
    [osgearth info] [Capabilities] GDAL Version:      3.8.4
    [osgearth info] [Capabilities] OSG Version:       3.6.5
    [osgearth info] [Capabilities] OSG GL3 Features:  yes
    [osgearth info] [Capabilities] OSG FFP Available: no
    [osgearth info] [Capabilities] CPU Cores:         20
    [osgearth info] [Capabilities] GL_VENDOR:         NVIDIA Corporation
    [osgearth info] [Capabilities] GL_RENDERER:       NVIDIA GeForce RTX 2050/PCIe/SSE2
    [osgearth info] [Capabilities] GL_VERSION:        3.3.0 NVIDIA 528.02
    [osgearth info] [Capabilities] GL CORE Profile:   yes
    [osgearth info] [Map] Map profile is: [srs=WGS84, min=-180,-90 max=180,90 ar=2:1 vdatum=geodetic]
    [osgearth info] [Map] [no cache]
    [osgearth info] [GDAL] Resolution= 0.175781x0.175781 max=0.175781
    [osgearth info] [GDAL] F:/osgearth/data/world.tif max Data Level: 3
    [osgearth info] [GDALImageLayer] World GeoTIFF [srs=WGS 84, min=-180,-90 max=180,90 ar=2:1 vdatum=geodetic] [no cache]
    [osgearth info] [engine_rex] Activated!
    [osgearth info] [TerrainResources] Texture unit 1 reserved for Terrain Color
    [osgearth info] [TerrainResources] Texture unit 2 reserved for Terrain Elevation
    [osgearth info] [TerrainResources] Texture unit 3 reserved for Terrain Normals
    [osgearth info] [TerrainResources] Texture unit 4 reserved for Terrain Parent Color
    [osgearth info] [TerrainResources] Texture unit 5 reserved for Terrain Land Cover
    [osgearth info] [RexTerrainEngineNode] Creating 2 root keys.
    [osgearth info] [MapNodeHelper] Activating logarithmic depth buffer (vertex-only) on main camera
  3. load boston.earth, show white globe
    PS F:\osgearth\tests> osgearth_viewer.exe .\boston.earth
    [osgearth info] Hello, world.
    Error reading file C:/WINDOWS/fonts\verdana.ttf: file not handled
    [osgearth info] [Capabilities] osgEarth Version:  3.5.0 build 150
    [osgearth info] [Capabilities] GDAL Version:      3.8.4
    [osgearth info] [Capabilities] OSG Version:       3.6.5
    [osgearth info] [Capabilities] OSG GL3 Features:  yes
    [osgearth info] [Capabilities] OSG FFP Available: no
    [osgearth info] [Capabilities] CPU Cores:         20
    [osgearth info] [Capabilities] GL_VENDOR:         NVIDIA Corporation
    [osgearth info] [Capabilities] GL_RENDERER:       NVIDIA GeForce RTX 2050/PCIe/SSE2
    [osgearth info] [Capabilities] GL_VERSION:        3.3.0 NVIDIA 528.02
    [osgearth info] [Capabilities] GL CORE Profile:   yes
    [osgearth info] [EarthSerializer2] Loaded extension lib osgPlugins-3.6.5/osgdb_osgearth_viewpoints.dll
    [osgearth info] [Map] Map profile is: [srs=WGS84, min=-180,-90 max=180,90 ar=2:1 vdatum=geodetic]
    [osgearth info] [Map] [no cache]
    [osgearth info] [StyleSheet] Loading script from F:/osgearth/data/scripts/createLineOffsetPoints.js
    [osgearth info] [StyleSheet] Loading script from F:/osgearth/data/scripts/createLineOffsetPoints.js
    [osgearth info] [StyleSheet] Loading script from F:/osgearth/data/scripts/createLineOffsetPoints.js
    [osgearth info] [StyleSheet] Loading script from F:/osgearth/data/scripts/createLineOffsetPoints.js
    [osgearth info] [StyleSheet] Loading script from F:/osgearth/data/scripts/createLineOffsetPoints.js
    [osgearth info] [ViewpointsExtension] Read 5 viewpoints
    [osgearth info] [TMSImageLayer] Imagery [srs=WGS84, min=-180,-90 max=180,90 ar=2:1 vdatum=geodetic] [no cache]
    [osgearth info] [TMSImageLayer] ReadyMap 90m Elevation [srs=WGS84, min=-180,-90 max=180,90 ar=2:1 vdatum=geodetic] [no cache]
    [osgearth info] [TMSElevationLayer] ReadyMap 90m Elevation Override vdatum = egm96 (was geodetic)
    [osgearth info] [TMSElevationLayer] ReadyMap 90m Elevation [srs=WGS84, min=-180,-90 max=180,90 ar=2:1 vdatum=EGM96] [no cache]
    [osgearth info] [OGRFeatureSource] buildings : opened OK
    [osgearth info] [StyleSheet] Loading script from F:/osgearth/data/scripts/createLineOffsetPoints.js
    [osgearth info] [OGRFeatureSource] parks : opened OK
    [osgearth info] [OGRFeatureSource] streets-data : opened OK
    [osgearth info] [TMSElevationLayer] ReadyMap 90m Elevation L2 cache size = 4
    [osgearth info] [FeatureModelGraph] Buildings: Tile size = 500, calc TSF = 40
    [osgearth info] [FeatureModelGraph] Streets: Tile size = 1000, calc TSF = 5
    [osgearth info] [StyleSheet] Loading script from F:/osgearth/data/scripts/createLineOffsetPoints.js
    [osgearth info] [FeatureModelGraph] streetlamps: Tile size = 1000, calc TSF = 1
    [osgearth info] [FeatureModelGraph] Parks: Tile size = 1000, calc TSF = 2
    [osgearth info] [engine_rex] Activated!
    [osgearth info] [TerrainResources] Texture unit 1 reserved for Terrain Color
    [osgearth info] [TerrainResources] Texture unit 2 reserved for Terrain Elevation
    [osgearth info] [TerrainResources] Texture unit 3 reserved for Terrain Normals
    [osgearth info] [TerrainResources] Texture unit 4 reserved for Terrain Parent Color
    [osgearth info] [TerrainResources] Texture unit 5 reserved for Terrain Land Cover
    [osgearth info] [RexTerrainEngineNode] Creating 2 root keys.
    [osgearth info] [MapNodeHelper] Activating logarithmic depth buffer (vertex-only) on main camera
  4. load cesium_ion.earth, also get white globe
    PS F:\osgearth\tests> osgearth_viewer.exe .\cesium_ion.earth
    [osgearth info] Hello, world.
    Error reading file C:/WINDOWS/fonts\verdana.ttf: file not handled
    [osgearth info] [Capabilities] osgEarth Version:  3.5.0 build 150
    [osgearth info] [Capabilities] GDAL Version:      3.8.4
    [osgearth info] [Capabilities] OSG Version:       3.6.5
    [osgearth info] [Capabilities] OSG GL3 Features:  yes
    [osgearth info] [Capabilities] OSG FFP Available: no
    [osgearth info] [Capabilities] CPU Cores:         20
    [osgearth info] [Capabilities] GL_VENDOR:         NVIDIA Corporation
    [osgearth info] [Capabilities] GL_RENDERER:       NVIDIA GeForce RTX 2050/PCIe/SSE2
    [osgearth info] [Capabilities] GL_VERSION:        3.3.0 NVIDIA 528.02
    [osgearth info] [Capabilities] GL CORE Profile:   yes
    [osgearth info] [EarthSerializer2] Loaded extension lib osgPlugins-3.6.5/osgdb_osgearth_viewpoints.dll
    [osgearth info] [Map] Map profile is: [srs=WGS84, min=-180,-90 max=180,90 ar=2:1 vdatum=geodetic]
    [osgearth info] [Map] [no cache]
    [osgearth info] [ViewpointsExtension] Read 16 viewpoints
    [osgearth info] [BingImageLayer] bing satellite [srs=Spherical Mercator, min=-20037508.34278925,-20037508.34278925 max=20037508.34278925,20037508.34278925 ar=2:2 vdatum=geodetic] [no cache]
    [osgearth info] [CesiumIonImageLayer] bing satellite [srs=Spherical Mercator, min=-20037508.34278925,-20037508.34278925 max=20037508.34278925,20037508.34278925 ar=2:2 vdatum=geodetic] [no cache]
    [osgearth info] [CesiumIonImageLayer] bing satellite Map/Layer profiles differ; requesting L2 cache
    [osgearth info] [CesiumIonImageLayer] bing satellite L2 cache size = 16
    [osgearth info] [engine_rex] Activated!
    [osgearth info] [TerrainResources] Texture unit 1 reserved for Terrain Color
    [osgearth info] [TerrainResources] Texture unit 2 reserved for Terrain Elevation
    [osgearth info] [TerrainResources] Texture unit 3 reserved for Terrain Normals
    [osgearth info] [TerrainResources] Texture unit 4 reserved for Terrain Parent Color
    [osgearth info] [TerrainResources] Texture unit 5 reserved for Terrain Land Cover
    [osgearth info] [RexTerrainEngineNode] Creating 2 root keys.
    [osgearth info] [MapNodeHelper] Activating logarithmic depth buffer (vertex-only) on main camera

    How to fix it? please give me some sugesstion, thanks a lot!

Expected behavior osgearth should work normally

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

shiner-chen commented 6 months ago

After set OSGEARTH_HTTP_DEBUG=1, I found "Cannot find an OSG plugin to read response data (ext=tif; mime-type=image/tiff)", How to deal with it?

PS F:\osgearth\tests> $env:OSGEARTH_HTTP_DEBUG
1
PS F:\osgearth\tests> osgearth_viewer.exe .\boston.earth
[osgearth info] Hello, world.
Error reading file C:/WINDOWS/fonts\verdana.ttf: file not handled
[osgearth info] [Capabilities] osgEarth Version:  3.5.0 build 150
[osgearth info] [Capabilities] GDAL Version:      3.8.4
[osgearth info] [Capabilities] OSG Version:       3.6.5
[osgearth info] [Capabilities] OSG GL3 Features:  yes
[osgearth info] [Capabilities] OSG FFP Available: no
[osgearth info] [Capabilities] CPU Cores:         20
[osgearth info] [Capabilities] GL_VENDOR:         NVIDIA Corporation
[osgearth info] [Capabilities] GL_RENDERER:       NVIDIA GeForce RTX 2050/PCIe/SSE2
[osgearth info] [Capabilities] GL_VERSION:        3.3.0 NVIDIA 528.02
[osgearth info] [Capabilities] GL CORE Profile:   yes
[osgearth info] [EarthSerializer2] Loaded extension lib osgPlugins-3.6.5/osgdb_osgearth_viewpoints.dll
[osgearth info] [Map] Map profile is: [srs=WGS84, min=-180,-90 max=180,90 ar=2:1 vdatum=geodetic]
[osgearth info] [Map] [no cache]
[osgearth info] [StyleSheet] Loading script from F:/osgearth/data/scripts/createLineOffsetPoints.js
[osgearth info] [StyleSheet] Loading script from F:/osgearth/data/scripts/createLineOffsetPoints.js
[osgearth info] [StyleSheet] Loading script from F:/osgearth/data/scripts/createLineOffsetPoints.js
[osgearth info] [StyleSheet] Loading script from F:/osgearth/data/scripts/createLineOffsetPoints.js
[osgearth info] [StyleSheet] Loading script from F:/osgearth/data/scripts/createLineOffsetPoints.js
[osgearth info] [ViewpointsExtension] Read 5 viewpoints
[osgearth info] [HTTPClient] HTTP debugging enabled
[osgearth info] [HTTPClient] GET(200) text/xml: http://readymap.org/readymap/tiles/1.0.0/22/ (Thu, 01 Jan 1970 00:00:00 GMT) t=1.86s
[osgearth info] [TMSImageLayer] Imagery [srs=WGS84, min=-180,-90 max=180,90 ar=2:1 vdatum=geodetic] [no cache]
[osgearth info] [HTTPClient] GET(200) text/xml: http://readymap.org/readymap/tiles/1.0.0/116/ (Thu, 01 Jan 1970 00:00:00 GMT) t=0.7512s
[osgearth info] [TMSImageLayer] ReadyMap 90m Elevation [srs=WGS84, min=-180,-90 max=180,90 ar=2:1 vdatum=geodetic] [no cache]
[osgearth info] [TMSElevationLayer] ReadyMap 90m Elevation Override vdatum = egm96 (was geodetic)
[osgearth info] [TMSElevationLayer] ReadyMap 90m Elevation [srs=WGS84, min=-180,-90 max=180,90 ar=2:1 vdatum=EGM96] [no cache]
[osgearth info] [OGRFeatureSource] buildings : opened OK
[osgearth info] [StyleSheet] Loading script from F:/osgearth/data/scripts/createLineOffsetPoints.js
[osgearth info] [OGRFeatureSource] parks : opened OK
[osgearth info] [OGRFeatureSource] streets-data : opened OK
[osgearth info] [TMSElevationLayer] ReadyMap 90m Elevation L2 cache size = 4
[osgearth info] [FeatureModelGraph] Buildings: Tile size = 500, calc TSF = 40
[osgearth info] [FeatureModelGraph] Streets: Tile size = 1000, calc TSF = 5
[osgearth info] [StyleSheet] Loading script from F:/osgearth/data/scripts/createLineOffsetPoints.js
[osgearth info] [FeatureModelGraph] streetlamps: Tile size = 1000, calc TSF = 1
[osgearth info] [FeatureModelGraph] Parks: Tile size = 1000, calc TSF = 2
[osgearth info] [engine_rex] Activated!
[osgearth info] [TerrainResources] Texture unit 1 reserved for Terrain Color
[osgearth info] [TerrainResources] Texture unit 2 reserved for Terrain Elevation
[osgearth info] [TerrainResources] Texture unit 3 reserved for Terrain Normals
[osgearth info] [TerrainResources] Texture unit 4 reserved for Terrain Parent Color
[osgearth info] [TerrainResources] Texture unit 5 reserved for Terrain Land Cover
[osgearth info] [RexTerrainEngineNode] Creating 2 root keys.
[osgearth info] [HTTPClient] HTTP debugging enabled
[osgearth info] [HTTPClient] HTTP debugging enabled
[osgearth info] [HTTPClient] GET(200) image/jpeg: http://readymap.org/readymap/tiles/1.0.0/22/0/0/0.jpeg (Fri, 07 May 2010 17:37:07 GMT) t=1.31s
[osgearth warning] [HTTPClient] Cannot find an OSG plugin to read response data (ext=jpeg; mime-type=image/jpeg)
[osgearth info] [HTTPClient] GET(200) image/jpeg: http://readymap.org/readymap/tiles/1.0.0/22/0/1/0.jpeg (Mon, 18 Oct 2010 15:00:55 GMT) t=1.398s
[osgearth warning] [HTTPClient] Cannot find an OSG plugin to read response data (ext=jpeg; mime-type=image/jpeg)
[osgearth info] [HTTPClient] GET(200) image/tiff: http://readymap.org/readymap/tiles/1.0.0/116/0/0/0.tif (Fri, 03 Jun 2022 00:00:00 GMT) t=0.8717s
[osgearth warning] [HTTPClient] Cannot find an OSG plugin to read response data (ext=tif; mime-type=image/tiff)
[osgearth info] [HTTPClient] GET(200) image/tiff: http://readymap.org/readymap/tiles/1.0.0/116/0/1/0.tif (Fri, 03 Jun 2022 00:00:00 GMT) t=0.9317s
[osgearth warning] [HTTPClient] Cannot find an OSG plugin to read response data (ext=tif; mime-type=image/tiff)
[osgearth info] [HTTPClient] GET(200) image/tiff: http://readymap.org/readymap/tiles/1.0.0/116/0/0/0.tif (Fri, 03 Jun 2022 00:00:00 GMT) t=0.657s
[osgearth warning] [HTTPClient] Cannot find an OSG plugin to read response data (ext=tif; mime-type=image/tiff)
[osgearth info] [HTTPClient] GET(200) image/tiff: http://readymap.org/readymap/tiles/1.0.0/116/0/1/0.tif (Fri, 03 Jun 2022 00:00:00 GMT) t=0.7025s
[osgearth warning] [HTTPClient] Cannot find an OSG plugin to read response data (ext=tif; mime-type=image/tiff)
[osgearth info] [MapNodeHelper] Activating logarithmic depth buffer (vertex-only) on main camera
[osgearth info] [HTTPClient] HTTP debugging enabled
[osgearth info] [HTTPClient] HTTP debugging enabled
[osgearth info] [HTTPClient] HTTP debugging enabled
[osgearth info] [HTTPClient] HTTP debugging enabled
[osgearth info] [HTTPClient] HTTP debugging enabled
[osgearth info] [HTTPClient] HTTP debugging enabled
[osgearth info] [HTTPClient] GET(200) image/jpeg: http://readymap.org/readymap/tiles/1.0.0/22/1/1/1.jpeg (Fri, 07 May 2010 17:36:28 GMT) t=0.4414s
[osgearth info] [HTTPClient] GET(200) image/jpeg: http://readymap.org/readymap/tiles/1.0.0/22/1/0/1.jpeg (Fri, 07 May 2010 17:36:31 GMT) t=0.4676s
[osgearth warning] [HTTPClient] Cannot find an OSG plugin to read response data (ext=jpeg; mime-type=image/jpeg)
[osgearth warning] [HTTPClient] Cannot find an OSG plugin to read response data (ext=jpeg; mime-type=image/jpeg)
[osgearth info] [HTTPClient] GET(200) image/jpeg: http://readymap.org/readymap/tiles/1.0.0/22/1/2/0.jpeg (Fri, 07 May 2010 17:36:31 GMT) t=1.144s
[osgearth info] [HTTPClient] GET(200) image/jpeg: http://readymap.org/readymap/tiles/1.0.0/22/1/3/0.jpeg (Fri, 07 May 2010 17:36:32 GMT) t=1.144s
[osgearth info] [HTTPClient] GET(200) image/jpeg: http://readymap.org/readymap/tiles/1.0.0/22/1/0/0.jpeg (Fri, 07 May 2010 17:36:32 GMT) t=1.148s
[osgearth info] [HTTPClient] GET(200) image/jpeg: http://readymap.org/readymap/tiles/1.0.0/22/1/1/0.jpeg (Fri, 07 May 2010 17:36:32 GMT) t=1.152s
[osgearth warning] [HTTPClient] Cannot find an OSG plugin to read response data (ext=jpeg; mime-type=image/jpeg)
[osgearth warning] [HTTPClient] Cannot find an OSG plugin to read response data (ext=jpeg; mime-type=image/jpeg)
[osgearth warning] [HTTPClient] Cannot find an OSG plugin to read response data (ext=jpeg; mime-type=image/jpeg)
[osgearth warning] [HTTPClient] Cannot find an OSG plugin to read response data (ext=jpeg; mime-type=image/jpeg)
[osgearth info] [HTTPClient] GET(200) image/jpeg: http://readymap.org/readymap/tiles/1.0.0/22/1/2/1.jpeg (Mon, 18 Oct 2010 15:00:55 GMT) t=1.347s
[osgearth info] [HTTPClient] GET(200) image/tiff: http://readymap.org/readymap/tiles/1.0.0/116/1/1/1.tif (Fri, 03 Jun 2022 00:00:00 GMT) t=0.8689s
[osgearth info] [HTTPClient] GET(200) image/jpeg: http://readymap.org/readymap/tiles/1.0.0/22/1/3/1.jpeg (Fri, 07 May 2010 17:36:28 GMT) t=1.378s
[osgearth warning] [HTTPClient] Cannot find an OSG plugin to read response data (ext=tif; mime-type=image/tiff)
[osgearth warning] [HTTPClient] Cannot find an OSG plugin to read response data (ext=jpeg; mime-type=image/jpeg)
[osgearth info] [HTTPClient] GET(200) image/tiff: http://readymap.org/readymap/tiles/1.0.0/116/1/0/1.tif (Fri, 03 Jun 2022 00:00:00 GMT) t=0.9324s
shiner-chen commented 6 months ago

I found the root cause。 After I add the path:[build directory]\vcpkg_installed\x64-windows\plugins\osgPlugins-3.6.5 into the path environment, the issuse has gone!

keince commented 5 days ago

I had the same problem so I appreciate your post and solution. I'm now seeing the globe with ReadyMap.

Thank you!

plevy commented 4 days ago

I am glad you got it working. If the path to the plugins doesn't work: \vcpkg_installed\x64-windows\plugins\osgPlugins-3.6.5 sometimes set the path one above: \vcpkg_installed\x64-windows\plugins\

I ran into this with having vcpkg build osgEarth and having external build of osgEarth both using the vcpkg path. The white globe in readymap.earth is a good indicator you have a bad path to plugins