detachable limbs

Started by
13 comments, last by amedlock 19 years, 9 months ago
How do I do this?
Advertisement
not just limbs, but stuff like guys getting chopped in half
need a lot more info to be helpful. what model format, what API?
"Let Us Now Try Liberty"-- Frederick Bastiat
I've been wondering what the best method for doing something like this is, myself. Say you have a solid SkinMesh, but want to allow a forearm to get blasted or cut off. Do you make an entirely new model missing that part? Not very flexible. Do you leave the parts disconnected? Visible cracks suck. Do you give each part of the body a different material ID, and dynamically change the mesh by removing and inserting faces (you would need to insert a bone / insides of the mesh).

I'm working on a zombie game, and I'm definitely going to have to allow some dismemberment :)
Well, physics wise (what I guess a3a2004 wants to know) I'd say you duplicate the node the limb is attached to.

If this is the arm (the uppercase O is the shoulder)

-O---o---o---

you duplicate the shoulder note

-O o---o---o---

so that the arm is a seperate unit.

As for the mesh, I'd suggest keeping the ones that are 'arm only' and 'body only' as the are and remove those that linked arm to body and replace them with some kind of 'flesh' face to close the respective mesh.

=====          ==\   /==--O--  -->     --o   o--=====          ==/   \==

Something like this :) Hope you appreciate my crappy attempt on ascii art [cool].

You'll have to find a way to store which faces are shared between limbs and which nodes are detachable...
How do I set my laser printer on stun?
.x and directx graphics (9).
u could model the mesh with cracks, but make sure the points on the seam use the same normals (so it doesn't look like there's a seam). this will be harder if the mesh uses welded normals, but it's still possible.

also, depending on how complicated u want to get, u could move the vertices that make up inside of the limb (the part u see only when the limb is severed) to the end of the vertex buffer, then when the limb is severed just render that many more vertices.
This is a pretty game specific question... Assuming your game is 3D with skinned characters, one way to do it is to have separate limb meshes (just a leg, just an arm, just a head, etc.) When a limb is severed, scale the root of the limb by 0, making it disappear on the main mesh, and then draw the detached version in it's place. The detached version can be moved anyway you'd like, for the best effect it would be a ragdoll, but it could use a canned animation also. It'd also be a good idea to have some blood spray from the wound (particle system.)

There are of course a million other ways you could do this. You could simply have static meshes for each possible lost limb, for example.
What about getting cut in any place and having the two halves slide off of each other? This couldn't be done with that method.
I think you would have to get very detailed to accomplish that. As in modeling as many possible splice types and having an inside for each one. Then just picking the closest match when a cut happens. You have to split at vertices, so I think it would be impossible to make it perfect. Edges of polygons run one way or the other. I don't see how you could make a diagnal-left slice AND a right. Not unless you used diamond shaped quads in your model, but then you can't do straight splits.

It could easily become a complicated mess :)

This topic is closed to new replies.

Advertisement