So I want to make automatic ragdoll generation system for all my enemies in my game, the assets are already made and have been paid for a while ago so I can't really ask the artist to change anything or generate some extra info, they are a variety of models (humans, robots, beasts) with a hard limit of 32 bones. Each bone is labelled and there is only a single mesh provided, which is skinned and ready to go.
I am trying to understand how an automated system can generate ragdolls from this. So far my idea involves convex decomposition (v-hacd?) to split up the mesh into small convex hulls and attach them using hinge and cone twist constrains (in bullet physics).
The idea sounds simple in my head but actually there are so many questions such as, how to do it automatically? how to make each convex hull be attached to a bone correctly? how to join the convex hulls with constraints in the correct place? the ragdoll would be generated from the bind pose, but how to transform the ragdoll so that it is perfectly aligned with the skeleton after its death animation?
I would very much appreciate some guidance on this, thanks.