Let us talk about a smart self balancing ragdoll

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Let us talk about a smart self balancing ragdoll

Postby Zetamun » Tue Jan 03, 2017 1:37 pm

I am using GM newton from 2011.

Attaching a kinematic controller to a Ragdoll keeps it upright however there are some problems with it, Kinematics cannot be Paired with a Playercontroller. Kinematics seem to also not function according to local space so their movements seem unintuitive and imprecise.

So for ragdolls what I do is Lock the joints within a range and upon playerdeath, disable the locks.
User avatar
Zetamun
 
Posts: 18
Joined: Tue Jan 03, 2017 1:19 pm

Re: Let us talk about a smart self balancing ragdoll

Postby Julio Jerez » Tue Jan 03, 2017 3:45 pm

2011 is too old of a version. First thing you nee to do is upgrade to newton 3.14
many of the issue you take about has been solved.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Let us talk about a smart self balancing ragdoll

Postby Zetamun » Wed Jan 04, 2017 2:35 pm

Can't. No idea how to make a DLL.

Actually, I have made a DLL before. But I'm stuck with hanson's dll from 6 years ago.
User avatar
Zetamun
 
Posts: 18
Joined: Tue Jan 03, 2017 1:19 pm

Re: Let us talk about a smart self balancing ragdoll

Postby Shaderman » Wed Jan 04, 2017 2:52 pm

Open and build newton-dynamics\packages\projects\visualStudio_2015_dll\build.sln.
Shaderman
 
Posts: 66
Joined: Tue Mar 08, 2016 2:51 am

Re: Let us talk about a smart self balancing ragdoll

Postby Sweenie » Wed Jan 04, 2017 6:37 pm

I assume GM is GameMaker right?
Is this guy Hanson still around? If so maybe he could share with you how he made this Newton plugin for Gamemaker.
Sweenie
 
Posts: 498
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: Let us talk about a smart self balancing ragdoll

Postby Zetamun » Tue Jan 10, 2017 1:56 pm

He's taking a while to respond. Guess beach vacations are more important to him.

Open and build newton-dynamics\packages\projects\visualStudio_2015_dll\build.sln

Would that be compatible with game maker though?
User avatar
Zetamun
 
Posts: 18
Joined: Tue Jan 03, 2017 1:19 pm

Re: Let us talk about a smart self balancing ragdoll

Postby JoeJ » Fri Jun 23, 2017 3:23 pm

This paper is interesting: http://calab.hanyang.ac.kr/cgi-bin/home.cgi?node=Pub&link=TOG2017

They do not construct the IP by using the characters ankle joint(s) but only from physical properties like COM and velocities. As usual i do not understand exactly, but maybe that's more robust.
User avatar
JoeJ
 
Posts: 1453
Joined: Tue Dec 21, 2010 6:18 pm

Re: Let us talk about a smart self balancing ragdoll

Postby Julio Jerez » Fri Jun 23, 2017 3:44 pm

wow, that maybe be what we have been looking for a long time.
I have no read it yet, but the fact the the intro and the title speck of momentum base IK, is very encouraging because once you can extract the momentum from a series of keyframe the rest is trivial.
But that extraction for momentum is the big, big issue that I am yet to see anyone who can get it right.
I am kind of abandoning the idea of motion synthesis because no matter how good the method is you can never get away form eth robot looking results.
this paper seem to be talking of modification of motion capture with is just keyframes. so that's also good.

I will read this this weekend.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Let us talk about a smart self balancing ragdoll

Postby JoeJ » Fri Jun 23, 2017 5:51 pm

Julio Jerez wrote:I am kind of abandoning the idea of motion synthesis because no matter how good the method is you can never get away form eth robot looking results.


If i get you right i disagree. Don't wanna argue but maybe i can inspire you with an example.

Looking at your articulated joints, AFAIK you provide an interface to target constant linear velocity, for instance to make a slider joint moving or a motor rotating at constant speed.
Of course this generates robotic looking motion, and such an interface is not usefull for human motion.
Human motion rarely uses constant velocity, it is more like constant acceleration. (Which is used for robotics as well because it's more efficient, mostly for pneumatic systems i guess)

Now the example is this:
Imagine you have a ball resting on the floor and your goal is to move it up to 1m hight and it should rest there at zero velocity.
You also have a switch where you can negate gravity so it goes upwards instead downwards.

So all we need is a controller that switches gravity to make the ball moving upwards and at half the distance switch gravity again, so it deaccelerates and comes to rest at our target height.
(At that point we would want to turn gravity off or keep switching at high frequency to keep it at rest).

Now it's easy to write a controller that can solve this problem even with initial velocity, target velocity and any target height just by working with the quadratic equation that comes from constant gravity, but the important thing here is: The resulting motion does not look robotic or artificial - it looks nice and smooth and efficient, exactly like human motion.

I believe we can synthesize perfect human motion with simple models like this.
E.g. the controller can calculate the time necessary until to switch gravity, and we can use this time to know something like: In 0.8 seconds the swing foot must be at the predicted zero moment point to stop walking, or a bit behind to keep walking etc.
The correspondence to constant gravity for my example is the maximum force a character can get from putting its center of preassure to the edge of its stance foot. This force is not exactly constant because it depends on the angle to the COM, which it also affects, but this results in a luckily linear relationship from angle to force. We get equations of motion with position dependent acceleration, resulting in complex but still analytically solvable equations.

So if the controller tells us: Keep the COP at the back of the foot and in 0.8s move it to the front of the foot,
and we use a simple IK solver to follow the resulting predicted COM movement from the IP, then the resulting motion should look good, because it is that simple and it's the same thing we humans do while balancing. It looks complicated because our bodies are complicated, but we do it efficiently and algorigthms can do this as well.
Just let arms loosly swinging, add a bit of posing for body language etc. and it should look good as i hope.

However, there is nothing wrong with using mocap and i guess it's easier to get more things done this way (plus all this expensive equipment would still make sense, so i guess the AAA industry would prefer this anyways, while indies might tend to an approach independent of any data.)
User avatar
JoeJ
 
Posts: 1453
Joined: Tue Dec 21, 2010 6:18 pm

Re: Let us talk about a smart self balancing ragdoll

Postby Julio Jerez » Sun Jul 02, 2017 5:13 pm

Joe I read that paper, and I am sorry to say that as usual this is one more for those graduation dissertation that is only of academic value with zero practical application.

There are two points which I agree, but there aren't new, but the put into practice.
the first one is that the do no use the COM as the center of the IP, this is what I said all the time.
To me the method of using the com and projection to the center of pressure or support polygon seems like a hack that does not scale, all it take is to play a running or jumping animation and the controller has to references. that is why I never spend time on such system.

The second point is they they try to extract the momentum from animation sequences, this is just an oxymoron, given a series of keyframes, it is impossible to extract the momentum form it, no matter what algorithm method is use. This comes for the definition of momentum. momentum is simple mass time velocity and it is a vector, therefore the mass distribution is needed to get the momentum form a series of positions, and we know that the mass distribution changes with each step.

by the end they explain the run an elaborated algorithm that does the take days to process an animation using thousand of processors, but it seems to me is that whey do is a variant of space time constraint, which is basically given a series of key frame and the neighbor position extract the key frame that best math an position. Even if we get that working the final result will be extremity unpractical.

It is not all lost, I have been thinking about this problem for a long time. and I believe I do have a practical solution. I am not sure how it will work but is my estimation I believe it will solve all of the problems that all this dynamics vs kinematic characters suffer from.

In my next post I will give you an background explanation of the problems and then my propose solution.
It is important we identified the problem because not knowing the scope is what cause all the difficulties. we try to solve the problem form an engineering point of view by applying algorithm or principles other people has published and the problem is that all those papers only cover one part of the problem and not other.
Basically the main problem that Inverse Kinematics, and forward dynamics are like quantum mechanics and general relativity dilemma of character animation. They do no like each other an that what all the paper focus on. There either do IK, of the do Forwarded dynamics and they try to fix the problem by using proportional derivative integrations to convert joint angle to torques.
more in next post.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Let us talk about a smart self balancing ragdoll

Postby JoeJ » Mon Jul 03, 2017 8:22 am

Julio Jerez wrote:The second point is they they try to extract the momentum from animation sequences, this is just an oxymoron, given a series of keyframes, it is impossible to extract the momentum form it, no matter what algorithm method is use. This comes for the definition of momentum. momentum is simple mass time velocity and it is a vector, therefore the mass distribution is needed to get the momentum form a series of positions, and we know that the mass distribution changes with each step.


I do not understand this one, was already wondering why they said it's difficult in the paper.
If we have keyframes we know the position of each body over time, so we can calculate momentum for each body.
If we want something like momentum for the whole body (or just the upper body, whatever), i would treat all those bodies as a single rigid body for that moment in time, and take momentum from that.

I use the same approach to build my IP, so yes for me COM ragdoll == COM IP, and i do kind of projections from that to support polygon etc. (But i'm aware projecting COM down to support tells us nothing about balance because it ignores velocity.)

So i assume you think "Approximating the complex system of the ragdoll with a virtual single body can't work, because this model looses some important information." Maybe you can elaborate on this in your next post. Personally i never saw a big problem here.
User avatar
JoeJ
 
Posts: 1453
Joined: Tue Dec 21, 2010 6:18 pm

Re: Let us talk about a smart self balancing ragdoll

Postby Julio Jerez » Mon Jul 03, 2017 10:25 am

I do not understand this one, was already wondering why they said it's difficult in the paper.
If we have keyframes we know the position of each body over time, so we can calculate momentum for each body.

it is no only difficult, it is impossible, because series of position does not have the mass distribution information, that is one of the reason I do not trust any paper that claim those kind of things.
I am sure they have a convicting results, but naming one thing when just because it covey plausible result does not make right.
In general what they do is that the use some numerical optimization, not shown in the paper, to extract a parameters. They call that parameter the momentum but that is simple no true because the mass distribution is an independent variable for the system.
At the very simple term this is like trying to determine the momentum of a car by extraction the information from key frames of a video and it is clear that two different vehicle can have the same acceleration yet very different very masses.

Do not worry I do believe I have the solution to the problem. if I am correct It is quite sound mathematically. I do not have time to explain right now, I will do later.
but this is one of those thongs that evade you for a long time and the when the idea click, it fell correct. remember when we have ether problem with soft joint, and when I got the idea it just works.
the what follower was the engendering part, basically different way of implementing and each work one way of another.
BTW I have one final optimization of that too, that I will commit soon before moving to work on the balancing character and I want you to test.

I fell that way about this idea, and I feel that it will unified the kinematic and the dynamics seamlessly. It will allow us to do both systemize animation and play form keyframe animation, and all play back will be natural.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 16 guests

cron