Load a gltf with only a skeleton and add scene meshes to it (no skineedMesh)

Hi guys. I’m trying to load a gltf with only one skeleton with animations and attach some meshes in the scene to different bones of the skeleton. is this possible? The meshes dont need to be skinned meshes because I don’t need to animate vertices for now.

Thanks in advance!

Here is something that might be related. I load the model (it already has a skinned mesh), but I also manually add a sphere to one of the foot bones. This is then used to calculate and visualise a collision boundary.

image

My demo is more than you are asking for, but it shows that Bones are Object3Ds, so that means you can add another Object3D to them.

With a little bit of extra code, in my traverse,

if ((child as THREE.Bone).isBone) {
    child.add(
        new THREE.Mesh(
            new THREE.SphereGeometry(5),
            new THREE.MeshNormalMaterial({ wireframe: true })
        )
    )
}

I can add spheres to each bone, and they will stay attached when the model animates.

Of course, you will need to put in a lot more work to make it functional and presentable the way you need it.

1 Like

Hi @seanwasere. Its working. I can attach meshes and Objec3D to bones of the skeleton.