How to serialize an entire imported GLTF model easily?

Hello, I want to serialize all meshes of an imported GLTF model and use them for another scene, the GLTF model has a lot of instanced meshes as well. Is there an easy way to do it without breaking the model?

Logically, the simplest way is just to use the same GLTF model for another scene.

Iā€™m concerned about the loading time performance of loading a GLTF model vs creating meshes based on the serialized data, is it faster to create many meshes from many serialized mesh data than loading using SceneLoader?

In normal conditions, after you imported the first model it will be in the browser cache. So the second import of the same model will be almost instant. It should be faster than a serialize-deserialize process.
You also may import your model from memory as blob - see docs Babylon.js docs

1 Like

Thank you for the quick replies! I somehow forgot about browser cache :sweat_smile:

1 Like