Closed shiner-chen closed 6 months ago
You need to preload the osgEarthCesium library if your application doesn't link to it by adding it to your earth file like this:
<map name="CesiumNatives 3DTiles">
<libraries>osgEarthCesium</libraries>
<CesiumNative3DTiles name="agi">
<url>https://pelican-public.s3.amazonaws.com/3dtiles/agi-hq/tileset.json</url>
</CesiumNative3DTiles>
</map>
@jasonbeverage according to your comment, I modified the earth file, but I still get the white globe. The log is as follows:
PS F:\osgearth\tests> osgearth_viewer.exe .\agi-3dtiles.earth
[osgearth info] Hello, world.
[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 library osgEarthCesium.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] [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
PS F:\osgearth\tests>
After set environment OSGEARTH_HTTP_DEBUG=1, I get the following log,
PS F:\osgearth\tests> osgearth_viewer.exe .\agi-3dtiles.earth
[osgearth info] Hello, world.
[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 library osgEarthCesium.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] [HTTPClient] HTTP debugging enabled
[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
[osgearth info] [HTTPClient] GET(200) application/json: https://pelican-public.s3.amazonaws.com/3dtiles/agi-hq/tileset.json (Wed, 30 Sep 2020 15:44:02 GMT) t=1.466s
I have verified the http link, I can get the context from chrome browser.
You'll have to zoom into Exton PA to see the dataset, it's just a small building and not a whole globe dataset.
On Sun, Mar 3, 2024 at 8:11 PM shiner-chen @.***> wrote:
After set environment OSGEARTH_HTTP_DEBUG=1, I get the following log,
PS F:\osgearth\tests> osgearth_viewer.exe .\agi-3dtiles.earth [osgearth info] Hello, world. [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 library osgEarthCesium.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] [HTTPClient] HTTP debugging enabled [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 [osgearth info] [HTTPClient] GET(200) application/json: https://pelican-public.s3.amazonaws.com/3dtiles/agi-hq/tileset.json (Wed, 30 Sep 2020 15:44:02 GMT) t=1.466s
I have verified the http link, I can get the context from chrome browser. image.png (view on web) https://github.com/gwaldron/osgearth/assets/12945934/bebf9206-b779-42b3-b30f-ed479a4142eb
— Reply to this email directly, view it on GitHub https://github.com/gwaldron/osgearth/issues/2457#issuecomment-1975479340, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACPXYTKJRJNVTQ2D2TL6L3YWPC5PAVCNFSM6AAAAABEBIKWF6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZVGQ3TSMZUGA . You are receiving this because you were mentioned.Message ID: @.***>
It's ok now, I can see it, thank a lot! I have another question and I use the same earth just replace the uri with google photorealistic 3d tilesphotorealistic http link as follows, I get error: "Errors when loading tileset: ". How to deal with it? Thanks.
<map>
<libraries>osgEarthCesium</libraries>
<CesiumNative3DTiles name="Google Tiles">
<url>https://tile.googleapis.com/v1/3dtiles/root.json?key=AIzaSyC9BsFXN7nV2uNlPjk3TfAArSA5FiJOBvc</url>
</CesiumNative3DTiles>
</map>
Log:
PS F:\osgearth\tests> osgearth_viewer.exe .\google-3dtiles.earth
[osgearth info] Hello, world.
[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 library osgEarthCesium.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] [HTTPClient] HTTP debugging enabled
[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] [HTTPClient] GET(0) : https://tile.googleapis.com/v1/3dtiles/root.json?key=AIzaSyC9BsFXN7nV2uNlPjk3TfAArSA5FiJOBvc (Thu, 01 Jan 1970 00:00:00 GMT) t=0.04464s
[osgearth info] [RexTerrainEngineNode] Creating 2 root keys.
[osgearth info] [MapNodeHelper] Activating logarithmic depth buffer (vertex-only) on main camera
[2024-03-04 09:50:06.867] [error] [ErrorList.h:72] Errors when loading tileset:
- Error when parsing tileset JSON, error code 1 at byte offset 0
Describe the bug I try to load a local 3DTiles model by osgearthviewer, but It show a white globe and return **"[EarthSerializer2] Failed to find an extension for cesiumnative3dtiles"**. So I tested the online model by the below earth file which come from the offical document, I get the same error.
To Reproduce The following is run log:
I try to use the CesiumIon3DTiles layer to load 3dtiles from cesium ion, it can run successfully!, The earth file is as follows:
Log:
screenshot:
Expected behavior Osgearth_viewer should load the 3dtiles by CesiumNative3DTiles layer. What's wrong wth the osgearth? How to resolve this error?
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.