Ragdoll Tutorials

Blitz3D Forums/Blitz3D Userlibs/Ragdoll Tutorials

Erroneouss(Posted 2005) [#1]
Are there any good Blitz Ragdoll tuts for ODE or Tokamak?


KuRiX(Posted 2005) [#2]
Well, my "in development" ODE physics editor supports Ragdolls. So you can make ragdolls in a visual way then export them to blitzbasic or c++ code.

The release time should be in less than a month.


Erroneouss(Posted 2005) [#3]
Sounds cool, but do you know of any tutorials? I kind of
need them quick... :P

I'll have a looksie at your editor most definitly though. :)


Picklesworth(Posted 2005) [#4]
The best I can suggest is to play around with joints for a while, because there's no tutorials.
I guess ragdolls pretty badly need to be done in an editor though... Mine will have the groups and joints update soon after the exporter update which is (judging by previous records) soon after the freezing of hell.


Erroneouss(Posted 2005) [#5]
Okee doke. Thanks! Maybe I'll make a tutorial on how
to make a simple ragdoll because everyone asks, and nobody
gets a tut to read from. :)


KuRiX(Posted 2005) [#6]
Well, take a look at this demo. It is a DelphiODE based ragdoll. Very Impressive. If you want, take a look at the source code (*.pas).

http://www.lcuriel.arrakis.es/ragdolldelphiode.rar


Rhyolite(Posted 2005) [#7]
Ok, I have a question which may be dumb - but here goes!

Can a ragdoll model also be 'animated' using the Blitz3D 'Anim' commands?

I am assuming not, but then how do you get a ragdoll model to walk around and perform more complex actions within a game but also react realisticaly to collisions etc?

Thanks,
Rhy :)


KuRiX(Posted 2005) [#8]
Well, you need to do it in a 2-way form. You have an animated model, suppose a human model. You will have bones for it. Then you animate it in your favourite animation 3d software, then export to b3d format. In B3D, using ODE for example, you create a body for every bone in the model.

Then the problem is that ODE will not be activate until your model die. In fact, usually you will not have realistic response while your character is animating based on the bones, but when he dies, then ODE starts to work, and the animation follows ODE.

I have not explained too well, so here is a resume:
When the character is moving, ODE bodies follow the bones position. When the character dies, you set the ODE bodies to the bones position, and then the bones follow the ODE bodies...


Rhyolite(Posted 2005) [#9]
Thanks - understood :)

Look foward to seeing your ODE editor,
Rhy


Vorderman(Posted 2005) [#10]
Creating a ragdoll in Tokamak is very simple.

First, you need a layout of joint markers or a skeleton - I created a simple humanoid shape in a modelling program that has a sphere at the position of each joint (neck, shoulders, elbows, hips, knees and ankles) and also a sphere at the centre of each body part (head, torso, upper arms, lower arms, upper legs and lower legs).

You could use an animated human mesh for this - just make sure you have these markers for the joints and body parts.

Then, when you need to invoke the ragdoll, use the orientation of the markers to position a TOKAMAK rigid body at each body part position, and point these RBs at the relevant joint - for example, create a long thin cube at the lower arm position, then point it at the elbow joint marker, create a block at the head position and point it at the neck joint.

Finally, create the joints at the joint marker positions and orientations, and connect them to the relevant rigid bodies. When you activate the Tokamak simulation the ragdoll will crumple to the ground. You can blow it across the room by, for example, applying a single impulse to the torso as the ragdoll is created.

When writen down this sounds more complicated than it really is - create a test program and you'll see it's really pretty easy to do.

Joint limits are harder to implement if the ragdoll can start in any position, but can still be done.

Here is a demo program - http://www.jameskett.dsl.pipex.com/Ragdoll.zip

Here is the skeleton object used to construct the ragdoll at runtime - green are RBs, red are JOINTS, yellow is the base pivot -


and a couple of simple screenies -




Rhyolite(Posted 2005) [#11]
Thanks for that Vorderman, nice demo. I often wonder which is worse, being a ragdoll or a crash test dummy!!

Rhy :)


Picklesworth(Posted 2005) [#12]
My physics editor will have a system which will attempt to build a proper ragdoll out of a mesh, as long as it has bones, within the next twenty years.
And that is very nicely done, Vorderman!


Vorderman(Posted 2005) [#13]
You know, it's only a simple ragdoll and it seems selfish to keep the source to myself - if you guys want it I'll post it up tonight..?


Erroneouss(Posted 2005) [#14]
Cool!


Snarkbait(Posted 2005) [#15]
Awesome demo Vorderman.


Vorderman(Posted 2005) [#16]
OK, source code in the new thread.