Hi I am new to physics simulation.
I saw the ragdoll demo under Bullet engine and it is very interesting. However, after my changing the bounding shape from Capsule to Bounding Box, sometimes, I got the correct Ragdoll effect while some times one or two of characters may show some wired actions such as fly away.
I change the bounding box as following code: basically, capsule is along Y axis so my transformation is that
halfX = r
halfY = height / 2 + r
halfZ = r.
Could anyone tell me why I have to choose capsule (or convex mesh) and box is not correct?
Btw, could anyone recommend some papers or books for Ragdoll? I checked wiki but statement is too simple and just some terms there.
Thanks a lot in advance.
BoudingShape for RagDoll demo
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: BoudingShape for RagDoll demo
It might be that the boxes/collision shapes inter-penetrate and that causes instability. Can you try to make the boxes smaller, or disable collisions between them?
Which constraints are you using for the ragdoll? We just fixed a constraint limit issue with the btGeneric6DofConstraint, that might help.
These are good reads on constraints and rigid body dynamics:
Erwin
Which constraints are you using for the ragdoll? We just fixed a constraint limit issue with the btGeneric6DofConstraint, that might help.
I'm working on a book on real-time rigid body dynamics, and it will include more information on ragdolls. Do you have specific questions?Btw, could anyone recommend some papers or books for Ragdoll? I checked wiki but statement is too simple and just some terms there.
These are good reads on constraints and rigid body dynamics:
- Very good book (pdf/thesis) for starters:
Helmut Garstenauer, A Unified Framework for Rigid Body Dynamics - Joint section (page 60 onwards) of Kenny Erleben's book:
"Stable, Robust, and Versatile Multibody Dynamics Animation", ftp://ftp.diku.dk/diku/image/publicatio ... 050401.pdf
Erwin
-
- Posts: 13
- Joined: Tue Mar 18, 2008 1:08 am
Re: BoudingShape for RagDoll demo
Hi Erwin,
Thanks a lot for your reply!
2. I disabled the collision when building the constraints, such as:
m_ownerWorld->addConstraint(m_joints[JOINT_PELVIS_SPINE], false);
// original one is
m_ownerWorld->addConstraint(m_joints[JOINT_PELVIS_SPINE], true);
The ragdoll effect is very stable now. While some other problems coming, the legs and arms will be spread on the floor.
No. I did not use the btGeneric6DofConstraint. I just modified the standard RagDoll demo inside bullets with project name as appRagdollDemo. And there was no btGeneric6DofConstraint defined. Only btHingeConstraint and btConeTwistConstraint were defined inside.
I don't have any specific questions. I just hope to have some basic tutorial while I did not find much with google. I will try to access those materials. thanks a lot for sharing.
Thanks a lot for your reply!
1. I tried to make boxes smaller, for example: halfExtents.setValue( radius * 0.5, (height / btScalar(2.0) + radius) * 0.5, radius * 0.5); but still very unstable. If I also tried to minus 0.02 and 0.025 for each halfExtent, still very unstable. And for 0.025, some part of body even disappears. And no ragdoll effect at all.Erwin Coumans wrote:It might be that the boxes/collision shapes inter-penetrate and that causes instability. Can you try to make the boxes smaller, or disable collisions between them?
2. I disabled the collision when building the constraints, such as:
m_ownerWorld->addConstraint(m_joints[JOINT_PELVIS_SPINE], false);
// original one is
m_ownerWorld->addConstraint(m_joints[JOINT_PELVIS_SPINE], true);
The ragdoll effect is very stable now. While some other problems coming, the legs and arms will be spread on the floor.
Which constraints are you using for the ragdoll? We just fixed a constraint limit issue with the btGeneric6DofConstraint, that might help.
No. I did not use the btGeneric6DofConstraint. I just modified the standard RagDoll demo inside bullets with project name as appRagdollDemo. And there was no btGeneric6DofConstraint defined. Only btHingeConstraint and btConeTwistConstraint were defined inside.
I'm working on a book on real-time rigid body dynamics, and it will include more information on ragdolls. Do you have specific questions?
These are good reads on constraints and rigid body dynamics:
- Very good book (pdf/thesis) for starters:
Helmut Garstenauer, A Unified Framework for Rigid Body Dynamics- Joint section (page 60 onwards) of Kenny Erleben's book:
"Stable, Robust, and Versatile Multibody Dynamics Animation", ftp://ftp.diku.dk/diku/image/publicatio ... 050401.pdf
Hope this helps,
Erwin
I don't have any specific questions. I just hope to have some basic tutorial while I did not find much with google. I will try to access those materials. thanks a lot for sharing.
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: BoudingShape for RagDoll demo
vagr wrote:1. I tried to make boxes smaller, for example: halfExtents.setValue( radius * 0.5, (height / btScalar(2.0) + radius) * 0.5, radius * 0.5); but still very unstable. If I also tried to minus 0.02 and 0.025 for each halfExtent, still very unstable. And for 0.025, some part of body even disappears. And no ragdoll effect at all.
Try to avoid too small objects, sizes of objects should be larger then 0.2 units (try to keep units in meters) in any direction.
2. I disabled the collision when building the constraints, such as:
m_ownerWorld->addConstraint(m_joints[JOINT_PELVIS_SPINE], false);
// original one is
m_ownerWorld->addConstraint(m_joints[JOINT_PELVIS_SPINE], true);
The ragdoll effect is very stable now. While some other problems coming, the legs and arms will be spread on the floor.
Ah, good to hear your ragdoll simulation is more stable now. There is also a GenericJointDemo that shows ragdolls, but if your current ragdoll model is working fine just stick with that.
Thanks,
Erwin