Ragdoll Template [New version]

Posted By: Helghast

Ragdoll Template [New version] - 02/11/10 19:20

Hi people!

I finally came around to add ragdoll blending and update the previous ragdoll scripts into a Template (thanks to help from EvilSOB).
I have uploaded a testdemo for people to see the ragdoll blending from any last animation frame.

The demo has the sourcescripts included, so you can copy/paste that for your needs. However to the people with less bandwidth, I have uploaded the ragdoll template seperately (and the script that creates the ragdoll to see how it works).



So without further ado; here are the download links to the demo and source.

Ragdoll blending Demo

Ragdoll Template sourcecode

controls:
R - to turn character into ragdoll... that's all!

Have fun, and I love feedback! wink
Posted By: Progger

Re: Ragdoll Template [New version] - 02/11/10 19:32

hi helghast thx for this ragdoll code (:
Can u make a tut how to use ragdoll because i do not know how to use this on other models
This would be great
With friendly Greetings programmer laugh
Posted By: Quad

Re: Ragdoll Template [New version] - 02/11/10 19:33

nice, ill try this out with some other models this weekend.
Posted By: Rei_Ayanami

Re: Ragdoll Template [New version] - 02/11/10 19:46

Nice, but you should definitly reset the physics for the objects after it doesen't really move anymore - else it eats too many frames xD
Posted By: Helghast

Re: Ragdoll Template [New version] - 02/11/10 19:51

Originally Posted By: Progger
hi helghast thx for this ragdoll code (:
Can u make a tut how to use ragdoll because i do not know how to use this on other models
This would be great


I will eventually, but not very soon... Work and girlfriend take time as well wink

Originally Posted By: Quadraxas
nice, ill try this out with some other models this weekend.


Show us how that went! grin

Originally Posted By: Rei_Ayanami
Nice, but you should definitly reset the physics for the objects after it doesen't really move anymore - else it eats too many frames xD


Yes, I agree... But the whole code is unoptimised yet wink i can implement alot more of these, but simply wanted to get something out people can work with again wink

thanks!
regards,
Posted By: darkinferno

Re: Ragdoll Template [New version] - 02/11/10 20:40

this is quite nice, tho i already accomplished blending, dont know who's is faster though, i'll definately look into this
Posted By: Cowabanga

Re: Ragdoll Template [New version] - 02/12/10 10:47

Looks very nice, gotta check it out.
(You got feedback on MSN grin )
Posted By: Helghast

Re: Ragdoll Template [New version] - 02/12/10 10:47

Originally Posted By: darkinferno
this is quite nice, tho i already accomplished blending, dont know who's is faster though, i'll definately look into this


Hehehee, I had achieved it in the previous version on A6 as well... was too lazy to convert it over though, finally got round to it laugh (was the easiest script ever, literally just 4 lines added).

Let me know who's is faster, and how you did your ragdoll if different wink I love to learn new techniques!

regards,
Posted By: darkinferno

Re: Ragdoll Template [New version] - 02/13/10 12:25

Originally Posted By: Helghast
Originally Posted By: darkinferno
this is quite nice, tho i already accomplished blending, dont know who's is faster though, i'll definately look into this


Hehehee, I had achieved it in the previous version on A6 as well... was too lazy to convert it over though, finally got round to it laugh (was the easiest script ever, literally just 4 lines added).

Let me know who's is faster, and how you did your ragdoll if different wink I love to learn new techniques!

regards,


ok, well here's one lovely thing that i did, i calculated the speed of the entity then used that speed to apply a force to the ragdoll when spawned so if your running forward and get shot, you wont just fall down but fly forward and drop on your face [looks alot better]
Posted By: Helghast

Re: Ragdoll Template [New version] - 02/13/10 13:01

Originally Posted By: darkinferno
Originally Posted By: Helghast
Originally Posted By: darkinferno
this is quite nice, tho i already accomplished blending, dont know who's is faster though, i'll definately look into this


Hehehee, I had achieved it in the previous version on A6 as well... was too lazy to convert it over though, finally got round to it laugh (was the easiest script ever, literally just 4 lines added).

Let me know who's is faster, and how you did your ragdoll if different wink I love to learn new techniques!

regards,


ok, well here's one lovely thing that i did, i calculated the speed of the entity then used that speed to apply a force to the ragdoll when spawned so if your running forward and get shot, you wont just fall down but fly forward and drop on your face [looks alot better]


Ah, nice!
But that's a dependancy per project, something that not all games will want. So if a user wants that he'll have to do that himself.

I made the template to create ragdolls, how you apply a force to that is up to the user himself wink

regards,
Posted By: 3run

Re: Ragdoll Template [New version] - 02/22/10 00:00

Can not get it to work normal with other model frown
Posted By: Helghast

Re: Ragdoll Template [New version] - 02/22/10 08:22

Originally Posted By: 3run
Can not get it to work normal with other model frown


That's not very helpfull tongue
What's not working, what did you do and how did you set it up?

regards,
Posted By: 3run

Re: Ragdoll Template [New version] - 02/22/10 11:11

I changed names of bones, like in the player model, used in demo. then I just changed it with my model, with same name of bones... and when I spawn ragdoll, it doesn't really looks like in demo... looks really ugly frown
Posted By: Helghast

Re: Ragdoll Template [New version] - 02/22/10 11:51

well, make sure the rotation of your model is the same, and more importantly, make sure you make the ragdoll hinge objects the same size as your model.

I'll make a tutorial sometime soon, to cover how all this works.
Posted By: 3run

Re: Ragdoll Template [New version] - 03/06/10 16:20

Man did you finish tutorial? I really got some throubles with this)) Hinge objects have the same size as my model, but still no luck frown
Posted By: Revo

Re: Ragdoll Template [New version] - 03/25/10 16:28

ok i hope my english is understandable:
i currently try to assign your ragdoll-code to an other modell (an ork ^^).
theres not a big difficulty to create the collision modells, but now i came to the following problem:
my "pelvis"-bone / model is not right centered (is 30 quants up) and if I move the whole model in MED down (plus the bones) all animations become trash ... frown (maybe its a beginner mistake but i just see no way to do this in MED )

thx for every helping answer.


edit:
ok, i managed a workarround (with an additional polygon and "Transform model global"->"Center model") ... but can not be the answer ^^
Posted By: Rackscha

Re: Ragdoll Template [New version] - 03/26/10 16:30

Just one question: The legs and shoulders do they support 2Axis rotation? Because a shoulder for example has more movement freedom(2 axis/kind of ball hinge) as the rest of the arm.

EDIT: because the 2 Axis thing is always the thing i got stuck at.

Greets
Rackscha



Posted By: Helghast

Re: Ragdoll Template [New version] - 03/27/10 12:41

every hinge supports multiple hinge rotations, you just have to set it up properly yourself laugh
Posted By: Rackscha

Re: Ragdoll Template [New version] - 03/27/10 13:28

Do you mean ever hinge in your template or every hinge in ODE in general?
If in general i did something really wrong, because i havent managed two asign to axis to a single hinge tongue.

But your contribution is awesome as always^^. MAybe later(if you have time) you can try to do a Newton template? I think newton is working better than ODE(as far as my experience go with this 2 engines).

EDIT: i went to toilet some minutes ago to do my business, and got an Idea.(havtn watched your code yet). Maybe you are not rotating the player's pan tilt an roll?? So youre just updating its position and the rest of the orientation is done by the bones? I always tried to rotate my player which is the problem(maybe)?

Greets
Rackscha
Posted By: Roel

Re: Ragdoll Template [New version] - 04/07/10 10:27

Thank you a lot!
I guess it will be usable laugh
© 2024 lite-C Forums