BABYLON.Mesh.MergeMeshes fails on merging __root__ mesh generated by GLB import

Hi

I imported glb mesh and tried to merge it. When enabling multiMultiMaterials error occurs at the following line when mergin root node generated by the GLB import. The root node is probably pure transformation node. Should this be reported or should I work around the issue?:

Error merging meshes:  Error: Positions are required
    at VertexData../Meshes/mesh.vertexData.ts.VertexData._validate (babylon.js?7deb:97375)
    at VertexData../Meshes/mesh.vertexData.ts.VertexData.merge (babylon.js?7deb:97288)
    at Function../Meshes/mesh.ts.Mesh.MergeMeshes (babylon.js?7deb:96866)
    at eval (SpaceView.vue?d935:106)
    at successHandler (babylon.js?7deb:54206)
    at eval (babylon.js?7deb:54233)

Best regards,
Tommi

Ping @bghgary fyi.

Would be great if you could create on pg per issue as it could help narrowing it down.

About 1. I agree that it should merge meshes and not pure transforms like the root node.

Hi

I separated the topics.

-Tommi

The __root__ is a mesh because of backward compatibility reasons. It should ideally be a transformNode, but doing that will break the API contract.

1 Like