Imported meshes appear broken if they have the same geometry uniqueId

Hi,
i noticed that when i load two models serialized in the .babylon format (with babylonjs 5), if the meshes has the same geometry uniqueId in the own .babylon file, at the second imported mesh is assigned the geometry of the first imported mesh and appears broken.

The geometry data of the second mesh are anyway loaded in the scene gemometries list.

This behaviour not occurs with the meshes serialized with babylonjs 4 which does not export the geometry uniqueId.

I created these playgrounds to show this behavior:

Import meshes serialized with babylon 5:
https://playground.babylonjs.com/#MVCM5J#1

Import meshes serialized with babylon 4:
https://playground.babylonjs.com/#MVCM5J

Serialized scene:
https://playground.babylonjs.com/#6XIT28#3000
https://playground.babylonjs.com/#WIR77Z#1567

Thanks in advance!

@carolhmj same as the texture last time, if it does not seem to be related to the latest changes, let me know and I ll assign it to me :slight_smile:

PR merged, will be on next version :slight_smile: Clear some values used during loading at the end of the load by carolhmj · Pull Request #12946 · BabylonJS/Babylon.js (github.com)

1 Like

Hi @carolhmj, thank you very much :smiley:

1 Like