Jump to content
• Advertisement

detachable limbs

This topic is 5101 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How do I do this?

Share this post

Share on other sites
Advertisement
not just limbs, but stuff like guys getting chopped in half

Share this post

Share on other sites
need a lot more info to be helpful. what model format, what API?

Share this post

Share on other sites
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 :)

Share this post

Share on other sites
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...

Share this post

Share on other sites
.x and directx graphics (9).

Share this post

Share on other sites
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.

Share this post

Share on other sites
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.

Share this post

Share on other sites
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.

Share this post

Share on other sites
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 :)

Share this post

Share on other sites

• Advertisement
• Advertisement

• Popular Contributors

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5
• Advertisement

• 14
• 12
• 9
• 12
• 37
• Forum Statistics

• Total Topics
631434
• Total Posts
3000050
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!