Disabling glTF __root__ node generation

When a glTF model is loaded into Babylon.js, a root node is created. I believe the purpose of this node is to transform from glTF’s coordinate space to the Babylon.js coordinate space.

For my use case, I don’t actually need the root node to be generated. I end up dealing with the glTF transform in a very specific way and the root node creates additional overhead. I’m having to find it, disconnect it, and dispose it. All of which is some extra complexity.

Is there a way to disable this root node generation? Possibly an option that could be added to the loader?

Sound like a good feature request to me.

In the meantime, you can get the root node without searching for it by giving SceneLoader.ImportMesh an onSuccess callback: https://playground.babylonjs.com/#WGZLGJ#8960.

1 Like