Facet Depth Sort and "updatable" meshes

Hi everbody,

I’m trying to understand how to use the “Facet Depth Sort” features as it is shown here


The crucial point when using this feature is that the mesh has to be “updatable”. When using the MeshBuilder, I can simply set this property to true. But I want to use this feature with mesh loaded from a file (obj, gltf, …). And so far I couldn’t figure out how to make such a mesh “updatable”. Can someone help me out here please :slight_smile:


By looking at the code on github, I was able to answer my own question:
Obviously there is the BABYLON.Mesh.markVerticesDataAsUpdatable(kind: string, updatable?: boolean): void method but that doesn’t do the trick in this case since the index data needs to be updatable. To achieve this, simple call mesh.setIndices(mesh.getIndices(), null, true); and you’re good.