Re: Finding the best pose to re-enter animation graph from ragdoll

Ben Sunshine-Hill <[email protected]> Thu, 13 Dec 2012 19:54:42 +0000
Newsgroups gmane.games.devel.algorithms
Message-ID <CAGZipVE5pcAUybbb+2wjEXmZ-En==aNnJ6YJToV-Tzwa6G+RzQ@mail.gmail.com>
--===============4024151486659728134==
Content-Type: multipart/alternative; boundary=047d7bb03ecc83259704d0c14a64

--047d7bb03ecc83259704d0c14a64
Content-Type: text/plain; charset=ISO-8859-1

Joint angles suck for pose comparisons -- they just aren't the basis of our
intuitive notion of similarity. IMHO, point clouds work much better.
Transform a few bone-attached points -- say, pelvis, left shoulder, right
shoulder, left elbow, right elbow, left knee, right knee -- canonicalize by
putting the pelvis at zero and the shoulder midpoint at +X, and find the
minimum squared distance to a recovery pose (with some per-point weighting,
if you like).

For references, the one that immediately comes to mind is "Dynamic Response
for Motion Capture Animation". They're blending into a response animation
while the character's still fully ragdoll, so they have to look at multiple
frames to get velocity effects in there -- if you're waiting until the
guy's all fallen over, your task will be simpler.

Ben

On Thu, Dec 13, 2012 at 6:22 PM, Richard Fine <[email protected]> wrote:

> Hi all,
>
> I've got a ragdolled character that I want to begin animating again.
> I've got a number of states in my animation graph marked as 'recovery
> points', i.e. animations that a ragdoll can reasonably be blended back
> to before having the animation graph take over fully. The problem is,
> I'm not sure how to identify which animation's first frame (the
> 'recovery pose') is closest to the ragdoll's current pose.
>
> As I see it there are two components to computing a score for each
> potential recovery point:
>
> 1) For each non-root bone, sum the differences in parent-space rotation
> between current and recovery poses. This is simple enough to do; in
> addition I think I need to weight the values (e.g. by the physics mass
> of the bone), as a pose that is off by 30 degrees in the upper arm
> stands to look a lot less similar to the ragdoll's pose than one that is
> only off by 30 degrees in the wrist. The result of this step is some
> kind of score representing the object-space similarity of the poses.
>
> 2) Add to (1) some value representing how similar the root bones are.
> The problem I've got here is that I need to ignore rotation around the
> global Y axis, while still accounting for other rotations. (I can ignore
> position as well, as I can move the character's reference frame to
> account for it).
>
> Suppose I have a recovery pose animation that has been authored such
> that the character is lying stretched out prone, on his stomach, facing
> along +Z. If the ragdoll is also lying stretched out prone on his
> stomach, facing -X, then the recovery pose is still fine to use - I just
> need to rotate the character's reference frame around the Y axis to
> match, so the animation plays back facing the right direction. But, if
> the ragdoll is lying on his back, or sitting up, then it's not usable,
> regardless of which direction the character's facing in. So, I've got
> the world-space rotation of the ragdoll's root bone as a quaternion, and
> a quaternion representing the rotation of the corresponding root bone in
> the recovery pose in *some* space (I think object-space, but I'm not
> sure?) as starting points. What can I compute from them that has this
> ignoring-rotation-around-global-Y property?
>
> It's been suggested there there's some canonicalization step I can
> perform that would just eliminate any Y-rotation, but I don't know how
> to do that other than by decomposing to Euler angles, and I suspect that
> would have gimbal lock problems.
>
> This is probably some pretty simple linear algebra at the end of the
> day, but between vague memories of eigenvectors, and a general
> uncertainty as to whether I'm just overcomplicating this entire thing, I
> could use a pointer in the right direction. Any thoughts or references
> you could give me would be much appreciated.
>
> Cheers!
>
> - Richard
>
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> GDAlgorithms-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
> Archives:
> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list
>

--047d7bb03ecc83259704d0c14a64
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Joint angles suck for pose comparisons -- they just aren&#39;t the basis of=
 our intuitive notion of similarity. IMHO, point clouds work much better. T=
ransform a few bone-attached points -- say, pelvis, left shoulder, right sh=
oulder, left elbow, right elbow, left knee, right knee -- canonicalize by p=
utting the pelvis at zero and the shoulder midpoint at +X, and find the min=
imum squared distance to a recovery pose (with some per-point weighting, if=
 you like).<br>

<br>For references, the one that immediately comes to mind is &quot;Dynamic=
 Response for Motion Capture Animation&quot;. They&#39;re blending into a r=
esponse animation while the character&#39;s still fully ragdoll, so they ha=
ve to look at multiple frames to get velocity effects in there -- if you&#3=
9;re waiting until the guy&#39;s all fallen over, your task will be simpler=
.<br>

<br>Ben<br><br><div class=3D"gmail_quote">On Thu, Dec 13, 2012 at 6:22 PM, =
Richard Fine <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=
=3D"_blank">[email protected]</a>&gt;</span> wrote:<br><blockquote class=3D"gm=
ail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-le=
ft:1ex">

Hi all,<br>
<br>
I&#39;ve got a ragdolled character that I want to begin animating again.<br=
>
I&#39;ve got a number of states in my animation graph marked as &#39;recove=
ry<br>
points&#39;, i.e. animations that a ragdoll can reasonably be blended back<=
br>
to before having the animation graph take over fully. The problem is,<br>
I&#39;m not sure how to identify which animation&#39;s first frame (the<br>
&#39;recovery pose&#39;) is closest to the ragdoll&#39;s current pose.<br>
<br>
As I see it there are two components to computing a score for each<br>
potential recovery point:<br>
<br>
1) For each non-root bone, sum the differences in parent-space rotation<br>
between current and recovery poses. This is simple enough to do; in<br>
addition I think I need to weight the values (e.g. by the physics mass<br>
of the bone), as a pose that is off by 30 degrees in the upper arm<br>
stands to look a lot less similar to the ragdoll&#39;s pose than one that i=
s<br>
only off by 30 degrees in the wrist. The result of this step is some<br>
kind of score representing the object-space similarity of the poses.<br>
<br>
2) Add to (1) some value representing how similar the root bones are.<br>
The problem I&#39;ve got here is that I need to ignore rotation around the<=
br>
global Y axis, while still accounting for other rotations. (I can ignore<br=
>
position as well, as I can move the character&#39;s reference frame to<br>
account for it).<br>
<br>
Suppose I have a recovery pose animation that has been authored such<br>
that the character is lying stretched out prone, on his stomach, facing<br>
along +Z. If the ragdoll is also lying stretched out prone on his<br>
stomach, facing -X, then the recovery pose is still fine to use - I just<br=
>
need to rotate the character&#39;s reference frame around the Y axis to<br>
match, so the animation plays back facing the right direction. But, if<br>
the ragdoll is lying on his back, or sitting up, then it&#39;s not usable,<=
br>
regardless of which direction the character&#39;s facing in. So, I&#39;ve g=
ot<br>
the world-space rotation of the ragdoll&#39;s root bone as a quaternion, an=
d<br>
a quaternion representing the rotation of the corresponding root bone in<br=
>
the recovery pose in *some* space (I think object-space, but I&#39;m not<br=
>
sure?) as starting points. What can I compute from them that has this<br>
ignoring-rotation-around-global-Y property?<br>
<br>
It&#39;s been suggested there there&#39;s some canonicalization step I can<=
br>
perform that would just eliminate any Y-rotation, but I don&#39;t know how<=
br>
to do that other than by decomposing to Euler angles, and I suspect that<br=
>
would have gimbal lock problems.<br>
<br>
This is probably some pretty simple linear algebra at the end of the<br>
day, but between vague memories of eigenvectors, and a general<br>
uncertainty as to whether I&#39;m just overcomplicating this entire thing, =
I<br>
could use a pointer in the right direction. Any thoughts or references<br>
you could give me would be much appreciated.<br>
<br>
Cheers!<br>
<br>
- Richard<br>
<br>
---------------------------------------------------------------------------=
---<br>
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial<br>
Remotely access PCs and mobile devices and provide instant support<br>
Improve your efficiency, and focus on delivering more value-add services<br=
>
Discover what IT Professionals Know. Rescue delivers<br>
<a href=3D"http://p.sf.net/sfu/logmein_12329d2d" target=3D"_blank">http://p=
.sf.net/sfu/logmein_12329d2d</a><br>
_______________________________________________<br>
GDAlgorithms-list mailing list<br>
<a href=3D"mailto:[email protected]">GDAlgorithms-lis=
[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list" =
target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/gdalgorithms=
-list</a><br>
Archives:<br>
<a href=3D"http://sourceforge.net/mailarchive/forum.php?forum_name=3Dgdalgo=
rithms-list" target=3D"_blank">http://sourceforge.net/mailarchive/forum.php=
?forum_name=3Dgdalgorithms-list</a><br>
</blockquote></div><br>

--047d7bb03ecc83259704d0c14a64--


--===============4024151486659728134==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
--===============4024151486659728134==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
GDAlgorithms-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list
--===============4024151486659728134==--