# How to serialize (save) part of scene

**URL:** <https://forum.babylonjs.com/t/how-to-serialize-save-part-of-scene/12879>\
**Category:** Questions\
**Created:** [July 27, 2020, 12:52pm UTC](https://forum.babylonjs.com/t/how-to-serialize-save-part-of-scene/12879 "2020-07-27T12:52:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dnrn](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dnrn/32/4723_2.png) [@dnrn](https://forum.babylonjs.com/u/dnrn)\
**Post date:** [July 27, 2020, 12:52pm UTC](https://forum.babylonjs.com/t/how-to-serialize-save-part-of-scene/12879/1 "2020-07-27T12:52:52Z")

</div>

I am working on a simple online editor, where it’s possible to compose a simple scene. The scene is then saved and saved on our server, and it’s possible to show the cool 3D scene on a web page. So far so good…

Our problem is we do not wont to serialize the hole scene only part of it. We have a grid and different cameras in the “editor”.

We have collected all the imported meshes in a TransformNode (content), but there seems to be a problem when we try to serialize the content:

```
SceneSerializer.SerializeMesh(content, true, true)

```

One of our meshes is composed of two meshes, the problem is the child meshes parent is null after it’s serialized.

What is the best way to serialize part of a scene and load in another scene? Is there another way to accomplish this?

[UPDATE]  
Here is a link to a playground that shows my problem:  
[https://playground.babylonjs.com/#NV6ZNQ#2](https://playground.babylonjs.com/#NV6ZNQ#2)

After a bit more inspection it seems my problem is that SerializeMesh does not serialize the hole mesh three?

Later on we might have multiple root meshes, like a duck and flamingo. It would be nice to create a single .babylon file with both meshes.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [July 27, 2020, 2:08pm UTC](https://forum.babylonjs.com/t/how-to-serialize-save-part-of-scene/12879/2 "2020-07-27T14:08:42Z")

</div>

Adding @Drigax FYI

@dnrn would be great if you could share a quick playground ? as it would definitely help to troubleshoot faster

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [July 27, 2020, 2:47pm UTC](https://forum.babylonjs.com/t/how-to-serialize-save-part-of-scene/12879/3 "2020-07-27T14:47:14Z")

</div>

You can call scene.serialize() and just before set mesh.doNotSerialize= true on the meshes you want to ignore

---

<div class="post-metadata">

**Author:** ![dnrn](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dnrn/32/4723_2.png) [@dnrn](https://forum.babylonjs.com/u/dnrn)\
**Post date:** [July 27, 2020, 2:50pm UTC](https://forum.babylonjs.com/t/how-to-serialize-save-part-of-scene/12879/4 "2020-07-27T14:50:42Z")

</div>

Badabum!  
This is exactly what I’m looking for!!
