gwaldron / osgearth

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

Loading 3dtiles is very slow, why? #1824

Closed Rendtime closed 5 months ago

Rendtime commented 2 years ago

Thanks for providing such a good product! I am loading 3dtils data, but the loading speed is very slow. It takes a few seconds to finish loading, which is slower than loading 3dtiles using a browser. C++ should be faster than JS I set the concurrent number to eight. Is there any way to improve it?

jasonbeverage commented 2 years ago

Do you have a test case we can use? One reason might be that Cesium has implemented a level skipping optimization in 3d tiles so it loads the highest res tiles without loading the lower lods first. We haven't implemented anything like that so we're probably loading more data than Cesium is.

On Mon, Oct 11, 2021, 5:52 AM Rendtime @.***> wrote:

Thanks for providing such a good product! I am loading 3dtils data, but the loading speed is very slow. It takes a few seconds to finish loading, which is slower than loading 3dtiles using a browser. C++ should be faster than JS I set the concurrent number to eight. Is there any way to improve it?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gwaldron/osgearth/issues/1824, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACPXYRXMKTUHGNXSCQQYKLUGKXWFANCNFSM5FX2GWGA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Rendtime commented 2 years ago

Thank jasonbeverage I also found out that in osgearth, it is a level-by-level downward loading. When json is loaded, b3dm is also loaded. This may be the reason for the reduced efficiency. In addition, I found that there are loopholes, this one has not been displayed

Rendtime commented 2 years ago

very thankful

shiner-chen commented 7 months ago

@Rendtime How to resolve that loading 3dtiles is very slow?

jasonbeverage commented 7 months ago

@shiner-chen are you using the new osgEarthCesium integration? It should be much faster than our previous implementation.

shiner-chen commented 7 months ago

@jasonbeverage How to use the osgEarthCesium? My code is below:

#include <iostream>
#include <string>

#include <osgViewer/Viewer>
#include <osgDB/ReadFile>
#include <osgDB/Options>
#include <osgEarth/MapNode>
#include <osgEarth/ShaderGenerator>

#include <osgEarth/ImageLayer>
#include <osgEarth/Viewpoint>
#include <osgEarth/GeoTransform>
#include <osgEarth/ThreeDTilesLayer>
#include <osgEarth/ModelLayer>
#include <osgEarth/Registry>

#include <osgEarth/EarthManipulator>
#include <osgEarth/TMS>

//#include <gdal_priv.h>

using namespace std;

void AddModel(osg::ref_ptr<osgEarth::Map> map, osg::ref_ptr<osgEarth::MapNode> mapNode)
{
        // Create a new ThreeDTiles Layer object.
        osg::ref_ptr<osgEarth::Contrib::ThreeDTilesLayer> modelLayer = new osgEarth::Contrib::ThreeDTilesLayer();

        // Set the URL of the 3D Tiles file.
        modelLayer->setURL("/home/chenx/data/3dtiles/lod_3dtiles/tileset.json");
        modelLayer->setName("倾斜摄影");
        map->addLayer(modelLayer);

}

int main()
{
        osgEarth::initialize();
        osgViewer::Viewer viewer;
        viewer.setUpViewInWindow(0, 100, 800, 600);
        viewer.getCamera()->setClearColor(osg::Vec4(0, 0, 0, 0));

        osg::ref_ptr< osgEarth::EarthManipulator> mainManipulator = new osgEarth::EarthManipulator;
        viewer.setCameraManipulator(mainManipulator);

        //创建地图节点
        osg::ref_ptr<osgEarth::Map> map = new osgEarth::Map;

        osg::ref_ptr<osgEarth::MapNode> mapNode = new osgEarth::MapNode(map);

        AddModel(map, mapNode);

        viewer.setSceneData(mapNode);

        osgEarth::Viewpoint vp;
        osgEarth::GeoPoint newPoint(map->getSRS(), 121.56241165900519, 25.034966733139754, 500);
        vp.focalPoint() = newPoint;
        vp.heading()->set(0, osgEarth::Units::DEGREES);
        vp.pitch()->set(-90, osgEarth::Units::DEGREES);
        vp.range()->set(1000, osgEarth::Units::METERS);
        mainManipulator->setViewpoint(vp, 5);
        viewer.setThreadingModel(osgViewer::Viewer::CullThreadPerCameraDrawThreadPerContext);
        return viewer.run();
}
shiner-chen commented 7 months ago

I try to modify the code as follows:

#include <iostream>
#include <string>

#include <osgViewer/Viewer>
#include <osgDB/ReadFile>
#include <osgDB/Options>
#include <osgEarth/MapNode>
#include <osgEarth/ShaderGenerator>

#include <osgEarth/ImageLayer>
#include <osgEarth/Viewpoint>
#include <osgEarth/GeoTransform>
#include <osgEarth/ThreeDTilesLayer>
#include <osgEarth/ModelLayer>
#include <osgEarth/Registry>
#include <osgEarthCesium/CesiumLayer>

#include <osgEarth/EarthManipulator>
#include <osgEarth/TMS>

//#include <gdal_priv.h>

using namespace std;

void AddModel(osg::ref_ptr<osgEarth::Map> map, osg::ref_ptr<osgEarth::MapNode> mapNode)
{
        // Create a new ThreeDTiles Layer object.
        //osg::ref_ptr<osgEarth::Contrib::ThreeDTilesLayer> modelLayer = new osgEarth::Contrib::ThreeDTilesLayer();
        osg::ref_ptr<osgEarth::Cesium::CesiumNative3DTilesLayer> modelLayer = new osgEarth::Cesium::CesiumNative3DTilesLayer();
        // Set the URL of the 3D Tiles file.
        modelLayer->setURL("/home/chenx/data/3dtiles/lod_3dtiles/tileset.json");
        modelLayer->setName("倾斜摄影");
        map->addLayer(modelLayer);

}

int main()
{
        osgEarth::initialize();
        osgViewer::Viewer viewer;
        viewer.setUpViewInWindow(0, 100, 800, 600);
        viewer.getCamera()->setClearColor(osg::Vec4(0, 0, 0, 0));

        osg::ref_ptr< osgEarth::EarthManipulator> mainManipulator = new osgEarth::EarthManipulator;
        viewer.setCameraManipulator(mainManipulator);

        //创建地图节点
        osg::ref_ptr<osgEarth::Map> map = new osgEarth::Map;

        osg::ref_ptr<osgEarth::MapNode> mapNode = new osgEarth::MapNode(map);

        AddModel(map, mapNode);

        viewer.setSceneData(mapNode);

        osgEarth::Viewpoint vp;
        osgEarth::GeoPoint newPoint(map->getSRS(), 121.56241165900519, 25.034966733139754, 500);
        vp.focalPoint() = newPoint;
        vp.heading()->set(0, osgEarth::Units::DEGREES);
        vp.pitch()->set(-90, osgEarth::Units::DEGREES);
        vp.range()->set(1000, osgEarth::Units::METERS);
        mainManipulator->setViewpoint(vp, 5);
        viewer.setThreadingModel(osgViewer::Viewer::CullThreadPerCameraDrawThreadPerContext);
        return viewer.run();
}

the CMakeLists.txt as follows:

cmake_minimum_required(VERSION 3.22)

project(
    myApp
    VERSION 0.1.0
    LANGUAGES CXX C
)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")

find_package(OpenSceneGraph REQUIRED COMPONENTS osg osgDB osgGA osgUtil osgViewer)

find_package(OsgEarth REQUIRED)
find_package(CesiumNative REQUIRED)
message("CESIUM_NATIVE_FOUND= ${CESIUM_NATIVE_FOUND}")
#find_package(osgEarth REQUIRED)

add_executable(myApp main.cpp)

target_include_directories(myApp PRIVATE ${OSGEARTH_INCLUDE_DIRS} ${OSG_INCLUDE_DIR})

target_link_libraries(myApp PRIVATE ${OSGEARTH_LIBRARY} ${OSGEARTHCESIUM_LIBRARY}
${CESIUM_NATIVE_3DTILES_LIBRARY}
${CESIUM_NATIVE_3DTILES_SELECTION_LIBRARY}
${CESIUM_NATIVE_GEOSPATIAL_LIBRARY}
${CESIUM_NATIVE_UTILITY_LIBRARY}
${CESIUM_NATIVE_ION_CLIENT_LIBRARY}
${CESIUM_NATIVE_GLTF_READER_LIBRARY}
${CESIUM_NATIVE_3DTILES_READER_LIBRARY}
${CESIUM_NATIVE_GEOMETRY_LIBRARY}
${CESIUM_NATIVE_GLTF_LIBRARY}
${CESIUM_NATIVE_KTX_READ_LIBRARY}
${CESIUM_NATIVE_DRACO_LIBRARY}
${CESIUM_NATIVE_SPDLOG_LIBRARY}
${CESIUM_NATIVE_ASYNC++_LIBRARY}
${CESIUM_NATIVE_WEBPDECODER_LIBRARY}
${CESIUM_NATIVE_MESHOPTIMIZER_LIBRARY}
${CESIUM_NATIVE_URIPARSER_LIBRARY}
${CESIUM_NATIVE_TURBOJPEG_LIBRARY}
${CESIUM_NATIVE_CSPRNG_LIBRARY}
${CESIUM_NATIVE_MODPB64_LIBRARY}
${CESIUM_NATIVE_JSONREADER_LIBRARY}
${CESIUM_NATIVE_ASYNC_LIBRARY}
${CESIUM_NATIVE_S2GEOMETRY_LIBRARY}
${CESIUM_NATIVE_TINYXML2_LIBRARY}
${CESIUM_NATIVE_RASTER_OVERLAYS_LIBRARY}
${CESIUM_NATIVE_3DTILES_CONTENT_LIBRARY}
${CESIUM_NATIVE_GLTF_CONTENT_LIBRARY}
        )
target_link_libraries(myApp PRIVATE ${OPENSCENEGRAPH_LIBRARIES})

install(TARGETS myApp RUNTIME DESTINATION bin)

I get compile error when build the code.

chenx@chenx-rk3588:~/osgearth-samples/lod-3dtiles-demo/build$ cmake ..
-- The CXX compiler identification is GNU 11.4.0
-- The C compiler identification is GNU 11.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found osg: /opt/osg/lib/libosg.so
-- Found osgDB: /opt/osg/lib/libosgDB.so
-- Found osgGA: /opt/osg/lib/libosgGA.so
-- Found osgUtil: /opt/osg/lib/libosgUtil.so
-- Found osgViewer: /opt/osg/lib/libosgViewer.so
-- Found OpenThreads: /opt/osg/lib/libOpenThreads.so
-- Found OpenSceneGraph: /opt/osg/lib/libosg.so;/opt/osg/lib/libosgDB.so;/opt/osg/lib/libosgGA.so;/opt/osg/lib/libosgUtil.so;/opt/osg/lib/libosgViewer.so;/opt/osg/lib/libOpenThreads.so (found version "3.7.0")
CESIUM_NATIVE_FOUND= YES
-- Configuring done
-- Generating done
-- Build files have been written to: /home/chenx/osgearth-samples/lod-3dtiles-demo/build
chenx@chenx-rk3588:~/osgearth-samples/lod-3dtiles-demo/build$ make
[ 50%] Building CXX object CMakeFiles/myApp.dir/main.cpp.o
In file included from /opt/osg/include/osg/State:33,
                 from /opt/osg/include/osg/RenderInfo:17,
                 from /opt/osg/include/osg/Drawable:21,
                 from /opt/osg/include/osg/Geode:18,
                 from /opt/osg/include/osgGA/EventVisitor:19,
                 from /opt/osg/include/osgViewer/Viewer:18,
                 from /home/chenx/osgearth-samples/lod-3dtiles-demo/main.cpp:4:
/opt/osg/include/osg/GraphicsCostEstimator: In member function ‘osg::CostPair osg::GraphicsCostEstimator::estimateCompileCost(const osg::Geometry*) const’:
/opt/osg/include/osg/GraphicsCostEstimator:118:71: note: parameter passing for argument of type ‘std::pair<double, double>’ when C++17 is enabled changed to match C++14 in GCC 10.1
  118 |     CostPair estimateCompileCost(const osg::Geometry* geometry) const { return _geometryEstimator->estimateCompileCost(geometry); }
      |                                                                       ^
[100%] Linking CXX executable myApp
/usr/bin/ld: /opt/osgearth/lib64/libosgEarthCesium.so: undefined reference to `Cesium3DTilesSelection::ViewState::create(glm::vec<3, double, (glm::qualifier)0> const&, glm::vec<3, double, (glm::qualifier)0> const&, glm::vec<3, double, (glm::qualifier)0> const&, glm::vec<2, double, (glm::qualifier)0> const&, double, double, CesiumGeospatial::Ellipsoid const&)'
/usr/bin/ld: /opt/osgearth/lib64/libosgEarthCesium.so: undefined reference to `CesiumGltfContent::GltfUtilities::applyRtcCenter(CesiumGltf::Model const&, glm::mat<4, 4, double, (glm::qualifier)0> const&)'
/usr/bin/ld: /opt/osgearth/lib64/libosgEarthCesium.so: undefined reference to `CesiumGltfContent::GltfUtilities::applyGltfUpAxisTransform(CesiumGltf::Model const&, glm::mat<4, 4, double, (glm::qualifier)0> const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/myApp.dir/build.make:131: myApp] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/myApp.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

How to fix it? @jasonbeverage , thans a lot!

jasonbeverage commented 7 months ago

You can follow the instructions here on how to build and use osgEarth. You might need to build against the v0.31.0 release of cesium native for the plugin to work, I haven't tried building against the master recently.

shiner-chen commented 6 months ago

You can follow the instructions here on how to build and use osgEarth. You might need to build against the v0.31.0 release of cesium native for the plugin to work, I haven't tried building against the master recently.

I am using the Cesium Native v0.31.0 + osgEarth 3.5.0 build 149, but I get the complile error, What is the version of osgEarth verified with Cesium Native v0.31.0?

shiner-chen commented 6 months ago

I use cesium native v0.31.0+ Master of osgearth, I also get compile error when built the osgearth. Please see the log below:


-- Generating done
-- Build files have been written to: /home/chenx/workspace/osgearth/build
chenx@chenx-rk3588:~/workspace/osgearth/build$ make
Consolidate compiler generated dependencies of target osgEarth
[ 54%] Built target osgEarth
Consolidate compiler generated dependencies of target osgdb_osgearth_bumpmap
[ 55%] Built target osgdb_osgearth_bumpmap
Consolidate compiler generated dependencies of target osgdb_osgearth_cache_filesystem
[ 55%] Built target osgdb_osgearth_cache_filesystem
Consolidate compiler generated dependencies of target osgdb_osgearth_colorramp
[ 55%] Built target osgdb_osgearth_colorramp
Consolidate compiler generated dependencies of target osgdb_osgearth_detail
[ 56%] Built target osgdb_osgearth_detail
Consolidate compiler generated dependencies of target osgdb_earth
[ 57%] Built target osgdb_earth
Consolidate compiler generated dependencies of target osgdb_osgearth_engine_rex
[ 61%] Built target osgdb_osgearth_engine_rex
Consolidate compiler generated dependencies of target osgdb_osgearth_featurefilter_intersect
[ 61%] Built target osgdb_osgearth_featurefilter_intersect
Consolidate compiler generated dependencies of target osgdb_osgearth_featurefilter_join
[ 61%] Built target osgdb_osgearth_featurefilter_join
Consolidate compiler generated dependencies of target osgdb_gltf
[ 61%] Built target osgdb_gltf
Consolidate compiler generated dependencies of target osgdb_kml
[ 66%] Built target osgdb_kml
Consolidate compiler generated dependencies of target osgdb_osgearth_scriptengine_javascript
[ 67%] Built target osgdb_osgearth_scriptengine_javascript
Consolidate compiler generated dependencies of target osgdb_osgearth_sky_gl
[ 68%] Built target osgdb_osgearth_sky_gl
Consolidate compiler generated dependencies of target osgdb_osgearth_sky_simple
[ 69%] Built target osgdb_osgearth_sky_simple
Consolidate compiler generated dependencies of target osgdb_template
[ 70%] Built target osgdb_template
Consolidate compiler generated dependencies of target osgdb_osgearth_terrainshader
[ 71%] Built target osgdb_osgearth_terrainshader
Consolidate compiler generated dependencies of target osgdb_webp
[ 71%] Built target osgdb_webp
Consolidate compiler generated dependencies of target osgdb_osgearth_vdatum_egm2008
[ 71%] Built target osgdb_osgearth_vdatum_egm2008
Consolidate compiler generated dependencies of target osgdb_osgearth_vdatum_egm84
[ 71%] Built target osgdb_osgearth_vdatum_egm84
Consolidate compiler generated dependencies of target osgdb_osgearth_vdatum_egm96
[ 72%] Built target osgdb_osgearth_vdatum_egm96
Consolidate compiler generated dependencies of target osgdb_osgearth_viewpoints
[ 72%] Built target osgdb_osgearth_viewpoints
Consolidate compiler generated dependencies of target osgdb_zip
[ 73%] Built target osgdb_zip
Consolidate compiler generated dependencies of target osgdb_osgearth_cache_rocksdb
[ 74%] Built target osgdb_osgearth_cache_rocksdb
Consolidate compiler generated dependencies of target osgdb_fastdxt
[ 75%] Built target osgdb_fastdxt
Consolidate compiler generated dependencies of target osgdb_lerc
[ 77%] Built target osgdb_lerc
Consolidate compiler generated dependencies of target osgEarthCesium
[ 79%] Built target osgEarthCesium
Consolidate compiler generated dependencies of target application_osgearth_viewer
[ 80%] Built target application_osgearth_viewer
Consolidate compiler generated dependencies of target application_osgearth_imgui
[ 81%] Linking CXX executable ../../../bin/osgearth_imgui
/usr/bin/ld: ../../../lib/libosgEarthCesium.so.3.5.0: undefined reference to `CesiumAsync::CesiumImpl::QueuedScheduler::schedule(async::task_run_handle)'
/usr/bin/ld: ../../../lib/libosgEarthCesium.so.3.5.0: undefined reference to `CesiumAsync::CesiumImpl::TaskScheduler::schedule(async::task_run_handle)'
/usr/bin/ld: ../../../lib/libosgEarthCesium.so.3.5.0: undefined reference to `Cesium3DTilesSelection::ViewState::create(glm::vec<3, double, (glm::qualifier)0> const&, glm::vec<3, double, (glm::qualifier)0> const&, glm::vec<3, double, (glm::qualifier)0> const&, glm::vec<2, double, (glm::qualifier)0> const&, double, double, CesiumGeospatial::Ellipsoid const&)'
/usr/bin/ld: ../../../lib/libosgEarthCesium.so.3.5.0: undefined reference to `CesiumGltfContent::GltfUtilities::applyRtcCenter(CesiumGltf::Model const&, glm::mat<4, 4, double, (glm::qualifier)0> const&)'
/usr/bin/ld: ../../../lib/libosgEarthCesium.so.3.5.0: undefined reference to `CesiumGltfContent::GltfUtilities::applyGltfUpAxisTransform(CesiumGltf::Model const&, glm::mat<4, 4, double, (glm::qualifier)0> const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [src/applications/osgearth_imgui/CMakeFiles/application_osgearth_imgui.dir/build.make:223: bin/osgearth_imgui] Error 1
make[1]: *** [CMakeFiles/Makefile2:1998: src/applications/osgearth_imgui/CMakeFiles/application_osgearth_imgui.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

I checked the dependency of libosgEarthCesium.so.3.5.0 as below, it seems that the cesium native library path is ok.

chenx@chenx-rk3588:~/workspace/osgearth/build$ ldd lib/libosgEarthCesium.so
        linux-vdso.so.1 (0x0000ffff81186000)
        libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000ffff80e40000)
        libosgEarth.so.150 => /home/chenx/workspace/osgearth/build/lib/libosgEarth.so.150 (0x0000ffff7f200000)
        libosg.so.202 => /opt/osg/lib/libosg.so.202 (0x0000ffff7ee50000)
        libosgDB.so.202 => /opt/osg/lib/libosgDB.so.202 (0x0000ffff7ecc0000)
        libosgText.so.202 => /opt/osg/lib/libosgText.so.202 (0x0000ffff7ec40000)
        libCesium3DTilesSelection.so => /opt/cesium-native/lib/libCesium3DTilesSelection.so (0x0000ffff7ea70000)
        libCesiumUtility.so => /opt/cesium-native/lib/libCesiumUtility.so (0x0000ffff7ea40000)
        libCesiumIonClient.so => /opt/cesium-native/lib/libCesiumIonClient.so (0x0000ffff7e990000)
        libCesiumGeospatial.so => /opt/cesium-native/lib/libCesiumGeospatial.so (0x0000ffff7e960000)
        libCesiumGltf.so => /opt/cesium-native/lib/libCesiumGltf.so (0x0000ffff7e900000)
        libspdlog.so.1 => /opt/cesium-native/lib/libspdlog.so.1 (0x0000ffff7e860000)
        libasync++.so => /opt/cesium-native/lib/libasync++.so (0x0000ffff7e840000)
        libCesiumAsync.so => /opt/cesium-native/lib/libCesiumAsync.so (0x0000ffff7e6f0000)
        libCesium3DTilesContent.so => /opt/cesium-native/lib/libCesium3DTilesContent.so (0x0000ffff7e610000)
        libCesiumRasterOverlays.so => /opt/cesium-native/lib/libCesiumRasterOverlays.so (0x0000ffff7e570000)
        libstdc++.so.6 => /lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000ffff7e340000)
        libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000ffff7e310000)
        libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffff7e160000)
        /lib/ld-linux-aarch64.so.1 (0x0000ffff8114e000)
        libsqlite3.so.0 => /usr/local/lib/libsqlite3.so.0 (0x0000ffff7e010000)
        libblosc.so.1 => /lib/aarch64-linux-gnu/libblosc.so.1 (0x0000ffff7dff0000)
        libgeos_c.so.1 => /lib/aarch64-linux-gnu/libgeos_c.so.1 (0x0000ffff7dfa0000)
        libprotobuf.so.23 => /lib/aarch64-linux-gnu/libprotobuf.so.23 (0x0000ffff7dcf0000)
        libosgUtil.so.202 => /opt/osg/lib/libosgUtil.so.202 (0x0000ffff7dae0000)
        libosgSim.so.202 => /opt/osg/lib/libosgSim.so.202 (0x0000ffff7da30000)
        libosgViewer.so.202 => /opt/osg/lib/libosgViewer.so.202 (0x0000ffff7d8e0000)
        libosgGA.so.202 => /opt/osg/lib/libosgGA.so.202 (0x0000ffff7d7e0000)
        libosgShadow.so.202 => /opt/osg/lib/libosgShadow.so.202 (0x0000ffff7d730000)
        libcurl.so.4 => /lib/aarch64-linux-gnu/libcurl.so.4 (0x0000ffff7d680000)
        libgdal.so.30 => /lib/libgdal.so.30 (0x0000ffff7c2b0000)
        libosgManipulator.so.202 => /opt/osg/lib/libosgManipulator.so.202 (0x0000ffff7c250000)
        libGL.so.1 => /lib/aarch64-linux-gnu/libGL.so.1 (0x0000ffff7c150000)
        libOpenThreads.so.21 => /opt/osg/lib/libOpenThreads.so.21 (0x0000ffff7c130000)
        libfontconfig.so.1 => /lib/aarch64-linux-gnu/libfontconfig.so.1 (0x0000ffff7c0d0000)
        libCesium3DTilesReader.so => /opt/cesium-native/lib/libCesium3DTilesReader.so (0x0000ffff7bfe0000)
        libCesiumGltfContent.so => /opt/cesium-native/lib/libCesiumGltfContent.so (0x0000ffff7bfa0000)
        libCesiumGeometry.so => /opt/cesium-native/lib/libCesiumGeometry.so (0x0000ffff7bf70000)
        libCesiumGltfReader.so => /opt/cesium-native/lib/libCesiumGltfReader.so (0x0000ffff7ba00000)
        liburiparser.so.1 => /opt/cesium-native/lib/liburiparser.so.1 (0x0000ffff7b9d0000)
        libcsprng.so => /opt/cesium-native/lib/libcsprng.so (0x0000ffff7b9b0000)
        libs2geometry.so => /opt/cesium-native/lib/libs2geometry.so (0x0000ffff7b980000)
        libtinyxml2.so => /opt/cesium-native/lib/libtinyxml2.so (0x0000ffff7b950000)
        liblz4.so.1 => /lib/aarch64-linux-gnu/liblz4.so.1 (0x0000ffff7b920000)
        libsnappy.so.1 => /lib/aarch64-linux-gnu/libsnappy.so.1 (0x0000ffff7b900000)
        libz.so.1 => /lib/aarch64-linux-gnu/libz.so.1 (0x0000ffff7b8d0000)
        libzstd.so.1 => /lib/aarch64-linux-gnu/libzstd.so.1 (0x0000ffff7b800000)
        libgeos.so.3.10.2 => /lib/aarch64-linux-gnu/libgeos.so.3.10.2 (0x0000ffff7b600000)
        libX11.so.6 => /lib/aarch64-linux-gnu/libX11.so.6 (0x0000ffff7b4b0000)
        libXrandr.so.2 => /lib/aarch64-linux-gnu/libXrandr.so.2 (0x0000ffff7b490000)
        libnghttp2.so.14 => /lib/aarch64-linux-gnu/libnghttp2.so.14 (0x0000ffff7b450000)
        libidn2.so.0 => /lib/aarch64-linux-gnu/libidn2.so.0 (0x0000ffff7b420000)
        librtmp.so.1 => /lib/aarch64-linux-gnu/librtmp.so.1 (0x0000ffff7b3f0000)
        libssh.so.4 => /lib/aarch64-linux-gnu/libssh.so.4 (0x0000ffff7b370000)
        libpsl.so.5 => /lib/aarch64-linux-gnu/libpsl.so.5 (0x0000ffff7b340000)
        libssl.so.3 => /lib/aarch64-linux-gnu/libssl.so.3 (0x0000ffff7b290000)
        libcrypto.so.3 => /lib/aarch64-linux-gnu/libcrypto.so.3 (0x0000ffff7aea0000)
        libgssapi_krb5.so.2 => /lib/aarch64-linux-gnu/libgssapi_krb5.so.2 (0x0000ffff7ae40000)
        libldap-2.5.so.0 => /lib/aarch64-linux-gnu/libldap-2.5.so.0 (0x0000ffff7add0000)
        liblber-2.5.so.0 => /lib/aarch64-linux-gnu/liblber-2.5.so.0 (0x0000ffff7adb0000)
        libbrotlidec.so.1 => /lib/aarch64-linux-gnu/libbrotlidec.so.1 (0x0000ffff7ad90000)
        libheif.so.1 => /lib/aarch64-linux-gnu/libheif.so.1 (0x0000ffff7ad00000)
        libarmadillo.so.10 => /lib/libarmadillo.so.10 (0x0000ffff7acd0000)
        libpoppler.so.118 => /lib/aarch64-linux-gnu/libpoppler.so.118 (0x0000ffff7a980000)
        libjson-c.so.5 => /lib/aarch64-linux-gnu/libjson-c.so.5 (0x0000ffff7a950000)
        libfreexl.so.1 => /lib/aarch64-linux-gnu/libfreexl.so.1 (0x0000ffff7a930000)
        libqhull_r.so.8.0 => /lib/aarch64-linux-gnu/libqhull_r.so.8.0 (0x0000ffff7a8b0000)
        libwebp.so.7 => /lib/aarch64-linux-gnu/libwebp.so.7 (0x0000ffff7a850000)
        libodbc.so.2 => /lib/aarch64-linux-gnu/libodbc.so.2 (0x0000ffff7a7d0000)
        libodbcinst.so.2 => /lib/aarch64-linux-gnu/libodbcinst.so.2 (0x0000ffff7a7a0000)
        libkmlbase.so.1 => /lib/aarch64-linux-gnu/libkmlbase.so.1 (0x0000ffff7a770000)
        libkmldom.so.1 => /lib/aarch64-linux-gnu/libkmldom.so.1 (0x0000ffff7a6c0000)
        libkmlengine.so.1 => /lib/aarch64-linux-gnu/libkmlengine.so.1 (0x0000ffff7a670000)
        libexpat.so.1 => /lib/aarch64-linux-gnu/libexpat.so.1 (0x0000ffff7a630000)
        libxerces-c-3.2.so => /lib/aarch64-linux-gnu/libxerces-c-3.2.so (0x0000ffff7a2f0000)
        libopenjp2.so.7 => /lib/aarch64-linux-gnu/libopenjp2.so.7 (0x0000ffff7a280000)
        libnetcdf.so.19 => /lib/aarch64-linux-gnu/libnetcdf.so.19 (0x0000ffff7a110000)
        libhdf5_serial.so.103 => /lib/aarch64-linux-gnu/libhdf5_serial.so.103 (0x0000ffff79d40000)
        libmfhdfalt.so.0 => /lib/libmfhdfalt.so.0 (0x0000ffff79d00000)
        libdfalt.so.0 => /lib/libdfalt.so.0 (0x0000ffff79c40000)
        libogdi.so.4.1 => /lib/libogdi.so.4.1 (0x0000ffff79c10000)
        libgif.so.7 => /lib/aarch64-linux-gnu/libgif.so.7 (0x0000ffff79bf0000)
        libcharls.so.2 => /lib/aarch64-linux-gnu/libcharls.so.2 (0x0000ffff79b90000)
        libgeotiff.so.5 => /lib/aarch64-linux-gnu/libgeotiff.so.5 (0x0000ffff79b40000)
        libpng16.so.16 => /lib/aarch64-linux-gnu/libpng16.so.16 (0x0000ffff79af0000)
        libcfitsio.so.9 => /lib/aarch64-linux-gnu/libcfitsio.so.9 (0x0000ffff797f0000)
        libpq.so.5 => /lib/aarch64-linux-gnu/libpq.so.5 (0x0000ffff79790000)
        liblzma.so.5 => /lib/aarch64-linux-gnu/liblzma.so.5 (0x0000ffff79750000)
        libproj.so.22 => /lib/aarch64-linux-gnu/libproj.so.22 (0x0000ffff79430000)
        libtiff.so.5 => /lib/aarch64-linux-gnu/libtiff.so.5 (0x0000ffff793a0000)
        libjpeg.so.8 => /lib/aarch64-linux-gnu/libjpeg.so.8 (0x0000ffff79340000)
        libdeflate.so.0 => /lib/aarch64-linux-gnu/libdeflate.so.0 (0x0000ffff79310000)
        libspatialite.so.7 => /lib/aarch64-linux-gnu/libspatialite.so.7 (0x0000ffff78b70000)
        libpcre2-8.so.0 => /lib/aarch64-linux-gnu/libpcre2-8.so.0 (0x0000ffff78ad0000)
        libfyba.so.0 => /lib/aarch64-linux-gnu/libfyba.so.0 (0x0000ffff78a60000)
        libxml2.so.2 => /lib/aarch64-linux-gnu/libxml2.so.2 (0x0000ffff78870000)
        libmysqlclient.so.21 => /lib/aarch64-linux-gnu/libmysqlclient.so.21 (0x0000ffff781e0000)
        libGLdispatch.so.0 => /lib/aarch64-linux-gnu/libGLdispatch.so.0 (0x0000ffff78050000)
        libGLX.so.0 => /lib/aarch64-linux-gnu/libGLX.so.0 (0x0000ffff78000000)
        libfreetype.so.6 => /lib/aarch64-linux-gnu/libfreetype.so.6 (0x0000ffff77f30000)
        libuuid.so.1 => /lib/aarch64-linux-gnu/libuuid.so.1 (0x0000ffff77f10000)
        libCesiumJsonReader.so => /opt/cesium-native/lib/libCesiumJsonReader.so (0x0000ffff77ed0000)
        libxcb.so.1 => /lib/aarch64-linux-gnu/libxcb.so.1 (0x0000ffff77e90000)
        libXext.so.6 => /lib/aarch64-linux-gnu/libXext.so.6 (0x0000ffff77e60000)
        libXrender.so.1 => /lib/aarch64-linux-gnu/libXrender.so.1 (0x0000ffff77e40000)
        libunistring.so.2 => /lib/aarch64-linux-gnu/libunistring.so.2 (0x0000ffff77c80000)
        libgnutls.so.30 => /lib/aarch64-linux-gnu/libgnutls.so.30 (0x0000ffff77a80000)
        libhogweed.so.6 => /lib/aarch64-linux-gnu/libhogweed.so.6 (0x0000ffff77a20000)
        libnettle.so.8 => /lib/aarch64-linux-gnu/libnettle.so.8 (0x0000ffff779c0000)
        libgmp.so.10 => /lib/aarch64-linux-gnu/libgmp.so.10 (0x0000ffff77930000)
        libkrb5.so.3 => /lib/aarch64-linux-gnu/libkrb5.so.3 (0x0000ffff77850000)
        libk5crypto.so.3 => /lib/aarch64-linux-gnu/libk5crypto.so.3 (0x0000ffff77810000)
        libcom_err.so.2 => /lib/aarch64-linux-gnu/libcom_err.so.2 (0x0000ffff777f0000)
        libkrb5support.so.0 => /lib/aarch64-linux-gnu/libkrb5support.so.0 (0x0000ffff777d0000)
        libsasl2.so.2 => /lib/aarch64-linux-gnu/libsasl2.so.2 (0x0000ffff777a0000)
        libbrotlicommon.so.1 => /lib/aarch64-linux-gnu/libbrotlicommon.so.1 (0x0000ffff77760000)
        libaom.so.3 => /lib/aarch64-linux-gnu/libaom.so.3 (0x0000ffff77410000)
        libde265.so.0 => /lib/aarch64-linux-gnu/libde265.so.0 (0x0000ffff77360000)
        libx265.so.199 => /lib/aarch64-linux-gnu/libx265.so.199 (0x0000ffff770a0000)
        libdav1d.so.5 => /lib/aarch64-linux-gnu/libdav1d.so.5 (0x0000ffff76fa0000)
        libblas.so.3 => /lib/aarch64-linux-gnu/libblas.so.3 (0x0000ffff76f20000)
        liblapack.so.3 => /lib/aarch64-linux-gnu/liblapack.so.3 (0x0000ffff769a0000)
        libarpack.so.2 => /lib/aarch64-linux-gnu/libarpack.so.2 (0x0000ffff76950000)
        libsuperlu.so.5 => /lib/aarch64-linux-gnu/libsuperlu.so.5 (0x0000ffff768d0000)
        liblcms2.so.2 => /lib/aarch64-linux-gnu/liblcms2.so.2 (0x0000ffff76860000)
        libnss3.so => /lib/aarch64-linux-gnu/libnss3.so (0x0000ffff76740000)
        libsmime3.so => /lib/aarch64-linux-gnu/libsmime3.so (0x0000ffff76700000)
        libplc4.so => /lib/aarch64-linux-gnu/libplc4.so (0x0000ffff766e0000)
        libnspr4.so => /lib/aarch64-linux-gnu/libnspr4.so (0x0000ffff76690000)
        libltdl.so.7 => /lib/aarch64-linux-gnu/libltdl.so.7 (0x0000ffff76670000)
        libminizip.so.1 => /lib/aarch64-linux-gnu/libminizip.so.1 (0x0000ffff76650000)
        libcurl-gnutls.so.4 => /lib/aarch64-linux-gnu/libcurl-gnutls.so.4 (0x0000ffff765a0000)
        libicuuc.so.70 => /lib/aarch64-linux-gnu/libicuuc.so.70 (0x0000ffff76390000)
        libhdf5_serial_hl.so.100 => /lib/aarch64-linux-gnu/libhdf5_serial_hl.so.100 (0x0000ffff76350000)
        libsz.so.2 => /lib/aarch64-linux-gnu/libsz.so.2 (0x0000ffff76330000)
        libtirpc.so.3 => /lib/aarch64-linux-gnu/libtirpc.so.3 (0x0000ffff762f0000)
        libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000ffff762d0000)
        libbz2.so.1.0 => /lib/aarch64-linux-gnu/libbz2.so.1.0 (0x0000ffff762a0000)
        libjbig.so.0 => /lib/aarch64-linux-gnu/libjbig.so.0 (0x0000ffff76280000)
        librttopo.so.1 => /lib/aarch64-linux-gnu/librttopo.so.1 (0x0000ffff76200000)
        libfyut.so.0 => /lib/aarch64-linux-gnu/libfyut.so.0 (0x0000ffff761e0000)
        libfygm.so.0 => /lib/aarch64-linux-gnu/libfygm.so.0 (0x0000ffff761c0000)
        libresolv.so.2 => /lib/aarch64-linux-gnu/libresolv.so.2 (0x0000ffff76190000)
        libXau.so.6 => /lib/aarch64-linux-gnu/libXau.so.6 (0x0000ffff76170000)
        libXdmcp.so.6 => /lib/aarch64-linux-gnu/libXdmcp.so.6 (0x0000ffff76150000)
        libp11-kit.so.0 => /lib/aarch64-linux-gnu/libp11-kit.so.0 (0x0000ffff76000000)
        libtasn1.so.6 => /lib/aarch64-linux-gnu/libtasn1.so.6 (0x0000ffff75fd0000)
        libkeyutils.so.1 => /lib/aarch64-linux-gnu/libkeyutils.so.1 (0x0000ffff75fb0000)
        libnuma.so.1 => /lib/aarch64-linux-gnu/libnuma.so.1 (0x0000ffff75f80000)
        libgfortran.so.5 => /lib/aarch64-linux-gnu/libgfortran.so.5 (0x0000ffff75e00000)
        libnssutil3.so => /lib/aarch64-linux-gnu/libnssutil3.so (0x0000ffff75db0000)
        libplds4.so => /lib/aarch64-linux-gnu/libplds4.so (0x0000ffff75d90000)
        libicudata.so.70 => /lib/aarch64-linux-gnu/libicudata.so.70 (0x0000ffff74160000)
        libaec.so.0 => /lib/aarch64-linux-gnu/libaec.so.0 (0x0000ffff74140000)
        libbsd.so.0 => /lib/aarch64-linux-gnu/libbsd.so.0 (0x0000ffff74110000)
        libffi.so.8 => /lib/aarch64-linux-gnu/libffi.so.8 (0x0000ffff740f0000)
        libmd.so.0 => /lib/aarch64-linux-gnu/libmd.so.0 (0x0000ffff740d0000)
chenx@chenx-rk3588:~/workspace/osgearth/build$

Also, I search the function name in library file and found the function symbol.

chenx@chenx-rk3588:~/workspace/osgearth/build$ nm -D /opt/cesium-native/lib/libCesiumGltfContent.so  |grep applyRtcCenter
000000000000a250 T _ZN17CesiumGltfContent13GltfUtilities14applyRtcCenterERKN10CesiumGltf5ModelERKN3glm3matILm4ELm4EdLNS5_9qualifierE0EEE

Why build failed with undefine reference???