Controllers for virtual humans

Hello,

I’m searching controllers for virtual humans, which controls the avatar in a physical way and which I can integrate in my project. Controllers written in Java are prefered, but I can also used Controllers written in other languages. The controllers I need are controllers for the locomotions walking and grasping, but others are also welcomed.

I hope anyone can help me or knows where to search.

Ramona

I don’t know if something like that exists, but it would be great if there were !!
As far as I understood your request you have ODE-Geoms that resemble your human that are linked with joints.
Have you heard about inverse kinematics (IK)? It may be a good idea to look at that konzept if there isn’t existing anything else. I don’t actually know how complicated it is to write such an IK tool, or if there already exist one and I also don’t know how much computation time an IK would take.
Next to that you would probably anyways (doesn’t depend on what controller you’re using) have to write some skin tool, so the Geometry you render doesn’t look so ugly (pretty important when animating humans with bones).

I think most of us could use such kind of tool(even simply to get away from ugly* frame animations).

*at least I think frame animations are ugly, because it simply looks stupid when you character walks down some stairs, as if it would be walking normaly and only falling down the steps.

Yes I know inverse kinematics, inverse dynamics too. Because it seems, that there are no existing controllers for free - I didn’t find one so far -, I have to implement it on my own. I hope it’s not too time expensive.

“endorphin” is a environment especially for stunts and game-movement developers. they do that with a mixture of motioncapturing and evolutionary algorithms. (http://www.naturalmotion.com/)

I was just wondering if it could be possible to just make dynamic trimesh with frame animation, so characters don’t fall on stairs but really walk, if their steps have the proper size.

If you use frameanimations it will look funny I think, because your human will either be hobbing down the stairs (it would probably also very difficult to do that, because the center of mass has to be set accordingly) or your character would lose it balance and be falling down the stairs. See the image below for that.

I see.
So another proposal :
For Gamma I plan to do a Java port of an open-source character animation library : Cal3D.
It use skeletal animation.
If we can get which vertices the bone is influencing, we could create and synchronize a correspondant physic structure.
And we could mix the animation and the physic behavior influence.
So we could do as in endorphin, but with a skin on the ragdolls ?
And for the center of gravity, I think it’s really a problem in ODE.
Really, it wouldn’t be possible to make possible to change the center of gravity ?

You can change the centerof gravity (you always will change it) when you create your body out of different geoms (like one for each bone). Then the center of gravity changes dependingly of the movements the caracter does. Like in nature.

Okay.
What about physic/animation synchronization ?
The problem with systems like endorphin ( as I can saw the example videos ) is we can’t put ragdolls made of spheres/cylinders/cube, we need more sophisticated graphics.
So it would be like a sort of “skin” deformated in real-time by the physic engine…
However, if we’re motivated to include this in Gamma, I’m afraid we can’t do that for the first beta version… ;D

hmm jeah we’ll need such a skin thingi - everything else will look ugly. I know how it is done from 3dsmax, there every vertex got a vector of floats that specified how much the vertex is affected from the surrounding bones. When you added all these floats together you always got 1 as a result. The question now is that: does Cal3D contain also those weights?

[quote]However, if we’re motivated to include this in Gamma, I’m afraid we can’t do that for the first beta version… ;D
[/quote]
We’ll also need some stuff for later versions :wink:

You are talking about two differnet things here. IK and ragdolls. Let me explain them to you:

Ragdolls,
Each Dynamic object is lined to a bone in the skeleton animation system whereby the rotation matrix and postion of the bone is derived from the dynamic object. Each dynamic object is linked to its previous by joints (either ball-socket, or hinge) to maintain human anatomy. As for ODE and ragdolls, the problem of two geoms connected by a joint do not collide can be simply solved by having each joint resembeled as a GeomSphere, then the bones like to the GeomSphere so that the humerous and the ula can collide and not penetrate each other like some wild magical creature from out of space! Also to take into consideration the max/min degrees the joint can move around. E.g, its easy for you to point your humerous forward but its difficult to point it backwards while keeping your arm straight. I dont believe even Havok has managed to do this as most ragdoll demos and games i have played the upper arms of the player and and often does go behind his back…

IK,
Each bone can be thought of as its own coordinate space with its own rotation matrix and its own position. The positions and rotations of children are influenced greatly by that of their parents. Inverse kinematics involves recursing backwards. So you place the last joint where you want it (say on the stairs), then IK algorithms will find out the rotational matrix and position needed for its parent so that the child has that valid position. This is useful in the stairs example you gave. This is also how modern games like Halo2 position the player’s feet directly on uneven terrain, so that the player doesn’t look like he’s hovering with his feet penetrating the mountain…

Both are complicated to make and not for the light hearted to take on, so good luck to whoever is implementing them! :slight_smile:

DP

I know the difference(s) between ragdolls and IK and what I propose is to join them ( not keeping all of theirs respective features ).
Say :

  • The skeleton is loaded from a model
  • The different animations used by the controllers are in the model file and they’re blended when there’s more thant one controller in action
  • The “dynamic animation” react with the others physics objects of the world, so if you have a walk animation, there’s no need to apply a force to make the character moving. There’s a friction on his foot, so he will move by himself.
  • The skeleton have a skin that is deformed by the bones position, rotation…
  • The bones of the skeleton are physically represented by BallJoint(s)
    I’m not sure I expressed myself correctly… but you may have a little idea of what I want to do.

Well right now I’m working on something like that. I created a ragdoll that can perform various movements as configured in an XML document.

It consists of Bones (Bodies and Geoms) and Joints. The Joint ball is not suitable because you cant set stops on it, so I created a “combined jointball” that uses 2 hidden bodies and three hingejoint. It’s sounds messy but it works.

The guy can perform any movement that you want him to do using physics / angular joint motors ) only problem is that he will fall to the ground because he has absolutely no brain that will keep his balance for him.
A neat workaround for that was to make his “center bone” about the width of a football field and make it non collideable with the
rest of the bones. Again a messy but works at a minimum CPU cost.

I have a demo here that you could download if you dare

http://onlineboxing.net/boxing/demo/ob3d_demo.zip

If you like it I wouldnt mind sending you sourcecode for this. It’s a bit spagetthi since I had to learn while doing, but you could simply use some of it’s ideas as a reference if you wanted.

cool - If you could give us the source this would be nice.

unfortunately I’m using linux and xith3d and not windows and Java3D, so I had no chance of testing your demo (without installing all the necessary libraries).

Arne

Well, that’s cool. What is the format of your XML file ? What do you exactly define in that ? Would it be possible to make a graphical interface to edit the XML files ( showing the real-time animation of the model ) ? If you want to include it in Gamma, you can, we just have to change Java3D to Xith3D… and use the Gamma abstraction layer above ODEJava.
If you are interested in Gamma, I can give you the Editor API.
Because the Editor is ALL-made of modules, it’s really easy to extend it.

Is it really useful to use so many joints ( 3 hinge joints ) ? Each of them speed down the simulation… and if we can’t use the Joint ball, can we use the Universal joint ?
And for another workaround : why don’t just set the ragdoll direction to the normal of his feet contacts ? ( I don’t know if what I say is very “understandable” ;D )

The XML format is homebrewed, you can see an example of it in the “data” foulder in the demo.
I dont know if you can use the UniversalJoint. I dont think it gives a balljoint effect that you need for shoulders.
Btw, elbow, knee joints are implemented using only hingejoints though.
Yes theres an editor to setup skeleton and poses/animations.
I will post the code, also the code for the editor But I warn you, this is not ready for serious use.

[quote] I will post the code, also the code for the editor But I warn you, this is not ready for serious use.
[/quote]
Nice !! Editing some kind of code is the best way to learn it - so it’s not bad but actually a good thing, because this way bugs are found more easily and it will be easier to implement it :wink:

Ok, just give me a few days.

Anybody can tell me what internal file formats are not homebrewed in Gamma ?? ;D ;D
Ok so I’ll see that.
The structure of the Editor could make it a lot faster to make the Physic structure editor.
I’ll just look at your XML files and see what we can do.
And thank you very much for your contribution to Gamma.

In fact it’s not annoying to have such workarounds, as long as they’re made in a transparent way for the user-developer.