2
\$\begingroup\$

I'm working on a swing animation and mixing it with a turn animation in a motorcycle game.

The issue is that for the swing animation to work while turning only the swinging arm has to animation, otherwise the other arm falls off the handlebar, you can see what I mean in the following videos;

http://www.youtube.com/watch?v=_pJeEHufAPg

http://www.youtube.com/watch?v=IxPQ91kCSKk

Is there a way to inverse whatever animation is being applied to the other arm to keep it in place so it isn't influenced so much by its parent or is this just a pipe dream?

Anyone here managed to solve a similar problem? I'm using Unity3D fwiw.

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

What you need to find is a technique that, given some constraint C (the left hand on the handlebar), applies some displacement to your joints so that the final animation respects those constraints while staying as close as possible to the initial animation. This could be done with constraint-baseds motion editing techniques and in particular, Per-Frame Inverse Kinematics. The idea is:

  1. Take an initial motion close to what you want but not perfect. Here, it is the motion in your first video;
  2. Determine the constraints you need to apply. Here, most probably the hand should stay on the handlebar;
  3. Then compute, at key frames (or similarly at every frame), the displacement you need to add to your animation to satisfy your constraints. This can be done with Inverse Kinematics for example;
  4. Finally, smoothly interpolate your initial animation with the final required results by smoothly "adding" the computed joint displacements.

This is not trivial to do actually and it needs some careful thinking beforehand. I suggest your read this paper which is a good explanation of the problem with different possible solutions:

Comparing Constraint-Based Motion Editing Methods, Michael Gleicher, Graphical Models, Volume 63, Number 2, page 107--134 - mar 2001

Tools for assisting with editing human motion have become one of the most active research areas in the field of computer animation. Not surprisingly, the area has demonstrated some stunning successes in both research and practice. This paper explores the range of constraint-based techniques used to alter motions while preserving specific spatial features. We examine a variety of methods, defining a taxonomy of these methods that is categorized by the mechanism employed to enforce temporal constraints.We pay particular attention to a less explored category of techniques that we term per-frame inverse kinematics plus filtering, and we show how these methods may provide an easier to implement while retaining the benefits of other approaches.

Your problem being in the "simple category", IK based techniques could work.

Finally, note that existing middleware could help. In particular, HumanIK from Autodesk is great for that (and much more).

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .