JoeJ wrote:I'd like to hear what others think, are you guys intersted in using simulated characters, do you believe in the idea?
I ask because i've got the impression that most devs are quite resistant and full of doupts, 'uncanny valley', 'just animation is easier' and so on.
On the other hand, gamers reactions about Natural Motions work is very positive and they want to see more of this.
This will be simulation and animation all the same, my claim is that simulation and animation are two different manifestation of the same thing. and you unified the together if you know how.
there are a lot of pseudo expect out there with strong opinion toward one side the other,
the truth is that if you can get a state vector (but the I mean the position, or orientation) of an array of a articulate bodes, for a set of external forces, joint torques, and of joint velocities and bodies velocities, the you can ado the inverse. that is what constrained optimization is all about.
The general approach of this is that the body will be jut a ragdoll. that will be controlled by the engine. there will be not powerf joint on the rag dog doll free degree of freedom.
the controller will be a series of sub controller that will control desired objectives.
These objectives will be anything we want, but he have to have a transfer to convert the objective to the eterne force and toque applied to the body.
what I mean by a transfer function is the matrix that you get by t Appling change rule of total and parcial derivative to the objects. so the will convert for example a desire position to a joint torque and muscle torque.
I give tow examples.
1- the self balancing controller.
this will be a controller that will use the inverted pendulum to try to maintain a body part, (the hip) as close as inside the supporting plane of the contact feet contact point.
we know the equation of the inverted pendulum , but w do no know how to make that the body par follow the trajectory, whoever very we can make a joint that is attached to the hip and the joint is responsible to apply the force and torque to make that body part meet the objective.
two thing can happen, the force and torque required are too strong and brake the maximum joint
torque the articulated body, or the are sufficient.
If they are suffocated then the controller place this value in the state vector,
if the required resulting torque exceeded the that maxim muscle torque, the controller signal that the control violated and a state machine switch the control state. In the case it could be that the controller move to take a step.
what this does is that is change the support ion polygon. and that corresponding control does the same an so on.
let us say we only have that controller (which is the fist one that I will write)
and another control why objective is the keep the joint angle with is some minimum and maxim value.
each controller will have a set joint on which it operate.
the operation is as this.
The Character will have an array of active controllers, (in the case the self balancing and the fix joint angle)
the code will iterates over the controllers list each controlled will place the desired goal in the state vector, converting input (external torque, desired velocity, desired position, desire trajectory)
and convert the to the input to the constrain solver (maximum joint torque, and joint acceleration)
the constrain solver will solve the case and produce the set of external forces that need to be applied to the ragdoll as external forces. and the simulation moves to the next step.
so now let us see how that simple system with only tow controller
1-Keep joint angles with it some limits,
2-keep balance the pelvis using a invite pendulum
Imagine we have a animation or a series key frame poses.
the joint angle get a new target joint angle for the pose.
and the controller try to interpolate the joint angle for the one is has to the desired one.
for this we apply any interpolation rule we want, linear, spline base, of even dampers spring
there are many biomechanics rule we can use for this.
The inverted pendulum controller will try to keep the balance.
and a set for force and acceleration will be calculated.
now imagine the player find an obstacle,
the house keeping active a controller which goal is to move the hand so that the player protect the head.
now we have three controller active on the player. the firs tow do what the do, and the new violate there goal, the third one add to the goals
and the solver fond the solation that satisfice all goals
as along as the solve find a solution that satisfice all goals, the player do not controller change state.
and the force and torque are applied to all bodies
is any control goal is broken, that in mean that some other controller need to be activated,
for example say the protect head fail because the head get a contact.
if we do no have anything we simple do nothing.
but let us say we late dice to make the head reaction better and we write a head reaction controller, that can either a pose for some key frame, or maybe just a procedural heard ratio.
now the we activate the head reaction and the player will do the head reaction alone with all other controller goal.
so basically the way the use control the played is by using a state machine that activate and dative these controllers.
as you can see the key frames is just the input to one of the controller.
do you get the idea.?