Modifying skeletons on body/clothing skinned meshes to "match"

This is similar to an earlier question I asked but this time, I was able to secure some public test assets and make a fiddle that hopefully explains what I am trying to achieve: Edit fiddle - JSFiddle - Code Playground

I have some rigged mesh bodies based on a bespoke skeleton. There are several versions - “standard”, “tall”, “short”, “wide” etc. Each one has the same skeleton that has been deformed to produce the desired result.

Then, there are several items of clothing that all use the same skeleton as the body. The clothing skeleton’s default state matches the “standard” body.

So, if I add the standard body and an article of clothing - a t-shirt for example, to the scene it looks correct. (Left example in the fiddle).

If I do the same operation with a wide body (right example in the fiddle), the shirt does not fit anymore and disappears into the body.

I have tried many many things to make it work - all without success. For the example, I boiled it down to just copying the position/scale/rotation of each bone in the clothing from the corresponding bone in the body.

That does indeed match the skeletons - you can see the skeleton helpers for both match - but makes no difference to the clothing.

Is this even possible (I am assured that it is) and if so, can someone point me in the right direction?

Hi @callum! Have you found the solution? Looks like I have similar challenge.

I’m afraid not - I ended up taking a wholly different approach.

I’ll be glad to know your approach if it possible of course. Because it looks like I am following your path and you could help me to avoid some mistakes. I’m working on character editor now and I also has different body shapes and my assets should be placed correctly on different types of body

well first of all, if wide body is not made wide by moving the bones but by moving vertices around* (and then bones were moved to match it) then you would have to edit the shirt too. second, you probably need object.skeleton.calculateInverses() instead of object.skeleton.update() - assuming you are copying the resting pose.

*edit: you can test this by copying wide body bone params into normal body bones, if the shape turns out to be the same - it was not an issue.

even if it was not an issue, the bones that make the body wide might have no effect on the shirt because the artist did not paint their weights in when making the shirt - then there is no way it can work, of course.