[ODE] skeletal character
Jani Laakso
jani.laakso at itmill.com
Fri Dec 12 15:38:24 MST 2003
alfo trentam wrote:
> Someone knows how to implement a skeletal character system which make
> possible to animate a character (run, walk, fight, and so), letting
> fall like a rag doll and, after some seconds, make it rise animating
> it again?
> Suggestions are welcome, I don't pretend a full working source code!
Perhaps it might be good to start with basics. Define simple rag doll
consisting of
-head (sphere)
-neck (CCylinder)
-torso (Box)
-left upper arm (CCylinder), left lower arm (CCylinder), hand (Box)
-right upper arm (CCylinder), lower arm (CCylinder), hand (Box)
-left upper leg (CCylinder), lower leg (CCylinder), foot (Box)
-right upper leg (CCylinder), lower leg (CCylinder), foot (Box)
Make it e.g. with 3d Studio and export it in a format that your
application can read. Then after ODE has objects created and positioned
in right place, attach joints to each objects. Experiment with the
parameters and after your rag doll interacts with other objects good
enough, start wondering how to make it do actions (walk, sit etc.).
This is all very simple, but can anyone at least share a code (any
language) that has an example of human body consisting of boxes,
cylinders and an sphere with joint definitions? I am especially
interested of joint definitions, what joints are you using and with what
kind of parameters. I have made an application using Xith3d (Java) +
odejava (ODE bindings for Java) and it's fun, but takes time to adjust
all parameters in such way that my rag doll falls and takes hits in
realistic way..
Making your human body to do actions is another topic that I'd like more
information as I'd assume that there is no particularly easy way to do
this in a realistic way. I'd assume that one does not try to simulate
complex human body actions through ODE's methods (very complex), but to
make your human body to animate e.g. walking motion as long as ODE
permits it. At least on games the middleway should be appropriate. In
other words do it the wrong way by defying physics and set your body to
new position and angle unless an collision occurs. I'd think that if you
stand, walk, sit or do other 'deterministic' actions, you do them in the
old fashioned way, like you would do without ODE. But if an special
event occurs, e.g. your body collides with an bullet, car or you fall
from a roof then you instantly switch control back to ode and simulate
your 'incident' realisticly up to a certain point. After the 'incident'
you switch back to old fashioned style. This is only speculation and
simplified description, I hope mailing list readers now fix my
assumptions and share their ideas..
PS. Be sure to check http://odejava.dev.java.net www-pages. It has three
3d demos also (windows bat scripts included). Odejava supports almost
all the aspects of ODE (it works very well on Java), but e.g. trimesh
API is still missing from the java side.
--
Jani Laakso / IT Mill Ltd | Tel. +358 40 5898086 | http://www.itmill.com
More information about the ODE
mailing list