Saving a project with imported meshes


I am creating a 3D interior home builder. I would be importing a set of meshes such as sofa, table etc., and changing it’s position, rotation and such features. I need an option to save the project so that I can open and continue later.

I planned to do this way:

  1. Keep track of imported meshes (the import URLs) in an array.
  2. While saving, get the position, materials and rotations of all imported meshes into that array.
  3. Store the array to database
  4. When retrieving, first import all the meshes from the array and then apply position, rotation and materials to each one of them.

Is this the correct approach? Or is there any other efficient way of doing so? Thanks!

It seems to me that the most simple and effective way is to use built-in function - scene serializer.

Example -
Similar forum thread - Save current state of a scene - in order to rebuild it later? - Questions - Babylon.js

1 Like