3 registered members (NewbieZorro, TipmyPip, 1 invisible),
19,045
guests, and 8
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
[newton ] - ragdoll - is this idea possible?
#73316
05/05/06 22:33
05/05/06 22:33
|
Joined: Feb 2003
Posts: 195
slacker
OP
Member
|
OP
Member
Joined: Feb 2003
Posts: 195
|
I was wondering if this would be possible or if anyone has tried such a thing. My idea is to put place a newton ragdoll that is invisible in the exact place as my character which is bone animated, move the bones (not rotate) to the exact position of the newton ragdoll body parts - arm bone follows ragdoll arm, etc. Or can you only rotate bones, not move them absolutely. I am thinking about putting some time into getting this working, but if someone knows this to be impossible, it might save me some time. Thx 
|
|
|
Re: [newton ] - ragdoll - is this idea possible?
[Re: slacker]
#73317
05/06/06 00:04
05/06/06 00:04
|
Joined: Jul 2001
Posts: 6,904
HeelX
Senior Expert
|
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
I can only share experience I did with the A6 physics engine in combination with bones animation.
If you plan to use a rigged model with bones to use for your physics simulation: forget it or put all your effort into it. The problems are everywhere you look at. The most disgusting habit the A6 bones have is that the way they are saved in MED, they all have a local default orientation of (0,0,0). That means: no matter which absolute angle they would have - if you set their pan parameter for instance =10, they are pointing in that direction, the pan is only added to their local orientation. So you must know for each bone which direction he has. Basically, I aligned all bones for my ragdoll to the axis and defined template rotation for each bone, so that I can easily define for each bone update which axis he is aligned to.
So.. when you update each frame the bones you have to reset each bone, so that when you apply a spacial vector to move to the tied physics hinge, you only need to apply the difference vector. When applying rotation you just need to reset the orientation so that the bones "look" into absolute (0,0,0) direction. Then you can simply calculate the angle from the tied hinge entity to the child hinge and apply that angle to the tied bone. Just math calculations.
One important thing: dont forget to move the origin of the bones model BEFORE you update the bones, because when you dont move it, sometimes the modelshape enters the camera or so and then it gets invisible.. strange.
I hope this theory helps you to setup your ragdoll. I did it one month (or two) ago for REVOgames and it worked well. Though.. there are some serious problems with calculating bone rotation, I strongly advice to use a ragdoll simulation that takes multiple meshes to simulate the ragdoll body parts, because you would avoid some rotation issues I came along with. Plus, you can seperate body parts from the ragdoll, if you wish.
Cheers! Christian
|
|
|
Re: [newton ] - ragdoll - is this idea possible?
[Re: slacker]
#73320
05/08/06 11:29
05/08/06 11:29
|
Joined: Jan 2004
Posts: 3,023 The Netherlands
Helghast
Expert
|
Expert
Joined: Jan 2004
Posts: 3,023
The Netherlands
|
Quote:
hey thanks for the informative post Christian! I have a working ragdoll from an old newton demo. It doesn't use bone animation however but rather employs multiple body parts.
I was hoping to use this to drive a bone model, by attaching the corresponding body parts. not rotating, but moving - I know there is a bone move command, I am not sure if this will do what I need tho.
My fall back approach right now is to use a segmented model for crazy death, falling downs stairs, etc. anims at a distance, where the segmented model will not be that noticeable.
lol, yeah, i once uploaded a demo of my ragdoll, look for it under showcase 1, it's somewhere over there  good luck, regards
|
|
|
|