Can I pull which UV index a GLTF mesh is using?

Sorry, I can’t share the GLTF, but we’ve exported a model in which we’ve assigned different meshes to two UV maps. If I load this in a playground, I can assign a texture to a mesh in UV map #2 and set the coordinate index on that texture. But what I want is to poll the GLTF meshes themselves to find out WHICH meshes are assigned to WHICH UV map as they were exported. Is this possible? I don’t see anything like that on the mesh objects themselves.

adding @bghgary

1 Like

Figured it out by looking at the Inspector. You can poll meshes based on:

const index1 = scene.meshes.filter(m => m.isVerticesDataPresent("uv2"))

1 Like

You can avoid using a literal string with BABYLON.VertexBuffer.UV2Kind

1 Like