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.