• Home
  • Products
    • Game Engine
      • Base
      • Mathematics
      • Geometry
      • Physics
      • Particles
      • Animation
      • Graphics
      • Game
      • Game UI
    • Windows Forms
      • Docking Windows
      • Text Editor Control
  • Downloads
  • Buy
    • Overview
    • Professional
    • Indie
    • Non-Commercial
  • Support
    • Overview
    • Blog
    • Forum
    • License FAQ
    • Documentation
  • About
    • About Us
      • Services
    • Contact Us
    • Press
    • Legal Terms
      • Imprint (English)
      • Imprint (German)
Select the search type
 
  • Site
  • Web
Search
DigitalRune.com
Login |Register
NEWS News RSS Feed BLOG Blog RSS Feed FORUM News RSS Feed DOCUMENTATION DigitalRune Software on YouTube DigitalRune Software on Twitter
You are here: SupportForum

If you want to contribute to the forum discussions, please Register or Login.

SearchHome
  • 1
  • 2
  • 3
  • 4
  • 5
HomeHomeDigitalRune Sof...DigitalRune Sof...Game EngineGame EngineDealing with ragdoll samplesDealing with ragdoll samples
Previous
 
Next
New Post
12/12/2011 2:07 PM
 
awsdib
No Ranking

Joined: 12/12/2011
Posts: 12
Dealing with ragdoll samples 

hello

is there any way i can prevent the "PassiveRagdollSample" from falling
i want to show the Ball-hit result while it standing

thanks for help.

 
New Post
12/13/2011 9:25 AM
 
HelmutG
6th Level Poster

www.digitalrune.com
Joined: 10/15/2006
Posts: 565
Re: Dealing with ragdoll samples 

Hi,

Do you want to achieve
A) the character stands upright, gets hit and falls to the floor, or
B) the character stands upright, gets hit, reacts and the gets back to upright?

Achieving B) is possible but a lot more difficult. Let us know if you want to do B. But hopefully you want to achieve A ;-)

For A):

Start with a Ragdoll with disabled joints, limits and motors:

_ragdoll.Pose = _pose;
_ragdoll.UpdateBodiesFromSkeleton(_skeletonPose);
 _ragdoll.DisableJoints();
_ragdoll.DisableLimits();
_ragdoll.DisableMotors();

and in each frame call:

_ragdoll.UpdateBodiesFromSkeleton(_skeletonPose);

to move the bodies to upright or animated skeleton position.

Then once you have detetected a hit (similar to the CollisionDetectionOnlyRagdollSample), switch to the passive ragdoll:

_ragdoll.EnableJoints();
_ragdoll.EnableLimits();
foreach (RagdollMotor motor in _ragdoll.Motors)
{
  if (motor != null)
  {
    motor.Mode = RagdollMotorMode.Constraint;
    motor.ConstraintDamping = 5;
    motor.ConstraintSpring = 0;
  }
}
_ragdoll.EnableMotors(); 

and in each frame call

_ragdoll.UpdateSkeletonFromBodies(_skeletonPose);

That means: First the skeleton controls the bodies. After the hit the bodies control the skeleton.

 
New Post
12/13/2011 5:56 PM
 
awsdib
No Ranking

Joined: 12/12/2011
Posts: 12
Re: Dealing with ragdoll samples 
Thanks a lot i'll try it.
 
New Post
12/13/2011 6:56 PM
 
Nelxon
No Ranking

www.nelxon.com
Joined: 12/3/2010
Posts: 29
Re: Dealing with ragdoll samples  Modified By Nelxon  on 12/13/2011 7:57:34 PM

I was looking more for Option B...

Best of example would be a boxing game, in which the boxer reacts to the force of each punch...

--- > apply force of impact, react (partial rag doll), once reaction complete blend back to fighting stance.

UNLESS  the force of impact is greater than the boxer's threshold which would knock the boxer down into full ragdoll.

Would that be hard to achieve?



Nelxon! ::.. Artist, Animator, Programmer, Game Developer..::
 
New Post
12/14/2011 11:22 AM
 
HelmutG
6th Level Poster

www.digitalrune.com
Joined: 10/15/2006
Posts: 565
Re: Dealing with ragdoll samples 

Option B is possible - but it needs some more experience with physics, physics constraints and parameter tuning.

Ragdoll motors come in two kinds:
Velocity motors simply set the linear and angular velocities of the bodies in each frame to move the bodies to the target positions. If such motors are used, the ragdoll follows the target animation very closely, and the ragdoll is kept upright.
Forces and impacts acting on the bodies have minimal impact because the velocity motors override the bodies'  velocities in each frame.

Constraint motors use physics contraints (like QuaternionMotors) to control the relative orientation of the bodies. This is used in the ActiveRagdollSample. Since only the relative orientation is controlled, the ragdoll falls to the floor but keeps playing the animation. Bodies controlled by constraints react to impacts.

If you want your character to react to impacts but still stay upright and keep playing an animation, then usually the lower body is controlled by velocity motors and the upper bodies is controlled by constraint motors. That means, the lower body does hardly react to impacts and keeps the whole body upright in world space. The upper body can react to constraints - but it is hard to tweak the ConstraintDamping and ConstraintSpring so that the upper body is stable. It can happen that the upper body follows the target animation only very sluggishly or that it jitters a lot.
It could be necessary to add additional constraints to stabilize the upper body, e.g. some soft BallJoint constraints that pull critical joints (maybe hands, shoulders, head) to the target animation positions.

It is also important that ragdoll joints and limits do not contradict the desired movement. This could also lead to instability.

So, option B can be done - but could be a bit painful to implement ;-)

 
New Post
12/14/2011 11:52 AM
 
Nelxon
No Ranking

www.nelxon.com
Joined: 12/3/2010
Posts: 29
Re: Dealing with ragdoll samples 

Thanks, Great explanation.

I have been using  a similar approach like the one explain above, so I guess I'm on the right track.


Nelxon! ::.. Artist, Animator, Programmer, Game Developer..::
 
New Post
12/15/2011 4:40 PM
 
awsdib
No Ranking

Joined: 12/12/2011
Posts: 12
Re: Dealing with ragdoll samples 

Another question please

As you can notice in that sample witch you can move it's arm or leg using numpad numbers there is no real constraints for that movement
i mean you can move it any way you like without realistic

I need to such constraints for that in the passive sapmle

 
New Post
12/15/2011 5:34 PM
 
HelmutG
6th Level Poster

www.digitalrune.com
Joined: 10/15/2006
Posts: 565
Re: Dealing with ragdoll samples 

I am not sure if I understood your question. I assume you want to have constraints (rotation limits) for the IK solver samples?

The physics constraints (as used in the passive ragdoll sample) are not yet integrated in the IK solvers.
The LookAtIKSolver and the TwoJointIKSolver have properties to define rotation limits.
The ClosedFormIKSolver does not support rotation limits.
The CcdIKSolver and the JacobianTransposeIKSolver have a property LimitBoneTransforms, where you can specify a delegate method that applies rotation limits. In this delegate method you have to manually check for invalid rotation angles and correct them.

If you want to avoid unrealistic IK solver results, I recommend to keep the IK target within a certain range where the IK solver produces good results.

I hope this is the information you are looking for ;-)

 
New Post
12/16/2011 12:51 AM
 
awsdib
No Ranking

Joined: 12/12/2011
Posts: 12
Re: Dealing with ragdoll samples 

I am sorry i re-read my last reply and i figured out that i didn't  explain well ...

you know that real arm can rotate in limited angle  i mean you cannot  move it hard to the back..... "arms - legs - head etc..."

and that constraint is not implemented in the IK sample however i need it to be implemented in the passive sample.
if is not i need to know how to add these constraints to that sample so it gets more realistic .

thanks again :)

 
New Post
12/16/2011 9:07 AM
 
HelmutG
6th Level Poster

www.digitalrune.com
Joined: 10/15/2006
Posts: 565
Re: Dealing with ragdoll samples 

Sorry, I am still not sure what you are asking for.

Do you want to add constraints to an IK solver? Do you want to add an IK solver to the passive ragdoll sample? Do you want the passive ragdoll arm to reach for something?

 
 Page 1 of 4
1234Next 
Previous
 
Next
HomeHomeDigitalRune Sof...DigitalRune Sof...Game EngineGame EngineDealing with ragdoll samplesDealing with ragdoll samples


DigitalRune is a trademark of Garstenauer Information Technology OG.

Garstenauer Information Technology OG
Weingartenstrasse 35, 4452 Ternberg
Austria (EUROPE)
office@digitalrune.com

Home Products Downloads Buy Support About Us
Game Engine Particles Windows Forms Professional Blog Services
Base Animation Docking Windows Indie Forum Contact Us
Mathematics Graphics Text Editor Control Non-Commercial License FAQ Press (News)
Geometry Game Documentation Legal Terms
Physics Game UI Imprint
Impressum
Copyright © 2006-2012 Garstenauer Information Technology OG Terms Of UsePrivacy Statement