BABYLON.GLTF2Export related aspects

Hi there, good people of the forum:

For a project we’re developing at the moment, involving the BABYLON.GLTF2Export functionality, we’re wondering if it is available out-of-the-box (can’t find a lot of this exporter in docs or the web):

  1. to export only specific meshes in the scene;
  2. to overwrite/rewrite the exported file, in order to keep the same name while avoiding the population of the “downloads” folder with successive annoying (suffixed with a number) files

Thanks for your time.


  1. Yep, there are ways of excluding certain elements from export, see: glTF Exporter | Babylon.js Documentation
  2. I’m a bit confused on what “same name” means here. Do you mean changing the file name? That’s possible too. Or do you mean changing something inside the generated file? Since the GLTF format is a defined standard glTF™ 2.0 Specification ( that’s also possible too.

Hi there, @carolhmj:

First, thank you for your immediate response. I’ll take a closer look to the docs.

About the same name, I’d like to overwrite the same file (same name) again and again, that is, calling BABYLON.GLTF2Export.GLBAsync(scene, assetName) white the same assetName, but not having then a series of files: assetName(1).glb, assetName(2).glb, …

Is there any way to “overwrite flag” that let me do that or I need to delete first the previous assetName.glb file?

Best regards.

Ooooh, I see! This behavior is controlled by the browser/file system, so nothing we can do there unfortunately :frowning:

Hi there, @carolhmj:

Yes, certainly I see that is a security aspect not allowing to overwrite nothing in download folder.

In that case, we’ll need to live with the “name of file plus a random number suffix” approach.

Thanks for your time.

Hi there, @carolhmj:

Another question I’d like to ask you, related with this same subject, once it’s clear that working with local folders is avoided in order to not mess with security issues: How can I manage to upload the gltf/glb data (file I mean) to a public web server location? Is it in fact even possible?

Thanks for your time.

You mean, if it’s possible to upload GLTF/GLB to a file server? That’s possible yes, we use Github a lot for it here: Using External Assets In the Playground | Babylon.js Documentation (

1 Like