RE: [Algorithms] Linking character animation & physics
Brought to you by:
vexxed72
From: Jamie F. <ja...@qu...> - 2002-12-12 11:50:42
|
i've been thinking about this too. really, though, it's not just a physics / animation problem... for instance: (i do a little karate) if i'm going to kick something, i adjust my position and kick appropriately according to where the target is, i don't just perform a standard kick motion. many of our animations are created in maya with IK set ups; so i'm considering exporting the IK set ups, and using them at runtime, modifying them appropriately to get reasonable results. there are 2 key problems with this, i think: 1) my runtime IK solver is not going to give the same results as maya 2) some parts of the character are animated without IK, and so need to be dealt with separately for dealing with 2) (and possibly everything else too :), i'm thinking of taking the result of the standard animation, and some physics calculations, munging them in some magic way, and using the result. but it will obviously require a lot of tweaking to get working well. i haven't really started on this phase of things yet, so it's all just hot air at this stage :) jamie -----Original Message----- From: gda...@li... [mailto:gda...@li...]On Behalf Of Pierre Terdiman Sent: 11 December 2002 19:16 To: gda...@li... Subject: [Algorithms] Linking character animation & physics There might have been a thread about this in the past but I can't find it..... I have two unrelated things : - character animation data, say keyframes or samples, describing a bunch of canned animations (usually replayed with standard motion blending, like what Granny does) - a physics engine, doing standard rigid body simulation and joints and whatever. The goal is to link one to the other, so that both interact in a correct (or at least plausible) way. One example is ragdoll physics, when you play your animations until the character / player dies, at which point you give full control to the physics engine and let it go. A more interesting idea would be to have some feedback from the physics engine, and use that feedback to modify canned animations in some way. IK does that kind of thing. Now, to unify things a bit, one could for example convert all canned animations to forces/impulses, and use that physics representation in the first place, bypassing the character animation system in a way. Then other external forces should "naturally" have some influence over pre-recorded anims, since everything is now physics-controlled. Would that work ? I seem to remember I read something like that on the list a while ago, but I can't find the relevant thread(s) anymore. One thing I'm trying to solve is the case where for example, a punch or kick motion doesn't generate strong-enough forces to throw this or that fast enough out of the way. Imagine a character kicking a box : the box gets projected correctly, but visually you still can see the leg going through the box, especially in slow motion. Worse: if the box is against a wall, the box doesn't even move and things look quite bad. A quick fix would be to repel the character so that the foot just touches the box, but it would make the character slide quite badly. A better solution would be to stop the kicking motion because obviously the box can't move, no matter how strong you are. But you don't want to stop the motion each time, only when the force required to move the box is greater than what you can provide. Converting everything to forces/impulses look like a first step in that direction : if the box just can't move, the resulting force on the character's foot will hopefully counterbalance the one generated from the original canned animations (or it might fail completely, I don't know, I'm just looking for ideas right now). BTW, when I say "converting to forces" it means that in the first case you have : - character bones from frame N (positions/orientations) - character bones from frame N+1 - bones are purely graphical objects In the second case you have, say : - character bones from frame N (positions/rotations) - a set of forces or impulses to add to each bone so that at frame N+1 they're on the same positions/orientations as in the original canned anim - bones as physical objects ...and now let's just hope it makes sense... Pierre ------------------------------------------------------- This sf.net email is sponsored by: With Great Power, Comes Great Responsibility Learn to use your power at OSDN's High Performance Computing Channel http://hpc.devchannel.org/ _______________________________________________ GDAlgorithms-list mailing list GDA...@li... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=6188 |