Hi!
I’m loading a GLB model optimized with gltfpack.
I load the model; geometry, animations, etc. everything is fine. But when I try to change the material the mesh appears grey.
This is the way I’m changing it
gltf.scene.traverse( (m) => {
if (m.type == 'Mesh' || m.type == 'SkinnedMesh') {
switch (true) {
case model.name == 'Sofia':
m.material = SofiaMaterial
break;
}
}
}
This way works with models withouth gltfpack optimization.
Any help?