.babylon exporting - Issue with geometry

Howdy Ho!

Got some issues with the SceneSerializer.Serialize(scene), with some of the geometry not being properly exported (although in terms of hierarchy, the nodes are present).

Sometimes, the mesh appear either deformed or as if only a face was generated out of them.
Unlike this post, the model doesn’t have skeleton bones. Only basic 3D shapes.

None of the nodes is tagged as “doNotSerialize”.
Exporting it as a .babylon gives this faulty result: Download .babylon file

Exporting it as a .glb gives this normal result: Download .glb file
gives this output:

Exporting to .babylon (whether from the code, or from the .glb through the Sandbox) will give the faulty version.

Any idea if we’re missing something?
We did try using .SerializeAsync from the 5.0 preview.

Thank you!

Could you share a playground with a repro for it ?

Sorry, there’s a lot of code involved that can’t be reproduced in a playground.

BUT, my colleague had found the issue. Basically, some of the meshes have the same geometryId, thus’ why sometimes when duplicating meshes or modifying few properties, everything was in shambles.

So, whenever we import a 3D model, we assign uniqueIds for the geometryIds.

2 Likes