Proper Ragdoll format

Started by
25 comments, last by dirtysanchez 14 years, 7 months ago
Can you draw some illustrations of what you mean by both of your questions? I have some ideas but i just want to make sure i'm on the right track before i go rambling off..
Advertisement


So here is the deal.

Having positions of all joints, how do i calculate the bones positions/sizes between ?

I think the main problem with my ragdoll was that the ragdoll was having BONES position in JOINTS position. Tokamak uses Bones to manipulate the ragdoll, i see MD5 gives Joints positions only so i ahve to figure out the Bones positions by myself.

Hope that helps
Xynapse | http://szczerbiec.net/
what kind of joints do you use? ball/socket? It looks to me as if your model gets twisted.
I think the right joint type here would be some kind of a hinge.
Joints.Type=BJT_HINGE;

Is the type i'm using, head is a BALL type.
Xynapse | http://szczerbiec.net/
If i understand you correctly, tokamak reports the positions of the joints you have shown here and you want a way to compute the positions and orientations of the "bones" you have here. Well for one, the bones are specified in the space of the joints, so it should be fairly trivial, but that's not going to be my official answer.

The bone positions of your graphical skelton should not be located between the joints of your ragdoll as you have illustrated here. The should coincide. The hand bone of your skeleton should be at the wrist position, exactly inline with the wrist joint. Your forearm bone is actually your elbow joint, and so on. The bones rotate through their origin, so they are infact joints. To call them two different things is only going to mislead you. Bones == joints. With that in mind, it should be easy to convert between the two.


Revised answer: Your description and illustration are confusing (there are two sets of data structures, tokamak and md5, you've only drawn one and didnt mention which it refered to). But rereading your post it seems like that MD5 uses the joints? and that bones are actually refering to the rigid bodies?

Tokamak uses rigidbodies and joints, where as md5 uses only joints. So given the joint positions from tokamak, you should easily compute the joint positions of the md5. Now if you want to go back the other way from MD5 to tokamak, then you'll need to compute the orientation and positions of the rigidbodies based on the joint positions from the animation. Is this what you're trying to do?
bzroom - we are getting closer to the point now i believe.

All i really want to do is to allow MD5 to work with Tokamak's rigid body.
MD5 describes his joints as follows:

joints {	"origin"	-1 ( 0.4811630249 -0.0000028610 0.0000000000 ) ( -0.7071067810 0.0000000000 0.0000000000 )		//	"bip01"	0 ( -9.5188369750 -0.0000028610 60.3541145324 ) ( 0.0000000000 0.0000000000 -0.0000000000 )		// origin	"pelvis"	1 ( -5.0578060150 -0.0000012252 60.3541145324 ) ( 0.4999996662 0.4999999046 0.4999996662 )		// bip01	"SPINNER"	2 ( -5.0674753189 0.0000003234 67.1245803833 ) ( 0.5610293388 0.4304026126 0.4304039001 )		// pelvis	"lthigh"	3 ( -5.0578050613 10.0008354187 60.3541221618 ) ( -0.5834061622 -0.4835883617 0.4166314601 )		// SPINNER	"lcalf"	4 ( -0.5389073371 13.5598382949 36.6310081481 ) ( -0.4712568759 -0.5934116840 0.5111591339 )		// lthigh	"lfoot"	5 ( -6.4881482124 17.3538913726 11.3716907501 ) ( -0.4687849998 -0.5041595458 0.4945433616 )		// lcalf}



And tokamak uses Bones/Joints - what really confuses me. When i simply apply MD5 mesh joint position to tokamaks joints and run the physics MD5 mesh is transformed verry well but it seems to be 'messedup' - but the joints are in place and in fact they work great - mesh is being twisted and i suspect that there is something more i should do rather than :

- set MD5 joint to TOKAMAK RIGID joint

and let the physic go.

You could see on my youtube that physics are working fine, MD5 is also doing well but whenever i touch the MD5 with applied physic - whenever i apply impulse, the MD5 gets twisted somehow..

So this is why i asked the question why does Tokamak need to have Bones - i know, because these are the 'bounding boxes' required for proper collisions.

Can't get this to work, just can't even understand why after applying

MD5.joint0->RIGID_TOKAMAK_joint0
...

my MD5 mesh gets twisted.

There was a zip file i have published - if you would like to get to the source and try it, just let me know - maybe there is something 'small' i'm missing here...
Xynapse | http://szczerbiec.net/
Well i ended up writing my own exporter and format to have it running..

I'll let you know if this will fix the continuing problem..
Xynapse | http://szczerbiec.net/

This topic is closed to new replies.

Advertisement