SceneSerializer.Serialize miss the childMeshes

Load the SceneSerializer.Serialize file(xxx.babylon) and getChildMeshes is empty.

Serialize and download :
https://playground.babylonjs.com/#PXERY0#13

Load scene:
https://playground.babylonjs.com/#5KGU9M

SceneSerializer.Serialize and load:

Hi, welcome to the forum!

Would you be able to reproduce this on the playground to be sure everything loads correctly and allow us to see the code in action?
That would help us to help you :slight_smile:

See the edited post.

There seems to be a collision between the two models. might be the fact that all materials and nodes are named (and id-ed) exactly the same.

Will it be possible for you to export those models with different names for the components and materials? We will check that internally as well, but I want to be sure this is the issue.

3 Likes

It is sure for the same at nameļ¼ˆand idļ¼‰of materials and nodes.

I assume you have tested with other models?

This should not happen. I am not sure if it happens during serialization or parsing, but we do need to address that. Could you submit the issue on our GitHub? we will make sure to deal with it soon.

1 Like

I have submitted the issue on GitHub (Load the SceneSerializer.Serialize file(xxx.babylon) and getChildMeshes is empty Ā· Issue #11382 Ā· BabylonJS/Babylon.js Ā· GitHub).

This is not happen if no collision between the models ( or rename the names and ids ). I have tested.

1 Like

Iā€™m having a look rn

3 Likes

I am happy that you beat me too it :slight_smile:

Hello,

I donā€™t know if it will help but i have the same bug when saving and loading a scene with 2 ā€œsameā€ meshes (with childmeshes)

PG to save : https://playground.babylonjs.com/#ZHMU3C#14

PG to load : https://playground.babylonjs.com/#67VZ89#6

Boris

And iā€™ tried with two ā€œsameā€ meshes called ā€œVolet Roulantā€ and ā€œVolet Roulant 2ā€ (sorry, iā€™m french :slight_smile: ) and the result is exactly the same.

Donā€™t be sorry to be French:) Iā€™m French too ;D

I have a fix coming right there: Fix #11382 by deltakosh Ā· Pull Request #11388 Ā· BabylonJS/Babylon.js (github.com)

1 Like

In a nutshell: the problem was that finding the correct parent only with id or name was not enough. My PR fixes the issue

Hello,

I think it does not work in the playground maybe because the issue is not still fixed on it.

PG to save : https://playground.babylonjs.com/#ZHMU3C#16

PG to load : https://playground.babylonjs.com/#67VZ89#7

Iā€™m not used to github. In my environment, can you tell me which js file has changed ?

I actually use https://preview.babylonjs.com/loaders/babylonjs.loaders.js

Thanks,

Boris

This is deploying as we speak it should be up in about 1 hour.

1 Like

Great, Thank you !!!

Ok, now it works but i had to save my scene again before trying to open it again.