# Character Joint Breaks

Maybe I just don’t see something obvious here, but if I wanted to break a joint from a character joint tied to a mesh, is there a way to make the arms / legs / whatever come off without the annoying stretching of the original mesh to the body part?

Ive tried a bunch of things but nothing successful.

Thanks!

Long answer: yes, but the character mesh must be designed for it. All the ragdoll system does is give rigidbodies to the transforms that represent the bones; if you move these manually, you can see the same stretching effect. With that mesh, there’s really no way you can get rid of that effect.

It’s possible to build a mesh that doesn’t stretch (by having segmented-off arm segments), but they are almost never made like this because during normal animation it looks terrible. you could have two separate meshes (one for normal animation, one for when it’s split up) though really it’s probably not worth it.

You have to ensure that the vertex in where the shells meet have coincident vertex position, coincident bones influencing it and coincident weight deformation, so normal animation always calculate the same for coincident vertex in both shells.

.org

Ok well im not using animation, only the physics engine- so you’re saying I would have to build my character mesh so that its made of different pieces, and then wtf for the bones? haha!

You mean like make a model where each piece of the body is actually separate, but the connecting parts overlap each other in 3d space? How can I find information about the definition of a coincident vertex…or how to model that.

=-=-=-=-=-=-=-=-==

You have to ensure that the vertex in where the shells meet have coincident vertex position, coincident bones influencing it and coincident weight deformation, so normal animation always calculate the same for coincident vertex in both shells.

He means say take the wrist… you’ve got one segment of vertices going around it that define the polys for the forearm and the hand. Split those into two meshes and if you’re arm was say 8 segments around (8 verts) it will now be 16 verts and those verts will be coincident because the verts from the now forearm->hand edge lie in exactly the same space as the hand<-forearm edge ones. Weight all 16 verts exactly the same to the same bones and they won’t gap when animated, but it will affect any smoothing look which is generally why segmenting is less than desireable for characters.

Ahh… interesting.

So is what you’re saying basically another way of just taking say- a ragdoll, and having a separate mesh for each body part?

I’ve even thought of on breaking, replacing the arm or leg with an arm or leg rigidbody , and then moving the original inside the body to hide it… not sure if that would be easier, but I’m better at scripting than with modeling =)

Essentially something like that… wherever you’d want to be able to break the limb off is where you’d do it.

I also believe I’ve heard that one engine’s solution is to scale the broken bone(s) to something extremely tiny and then possibly tuck them away in the parent of the one that broke. As long as the verts scale with the bone, that should be possible too.

oooo interesting, scaling and tucking - id like to try that. I heard that scaling can have have a dramatic affect on performance, do you think thats true? or If you scale it down enough will it not matter? I would like to experiement with whatever you guys suggest and post back here, but I thought I would get my theory right before I devote all my time to it =)

I have no idea… I don’t see why a scale transform would have any more impact on performance than a translation transform, especially seeing as how it would only be done once when the break occurs, but I don’t know. Perhaps if the scale had to be applied for every frame from that point on to retain the new look, then I could see the impact. I’d be interested to find out what solution you go with and how it turns out, or if trying several which worked best.