About Store Forum Documentation Contact



Post Reply 
I am fed up with ragdoll problem
Author Message
Seba Offline
Member

Post: #16
RE: I am fed up with ragdoll problem
Hi,

Don't post anything for quite some time. I created application to test ragdoll. You can manipulate actor and joint parameters and switch into simulation mode. If have some time test it, submit errors if found any. Maybe shared some settings if found some good one. I want to improve it so any ideas will be helpfull. Instruction in README file.

https://github.com/josema-dev/RagdollEE
(This post was last modified: 12-22-2021 10:59 PM by Seba.)
10-12-2021 09:14 PM
Find all posts by this user Quote this message in a reply
Zervox Offline
Member

Post: #17
RE: I am fed up with ragdoll problem
So I've been messing around with this lately, for the ones compiling the engine themselves.

Joint.cpp
CreateHinge inside of if(PxRevoluteJoint *hinge=PxRevoluteJointCreate body
Code:
if (body)
{
   hinge->setConstraintFlag(physx::PxConstraintFlag::ePROJECTION, body);
   hinge->setConstraintFlag(physx::PxConstraintFlag::ePROJECT_TO_ACTOR0, body);
   hinge->setProjectionLinearTolerance(10.00f);
   hinge->setProjectionAngularTolerance(DegToRad(10));
            
}

and CreateSpherical inside of if(PxD6Joint *spherical=PxD6JointCreate) body
Code:
if (body) {
   spherical->setConstraintFlag(physx::PxConstraintFlag::ePROJECTION, body);
   spherical->setConstraintFlag(physx::PxConstraintFlag::ePROJECT_TO_ACTOR0, body);
   spherical->setProjectionLinearTolerance(10.00f);
   spherical->setProjectionAngularTolerance(DegToRad(10));
}

I think it would probably be better with a separate bool for projection and velocity/angular settings.

in Ragdoll createTry
Code:
REP(T.bones()) {
             bone(i).actor._dynamic->setMaxDepenetrationVelocity(0.1);
             bone(i).actor._dynamic->setSolverIterationCounts(16, 8);
         }
before
Code:
// ignore
REPA(T)

Has helped stabilize it immensely, atleast it isn't exploding anymore(flying everywhere), and it doesn't seem to leave a super jittery popping on the neck/head bones, still not quite happy with it but atleast right now it is somewhat usable.
(This post was last modified: 12-04-2021 06:59 AM by Zervox.)
12-04-2021 06:58 AM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #18
RE: I am fed up with ragdoll problem
Thanks for your efforts Zervox, it would be really awesome if people contribute to the source code smile
12-05-2021 01:48 PM
Find all posts by this user Quote this message in a reply
Seba Offline
Member

Post: #19
RE: I am fed up with ragdoll problem
If you use warrior character from EE or character with similar skeleton, you can try to disable create ragdoll from neck it gives me much cleaner results.

You can also try ragdoll editor to check different parameters (create ragdoll from neck is disabled):
https://github.com/josema-dev/RagdollEE
12-25-2021 11:39 AM
Find all posts by this user Quote this message in a reply
tipforeveryone Offline
Member

Post: #20
RE: I am fed up with ragdoll problem
A person named 'jsmgamedev' did try to fix ragdoll problem of Esenthel, and it works so good after the fix.

Here is the demonstration video: https://streamable.com/z8okoo

And here is the github page of jsmgamedev: https://github.com/josema-dev/EsenthelEn...dollJoints

I think Greg should merge this fix to current development branch of engine for the next update of stable binary version of the engine

Please! smile
01-05-2022 10:28 AM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #21
RE: I am fed up with ragdoll problem
Oh wow, that looks promising smile
Thanks everyone! I'll take a look soon!
01-05-2022 10:40 AM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #22
RE: I am fed up with ragdoll problem
I've just submitted some changes to github, as combination of Zervox and Seba commits.
Let me know how it works.
It's not perfect, but works better.
01-05-2022 06:11 PM
Find all posts by this user Quote this message in a reply
tipforeveryone Offline
Member

Post: #23
RE: I am fed up with ragdoll problem
I like how the ragdoll falls in this build, looks really like a soft body, but sometime character arms still dancing and unstoppable moving around. still need improvement I guess.

Here are other videos to compare:
Seba's ragdoll:
https://streamable.com/1noca4

New devel branch ragdoll
https://streamable.com/0kjstr

Seba's one maybe not good as Devel one on falling but there is no dancing joints

After playing with physic material setting and ragdoll.vel() I see the problem is only at arms, with a good Angular damping, I can make it a little better. please fix the arm problem and it will be perfect!
(This post was last modified: 01-05-2022 09:10 PM by tipforeveryone.)
01-05-2022 08:37 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #24
RE: I am fed up with ragdoll problem
Just updated github with improved ragdoll again. You can try.
01-06-2022 08:29 AM
Find all posts by this user Quote this message in a reply
tipforeveryone Offline
Member

Post: #25
RE: I am fed up with ragdoll problem
Finally, ragdoll has an evolution! Thanks you guys all!

https://i.gyazo.com/54b35a87f8f5b48ba81b...4b055a.png
01-07-2022 07:48 AM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #26
RE: I am fed up with ragdoll problem
grin
01-07-2022 11:58 AM
Find all posts by this user Quote this message in a reply
Post Reply