TOKAMAK ( ragdoll ) Question

Started by
6 comments, last by dirtysanchez 14 years, 12 months ago
Gents, i have finally made a Ragdoll in my Tokamak Opengl App. The goal is to move around a flat surface with the ragdoll without allowing it to 'fall' under physic influences. I've seen a video on the Youtube where some coder runs with his ragdoll around and it 'runs the physic' when something hits him - then the ragdoll realistically falls down. The question is, how to achieve that - anyone have ever tried that before? i would like to move smoothly with my ragdoll but let it 'fall down' when 'required' not all the time due to the gravity + physic enviroment... Please help
Xynapse | http://szczerbiec.net/
Advertisement
There are two states for the ragdoll to be in:

Keyframed: Entirely animation driven, very efficient, no physical integration or collision detection is performed.

Physically Simulated: Entirely physically driven. Animation is achieved by powering the joints of the ragdoll.

So when you're just walking around you're in keyframed, if things hit you they will just bounce off. but the moment a critical hit is detected, the ragdoll is snapped to your current kinematics and dynamics.

In the physically simulated state, there is often a "strength" factor to control how much influence the animation has over the ragdoll. A strength of 1 means the ragdoll is absolutely driven to the desired pose. Where a strength of 0 is completely compliant and lifeless.

The videos you've watched are from a product called Morpheme and it's the ultimate top of the line animation system. It includes a customizeable behavior framework as a state machine for controlling the ragdoll power. Some behaviors are very advanced such as "balance" which will actually generate foot placements which will prevent the character from falling. It's essentially procedural animation, in real time, interacting with the physical environment.

Good luck! :P
The video i watched was not even an 'advanced' engine:




Tokamak ragdoll - entering physical state when falling.


So the question is then,

if a ragdoll is not under physical influence (it is disabled) - how am i able to retrieve the collision data from the physical engine?

As for now i can get callbacks from objects colliding with my ragdoll but i cannot find any idea how to 'enable' the physic when needed (when something hits me, when i need to fall down).

I understand your post this way:

1) Disabled physics on ragdoll when in 'walking mode'
2) Enabled when event occurs (collision/....)

In Tokamak - if i disable the physics on my ragdoll i can't get updates regarding collisions, the worst thing - when disabled, RigidBody does not collide with rest of the world at all..


I'm trying to figure out how did that guy (video) made it.


Any suggestions?
Xynapse | http://szczerbiec.net/
You dont want to disable it, as you've seen. You want to put it into a keyframed mode. If tokamak (lol) doesnt support this then you'll have to fake it by manually setting the position and velocity of the rigidbodies each frame even though external forces may drive them away.

When they're in this state they can be considered proxy or keyframed bodies.

That video looks awful :(

This video should inspire you:
">


Also how come people are too lazy to make url's a hyperlink.. it's a burden to have to copy and paste and open a new window.
bzroom - thanks for that update.

I'll try to force the engine and set the positions each frame.
As soon as i code this, i'll drop some vid on youtube and let you know.

Many thanks again!
Xynapse | http://szczerbiec.net/
I think i should let you know guys that i have managed to work this out.

In fact - i am 'forcing' my player's bones to be placed in defined position when no critical damage/hit/(etc) occured.

A short vid :




Thanks for the idea,

P.

[Edited by - dirtysanchez on April 27, 2009 7:24:09 AM]
Xynapse | http://szczerbiec.net/
oh man that looks super cool, great job.

Do you have any intention of connecting the ragdoll to a real animation rig? for a human like character? or even an explicitly articulated robot? or do you plan on keeping this box style?
Workin' on it - i would realy like to have it as a skinned model rather than this 'boxy' stuff. But this phase #1 - was to have the physics correctly implemented. B in touch, as soon as i find out how to bind a 'boned' model into this project i'll let you know ;)

Thanx for replying,

keep in touch!
Xynapse | http://szczerbiec.net/

This topic is closed to new replies.

Advertisement