Hi, I try to change clothes to a ReadyPlayer Character1 from another ReadyPlayer Character2.
Clothes are skinnedMesh childs of characters.
Boths characters were imported completed with skeleton with Blender in glb format.
We added three Mixamo animations to character1 and they work well before change clothes.
Both characters naturally have same skeleton so I used as example below:
child.geometry = child2.geometry.clone(); // the geometry clothes of character2 to change
child.geometry.needsUpdate = true;
child.material.skinning = true;
child.material = child2.material.clone();
child.material.needsUpdate = true;
This the weird result:
We try already to blend after change child with this code:
child.add( skeleton.bones[ 0 ] ); // the rootBone (hips)
child.bind( skeleton );
We try to re-skinnedMesh child but glb crash:
mesh = new THREE.SkinnedMesh( child.geometry, child.material );
mesh.add( skeleton.bones[ 0 ] );
mesh.bind( skeleton );
We try to re-parent bones but without success.
We tried to light a candle in the church but without success!
Where is the problem? The skeleton is the same for both characters and names of bones are the same for both geometries.
The uuii of changed geometry is correct on bones.
SkinIndex and weightIndex are present on child geometry after change of clothes.
Without animations all work good but with animations the skeleton helper show that skeleton follows animations well but mesh doesn’t (like in photo). Some ideas?