guidance on loading GlTF 2.0 file and move it by coordinates (coordinates will change every 30 seconds) #2666
-
I would greatly appreciate any guidance on how to load and display a GLTF file (3D model) on the OSGEarth WGS model using code. My goal is to read and position a 3D model on the Earth model. I couldn't find relevant information in the repository and would be grateful if you could provide the initial steps to get started. I will also need to copy this 3D model multiple times (in code) and move them around using code. Currently, I am using OSGEarth version 3.4. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
There is a (rudimentary) GLTF loader in osgEarth. You can load it with <map>
<libraries>gltf</libraries>
<TMSImage>
<url>https://readymap.org/readymap/tiles/1.0.0/7/</url>
</TMSImage>
<annotations>
<model>
<position lat="0" long="0" alt="0"/>
<style>
model: "glTF/ToyCar.gltf";
model-scale: 1000000;
</style>
</model>
</annotations>
</map> |
Beta Was this translation helpful? Give feedback.
There is a (rudimentary) GLTF loader in osgEarth. You can load it with
osgDB::readNode
and you can put it under aGeoTransform
to position it. You can test from the earth file like so