Export GLTF from OSG?

94 views
Skip to first unread message

Armin Samii

unread,
Feb 7, 2020, 2:06:19 PM2/7/20
to osg-...@googlegroups.com
Has anybody worked on exporting GLTF Animations from OSG?

I'd like to save my dynamic OSG scene to disk, and don't want to save the static geometry each frame. GLTF lets me export the geometry once, and animate it each frame thereafter.

Curious if anybody has tried something similar, or if there is existing code to do this.

Robert Osfield

unread,
Feb 17, 2020, 1:01:48 PM2/17/20
to OpenSceneGraph Users
Hi Armin?
I don't know of any open sourced GLTF importers or exporters for the OSG.

What form do your animations take?
 

Armin Samii

unread,
Feb 17, 2020, 1:29:28 PM2/17/20
to OpenSceneGraph Users
Hi Robert,

The animations are reading live data and rendering them - so it's not a simple format, but can be represented by gltf well: the mesh models are static, but can appear and disappear and can have arbitrary transformations applied to them.

My vision is an exporter that exports each unique Geode exactly once, and everything else in the scenegraph exported each frame. That would work well for a wide range of OSG-based applications, it seems, and GLTF seems well-suited for this.

Jason Beverage

unread,
Feb 18, 2020, 5:01:19 AM2/18/20
to OpenSceneGraph Users
We have a gltf importer/exporter that we use in osgearth based on tinygltf.   It works really well although we're really only targeting gltf files produced to support rendering 3d tiles datasets.  So for example we havent done anything with animation since that's not a big part of 3dtiles.   Give it a look and see if you might be able to use it.

It's in the in development 3.0 version of osgearth here:  https://github.com/gwaldron/osgearth/tree/3.0/src/osgEarthDrivers/gltf

Jason

OpenSceneGraph Users

unread,
Mar 8, 2020, 11:43:37 PM3/8/20
to osg-...@lists.openscenegraph.org
Without looking at the source too closely, is there any reason why this couldn’t be included as an OSG plugin rather than an osgEarth plugin?

Kind regards,
Phil.

OpenSceneGraph Users

unread,
Mar 19, 2020, 5:29:28 PM3/19/20
to osg-...@lists.openscenegraph.org
OK, so I’ve gone a bit further with this, and have ported some core pieces of the glTF plugin from osgEarth into osg itself. It’s functional and I’d like to push this back to the core repo soon. Any particular process to follow for contributions like this?

Current work here: https://github.com/MozillaReality/OpenSceneGraph/tree/gltf-plugin

In terms of functionality, I’ve so far not ported the support provided by osgEarth for fetching glTF remote resources, i.e. it currently works only with local textures etc. This means that it doesn’t yet load b3dm files either, but I intend to add these capabilities soon.

Kind regards,
Phil.

Rob Spearman

unread,
Apr 20, 2020, 12:41:38 PM4/20/20
to OpenSceneGraph Users
I am also interested in fleshing out the GLTF plugin to be able to import animated models.

Has anyone made any progress on animation support starting with the osgEarth plugin?

Is anyone else wanting to collaborate on this? 

Rob


Reply all
Reply to author
Forward
0 new messages