Jump to content

[SOLVED] Need help with Ragdoll body


photo

Recommended Posts

Hello everyone,

 

I'm having a little trouble with body penetration with ragdolls. I enabled constant collision detection on the ragdoll capsules, but if the ragdoll gets hit by a rigid body that is moving quickly, they get stuck inside of the colliding body most of the time. I think the screenshot will speak for itself. How can I stop the ragdolls from doing that? (although it is hilarious.) Also I added a capsule shape with CCD to the front of the vehicle with no affect.

 

Thanks!

post-176-0-83243900-1321566075_thumb.jpg

Link to comment

The ragdoll should be constructed from the capsules with small mass difference. Ragdoll joints should have 4 or more number of iterations and maximal linear restitution with small linear softness. Moreover try to increase the FPS of physics. I will try to create sample with fast moving car with ragdolls.

What car speed do you use in the your scene?

Link to comment

Thanks for the quick reply frustum! using length(body.getLinearVelocity()) any velocity over about 15-20 chances were good the rag doll would penetrate into the vehicle mesh. After I made the following changes I was still getting the same problem although it improved.

1. Changed physics FPS from 60.0 to 90.0

2. Changed ragdoll balljoint iterations from 2 to 4

3. changed linear restitution to 1.0

4. changed linear softness to 0.1

 

However after I changed the Radius of the ragdoll capsule shapes from 0.08 to 0.35 the ragdolls seem to work much better, I have collided with the rag dolls moving 35 (using body.getLinearVelocity()) and no penetration happens! It looks like small shapes are not a good idea.

Link to comment

One more question to Unigine crew about ragdolls: we don't use 3dsmax Biped but custom skeleton with 58 bones. I tried creating ragdoll for this skeleton but it seems to be a nightmare - lots of parameters, plain bone list instead of hierarchy, completely incompatible script in /samples/physics/common/ragdoll.h.. I even don't know how to start and make my ragdoll fall instead of flying up. Is there some kind of automation for rag doll creation? I.e. calculation based on skin or rig just as in MotionBuilder?

Link to comment

Are you checking the latest version of ragdoll.h? It was changed in the latest SDK to make it more easily customizable.

 

There is an automatic generation tool, but automatically generated shapes and joints still need to be tweaked manually. It is not possible to create an ideal ragdoll automatically. That is why it is easier to customize ragdoll.h once and then churn out ragdolls whenever necessary. You just need to replace the names of bones with your customs ones.

Link to comment
  • 1 month later...

I cheked latest ragdoll.h.. Same hard-coded offsets, weights, etc. I see here something alike

create_body("Bip01 L Calf",0.22f,0.7f,4.0f,translate(0.0f,0.0f,0.66f));

but my non-biped skeleton don't have 'Calf' bone and I don't have a clue what is physical meaning of parameters radius=0.22f, height=0.7f, offset = translate(0.0f,0.0f,0.66f) and how to scale them for my skeleton..

Link to comment
  • 2 weeks later...

'Calf', 'Forearm' and others are basically placeholders for generic character rig. They need to be replaced with the names of bones you use in your skeleton.

 

This script approximates bones with capsule shapes, so the radius defines capsule width, while the height controls capsule length.

Offset parameter allows to tweak position of the capsule shape, in case it does not perfectly fit the bone position:

  • you can move the shape up/down along each of the axis or
  • rotate it (for example, it's required for feet as created shapes are oriented vertically by default).

Link to comment
×
×
  • Create New...